[FFmpeg-user] Extracting I P B frames from a mpg video

Rohit powerohit at gmail.com
Mon Jan 5 12:51:43 CET 2015


Thank you so much
Moritz Barsnick... You made my day... God bless you...That worked great for
me...........

M S Rohit B.E, M.Tech,
Assistant Professor,
Dept of Computer Science & Engineering,
Jain Institute of Technology,
Davanagere.
9663861707

On Mon, Jan 5, 2015 at 3:54 PM, Moritz Barsnick [via FFmpeg-users] <
ml-node+s933282n4668752h95 at n4.nabble.com> wrote:

> Hi Rohit,
>
> On Sun, Jan 04, 2015 at 23:46:26 -0800, Rohit wrote:
> > ffmpeg -i delta.mpg -vf select="eq(pict_type\,PICT_TYPE_I)" -s 400x300
> -f image2 frame.mpg-%03d.tif
>
> You should always show us the complete, uncut output of your command.
>
> > which should extract all the I frames(as per -vf
> > select="eq(pict_type\,PICT_TYPE_I)" ) in the input file. But I got 197
> > frames instead of 17 from this command and it looked like command has
> just
> > shown me all the frames.
>
> There's a Wiki entry covering this:
>
> https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video
>
> And though it doesn't explain why, it does hint that you need to use:
> -vsync vfr
>
> This works for me.
>
> I believe the image2 muxer automatically assumes the same frame rate as
> the input (i.e. automatically chooses "-vsync cfr"). Since you are
> dropping all none-I-frames, it interpolates the missing frames to
> produce the correct rate. BTW, I get less frames than the (my) source
> video, because the muxers stops creating output at the last input
> I-frame.
>
> Another BTW: The value PICT_TYPE_I, which is also used in the Wiki
> entry, does not correspond to the documentation which says:
>
> > ‘pict_type (video only)’
> >
> >     The type of the filtered frame. It can assume one of the following
> values:
> >
> >     ‘I’
> >     ‘P’
> >     ‘B’
> >     ‘S’
> >     ‘SI’
> >     ‘SP’
> >     ‘BI’
>
> But the source (libavfilter/f_select.c) tells me that the prefix
> PICT_TYPE_ is also accepted.
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4668752&i=0>
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://ffmpeg-users.933282.n4.nabble.com/Extracting-I-P-B-frames-from-a-mpg-video-tp4668751p4668752.html
>  To unsubscribe from Extracting I P B frames from a mpg video, click here
> <http://ffmpeg-users.933282.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4668751&code=cG93ZXJvaGl0QGdtYWlsLmNvbXw0NjY4NzUxfC02NzYyMDg1MTA=>
> .
> NAML
> <http://ffmpeg-users.933282.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Extracting-I-P-B-frames-from-a-mpg-video-tp4668751p4668755.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list