[FFmpeg-user] Subsampling from MJPEG stream
Petteri Hintsanen
petterih at iki.fi
Tue Sep 11 16:42:07 EEST 2018
Dear all,
I'm capturing an MJPEG stream to a file like this:
ffmpeg -f mjpeg -i http://axis/mjpg/video.mjpg -c:v copy -f mjpeg foo.mjpeg
The input stream has a frame rate of 25 FPS. I'd like to drop the
output frame rate to 1 frame per second; that is, to write
approximately every 25th frame from the input stream to foo.mjpeg.
Unfortunately simply adding -r parameter does not work:
ffmpeg -f mjpeg -i http://axis/mjpg/video.mjpg -c:v copy -f mjpeg -r 1 foo.mjpeg
If I re-encode to e.g. Matroska container like this:
ffmpeg -f mjpeg -i http://axis/mjpg/video.mjpg -r 1 foo.mkv
I get the desired result, but I'd prefer to avoid re-encoding because
of quality degradation. Any suggestions how to do this?
Thanks,
Petteri.
More information about the ffmpeg-user
mailing list