[FFmpeg-devel] Skip Frame in MJPEG video

christophe laferriere christophe.laferriere at gmail.com
Fri May 27 15:16:02 CEST 2011


Le 27 mai 2011 à 15:08, Michael Niedermayer a écrit :

> On Fri, May 27, 2011 at 10:21:36AM +0200, christophe laferriere wrote:
>> I mean that I'm looking for a way to skip all bytes (in a FILE* in my case) from a same frame (for example in order to maintain a certain framerate.) so I was wondering how does the equivalent piece of code from ffmpeg look like.
> 
> the frame rate maintaince code is in ffmpeg.c in
> if(video_sync_method){
> 
> one could say the:
>    if (nb_frames <= 0)
>        return;
> 
> is doing the skiping

Ok. Thanks for pointing this out!

> 
> This does not work on "FILE *" level it works on frame level.
> You need a demuxer first to get the frames out of a file and then you
> can in case of intra only codecs skip frames.

Ok so then I'd like to have a look at the demuxer code for mjpeg files. But don't bother, I'm gonna search by myself. I guess (and hope) it's in the libavcodec directory, in mjpeg* files.

> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> I do not agree with what you have to say, but I'll defend to the death your
> right to say it. -- Voltaire
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


--
Chris.



More information about the ffmpeg-devel mailing list