Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理 MPEG 2 转码项目,我需要在 GOP 的边界处剪切视频。 我已经浏览了一些文档,并且能够在下一个 GOP 开始时剪切视频(通过检查I 帧(或)GOP 开始代码0x00 0x00 0x01 0xB8),但我需要在相同的 GOP 边界处剪切视频。
0x00 0x00 0x01 0xB8
有没有办法做到这一点?
通常大多数视频编辑软件会在下一个 GOP 处进行剪切。
因为如果您使用任何 GOP 剪切视频,那么如果没有 i 帧,则下一个视频解码器可能无法播放一些起始视频帧。这样的 P 帧和 B 帧将不会被解码。
所以更好的主意是在任何 GOP 处剪切视频流。或者,如果您想使用 GOP,请找出 GOP 中的下一个 i 帧并从那里剪切...
要操作视频,请查看ffmpeg。那些相关的答案(关于 GOP、frames 和 ffmpeg)也可能会有所帮助 。