【问题标题】:How to trim video exactly at the middle of Iframe using Mp4Parser?如何使用 Mp4Parser 在 Iframe 中间精确修剪视频?
【发布时间】:2015-05-27 07:40:43
【问题描述】:

我正在尝试使用 Mp4Parser 在我的 Android 应用程序中修剪视频。但问题是:我不能在我想要的位置精确切割。例如:如果我选择剪裁位置是第 5 秒,视频仍然和剪裁前一样。我明白:原因是:我的 iframe 是从 0 到 10 秒。但是如何解决这个问题呢?

【问题讨论】:

    标签: android iframe trim mp4parser


    【解决方案1】:

    只需使用 ffmpeg,mp4parser 无法精确修剪视频,例如第 5 秒。

    ffmpeg -i input.mp4 -ss 00:00:30 -t 00:01:10 -async 1 output.mp4

    来自 ffmpeg 帮助:

    -t duration         record or transcode "duration" seconds of audio/video
    -ss time_off        set the start time offset
    

    总之,ffmpeg on Android project 的链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-19
      • 2014-08-06
      • 2015-10-27
      • 2013-03-12
      • 1970-01-01
      相关资源
      最近更新 更多