Coding a certain MP4 GOP with FFMPEG

和自甴很熟 提交于 2019-12-12 09:06:24

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/5180210/coding-a-certain-mp4-gop-with-ffmpeg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!