Subsampling from MJPEG stream

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Subsampling from MJPEG stream

Petteri Hintsanen
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?

ffmpeg-user mailing list
[hidden email]

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".