'ffmpeg-python function compiles more than 1 time

ffmpeg compile function more than 1 time. this is my code:

i = ffmpeg.input(input)

return ffmpeg.output(i, output, **{'vcodec': 'libx264', 'crf': 40, 'preset': 'fast', 'c:a': 'aac'}).run(overwrite_output=True)

I use it in a telegram bot and when user sends video, sometimes the bot sends back 2-3 times.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source