FFmpeg忽略修剪音频文件android的开始时间

问题描述 投票:1回答:1

我正在将FFmpeg实施到我的android项目。

我使用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时间

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

android trim android-ffmpeg
1个回答
0
投票

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

我的问题是,我在命令行开始处经过了初始时间,因此ffm​​peg无法识别它。

下面是软木塞命令:

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

  String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "20" , "-t", "30", editFilePath};
© www.soinside.com 2019 - 2024. All rights reserved.