[Libav-user] Enquiry about I-Frame rate

amir.rouhi at rmit.edu.au amir.rouhi at rmit.edu.au
Wed Feb 15 06:43:22 CET 2012


The scenario is that, I have an .mpg video file. When I extract the
I-Frames from this file by below command:

ffmpeg -i D:\test\1.mpg -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)"
d:\Test\IFrames\I-Frm-%03d.jpeg



I will get 104 images which is about an I-Frame for every 12 frames of the
1.mpg stream.



Then I tried to change the video format to MP4 by below command:



ffmpeg -i D:\test\1.mpg  -vcodec libx264  -g 0 d:\Test\11.mp4



and



ffmpeg -i D:\test\1.mpg  -vcodec libx264  -g 10 d:\Test\12.mp4



the question is that the new generated videos, 11.mp4 and 12.mp4, in spite
of using different –g values , the I-Frames of these two video is same and
just is 5 images. I extract them by below command:



ffmpeg -i D:\test\11.mp4 -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)"
d:\Test\IFrames\I-Frm-%03d.jpeg



I want to know why there is a  big difference between the mpg and mp4 files
and why in spite of different –g in last two video, I have exactly same
I-Frames?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120215/59fc0ee8/attachment.html>


More information about the Libav-user mailing list