【问题标题】:FFmpeg ignores start time to trim audio file androidFFmpeg忽略开始时间修剪音频文件android
【发布时间】:2020-02-19 09:15:34
【问题描述】:

我正在为我的 android 项目实施 FFmpeg。

我使用ffmpeg-android-java对音频和视频文件进行编辑。

现在我正在尝试使用 FFmpeg 修剪我的音频文件,而 FFmpeg 会忽略我的修剪开始时间。

我提到了很多帖子,例如:

Trim video with reference to a start time and end time using FFMPEG

https://www.oodlestechnologies.com/blogs/FFMPEG-for-android/

但是,我仍然面临同样的问题。

下面是我的 ffmpeg 命令:

   String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath , "-t", "30", editFilePath};

我也试过

   String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath, "-t", "30", editFilePath};

    String[] complexCommand = {"-y", "-ss", "00:00:20", "-i", uploadFilePath, "-t", "30", editFilePath};

但 FFmpeg 总是将我的音频文件从开始时间00:00:00 修剪到00:00:30。它会忽略我的开始时间或-ss 时间

如果需要更多文件或信息,请在 cmets 中提及。

【问题讨论】:

    标签: android trim android-ffmpeg


    【解决方案1】:

    我知道我在发布我自己的问题,但它可能会在未来对其他人有所帮助。

    在我的问题中,我在命令行开头传递了初始时间,所以 ffmpeg 没有识别它。

    以下是软木塞命令:

      String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "00:00:20" , "-t", "30", editFilePath}
    
      String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "20" , "-t", "30", editFilePath};
    

    【讨论】:

      猜你喜欢
      • 2013-12-16
      • 1970-01-01
      • 2018-02-07
      • 2017-05-05
      • 2021-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-28
      相关资源
      最近更新 更多