问题描述
我有一个.y4m视频文件,我想使用FFmpeg将其转换为.mp4。问题是我想要一种类型的GOP,这一个: IBBPBBPBBPBB
。但是当我将GOP大小设置为12( -g 12
)是 IPPPPPPPPPPP
时,我得到了什么。我也尝试使用 -bf 8
选项,但我得到的结果,如IPBBB ...,视频播放不正确。
你能告诉我如何使用FFmpeg来获取确切的 IBBPBBPBBPBB
GOP?
我想你想要的是:
-g 12 -bf 2 sgop
-g
标志设置GOP大小(如您所述), -bf 2
表示2 B-帧应插入每组P帧之间,而 sgop
严格执行GOP大小。
I have a .y4m video file, and I want to convert it to .mp4 using FFmpeg. The problem is that I want a certain kind of GOP, this one: IBBPBBPBBPBB
. But what I get, when I set the GOP size to 12 (-g 12
) is IPPPPPPPPPPP
. I've also tried using the -bf 8
option, but I get results like IPBBB... and the video doesn't play right.
Could you please tell me how to get the exact IBBPBBPBBPBB
GOP using FFmpeg?
Thanks for your help
I think you want something to the effect of :
-g 12 -bf 2 sgop
The -g
flag sets the GOP size (as you already mentioned), the -bf 2
says that 2 B-frames should be inserted between each set of P-frames, and the sgop
strictly enforces the GOP size.
这篇关于用FFMPEG编码某个MP4 GOP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!