[FFmpeg-user] mpeg2video encode gop structure

Dan Bridges dosdan at gmail.com
Wed Mar 14 23:43:05 EET 2018


On 14/03/2018 1:37 PM, 冯良怀 wrote:
> ffmpeg.exe -i L:\input.mp4 -vcodec mpeg2video -g 12 -bf 2 -flags +cgop -sc_threshold 1000000000 -y L:\output.m2v

I tried this.  I used the following ffprobe line:

ffprobe -v quiet  -select_streams v  -of csv -show_frames -show_entries
frame=pict_type,coded_picture_number  -read_intervals %+#24 output.m2v >
test.txt

1. Here is the order of frames before sorting. I presume this is how
they're stored in the stream.

I    B    B    P    B    B    P    B    B    P    I    B    B    P   
B    B    P    B    B    P    I    B    B    P


2. Here  is the order of frames after sorting on coded_picture_number. I
presume this is the order the frames need to be decoded in:

I    P    B    B    P    B    B    P    B    B    I    P    B    B   
P    B    B    P    B    B    I    P    B    B


When discussing GOP structure, which order is used?


Dan.



More information about the ffmpeg-user mailing list