On Wed, Feb 15, 2012 at 07:43, <[email protected]> wrote: > > 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?
x264 is a different beast. To use it consciously, you should study the options for this codec which sometimes have parallels in ffmpeg, and sometimes don't. To begin with, I suggest a page that describes some of these parameters: http://mewiki.project357.com/wiki/X264_Settings and another page that shows the parallels between parameters for x264 and ffmpeg: http://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping. Specifically, you should use -keyint_min parameter with -g if you want tighter control over GOP in x264. BR, Alex _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
