linux – FFmpeg MJPEG FPS Input to MP4 FPS Output Query
Hopefully someone can advise…
FFmpeg version 6.1.2
I have an application that compresses raw data to JPG files, these JPG files are then sent to a named Pipe within Linux. The named pipe is used as an input to FFmpeg, this input is used to generate an output MP4 that will be streamed via Apache to a Web Browser.
The FPS of the Input is set to 1 at the moment for testing (it will run at 40 eventually). The FPS of the output is using the default of 25.
My understanding from the FFmpeg documentation is that the input FPS of 1 will be duplicated 24 times to generate the output FPS of 25 – is this correct? The command I am running is as follows:
ffmpeg -y -i /tmp/streamfifo -movflags faststart+frag_keyframe+empty_moov -f mp4 live.mp4
What I actually get is 25 seconds of input frames output to 1 second of output frames, i.e. everything speeded up 25x.
I have played around with various -r settings, for example:
ffmpeg -y -i /tmp/streamfifo -movflags faststart+frag_keyframe+empty_moov -r 25 -f mp4 live.mp4
But, I get the same result.
Clearly I am doing something wrong, any pointers?
Thankyou.
Read more here: Source link
