[FFmpeg-devel] Skip Frame in MJPEG video
Michael Niedermayer
michaelni at gmx.at
Fri May 27 16:11:43 CEST 2011
On Fri, May 27, 2011 at 03:16:02PM +0200, christophe laferriere wrote:
>
> 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.
demuxer is in libavformat
and which depends on how mjpeg is stored, it might be avidec.c
ffprobe will tell you more about what is used for your file
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110527/5430fdaf/attachment.asc>
More information about the ffmpeg-devel
mailing list