telewater
telewater copied to clipboard
Cant find ffmpeg
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?
Check this guide