【问题标题】:Is it possible to undo temporal compression by reconstructing I-frames from B or P frames?是否可以通过从 B 或 P 帧重建 I 帧来撤销时间压缩?
【发布时间】:2021-07-02 07:19:38
【问题描述】:

是否可以将 P 或 B 帧转换回 I 帧?

这篇文章建议可以通过转码,但我根本不明白解决方案。

Create I Frame out of P and B frames

我正在尝试拍摄带有 I/P/B 帧的视频并将其重建为 I/I/I,例如 MotionJPEG 视频。

【问题讨论】:

  • 您正在描述转码。你有什么不明白的?
  • @szatmary 谢谢。您能否提供有关如何解决此确切问题的任何文档或教程?我似乎找不到任何东西。
  • 我觉得我做不到,至少不能满足你。因为当我用谷歌搜索“ffmpeg transcode only iframe”时,我得到了很多很好的例子。所以要么这些例子不适合你,然后你没有解释为什么它们不适合你,或者你根本不了解转码,以防你需要花时间阅读和理解.我不能为你做这两件事。

标签: image opencv video ffmpeg compression


【解决方案1】:

这会将所有帧提取为 PNG,这样从技术上讲,您只有 i 帧。

ffmpeg -i video.mp4 frames/%08d.png

如果您想要视频,请重新编码为 ProRes,例如:

ffmpeg -i video.mp4 -c:v prores_ks video.mov

...因为 ProRes 只有 i-frames。

或者,如果你想要 MJPEG:

ffmpeg -i video.mp4 -c:v mjpeg video.mov

【讨论】:

    猜你喜欢
    • 2018-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-19
    • 2019-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多