aahnik / telewater

A telegram bot that applies watermark on images, gifs, and videos.
MIT License
72 stars 101 forks source link

Cant find ffmpeg #11

Open bloomyers opened 3 years ago

bloomyers commented 3 years ago

Hello, I have telegram bot running Dokku droplet in Digital Ocean.

I've downloaded ffmpeg by sudo apt-get install ffmpeg on my Ubuntu machine from DigitalOcean. When I'm searching by Whereis ffmpeg it return /usr/bin/ffmpeg.

In my code I'm converting telegram voice's sample rate from 24000/48000hz to 16000 to modify them.

command = [
            r'/usr/bin/ffmpeg',  # path to ffmpeg
            '-i', in_filename,
            '-f', 'ogg',
            '-acodec', 'libopus',
            '-ar', '48000',
            '-'
        ]
   ` subprocess.call(command, stdout=temp_out_file)`

It return in logs : FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/ffmpeg' What path I should write to my telegram bot to find ffmpeg?

tissole commented 2 years ago

Check this guide