<br clear="all"><div><p class="MsoNormal">The scenario is that, I have an .mpg video file. When I extract
the I-Frames from this file by below command:</p>

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

<p class="MsoNormal"> </p>

<p class="MsoNormal">I will get 104 images which is about an I-Frame for every 12
frames of the 1.mpg stream.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Then I tried to change the video format to MP4 by below
command:</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">ffmpeg -i D:\test\1.mpg 
-vcodec libx264  -g 0 d:\Test\11.mp4</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">and </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">ffmpeg -i D:\test\1.mpg 
-vcodec libx264  -g 10 d:\Test\12.mp4</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">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:</p>

<p class="MsoNormal"> </p>

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

<p class="MsoNormal"> </p>

<p class="MsoNormal">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?</p></div><br>