Can I be notified every time ffmpeg finishes processing one of multiple outputs?
I am trying to use one ffmpeg command to encode a streaming url and generate a lot of output files. In this example, ffmpeg will output three files, each 5, 10 and 15 seconds long:
ffmpeg -i <url> \
-t 5 output_5.wav \
-t 10 output_10.wav \
-t 15 output_15.wav \
The command works as expected, but I need to know when each of the output files is available in order to start further processing as soon as possible.
Is there a way to get notified of each of the "output_XX.wav file ready" events?
One of my approaches is to use inotifywatch to listen for CLOSE events, but I found that ffmpeg only closes files when the last one ends.
I could listen for MODIFY events as well, but there is no way to know when ffmpeg is running, I can only guess this by testing it with hardcoded maximum file size (very frustrating solution!).
source to share
No one has answered this question yet
Check out similar questions: