我正在将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
时间
如果需要更多文件或信息,请在评论中提及。
我知道我要发布自己的问题,但将来可能会对其他人有所帮助。
我的问题是,我在命令行开始处经过了初始时间,因此ffmpeg无法识别它。
下面是软木塞命令:
String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "00:00:20" , "-t", "30", editFilePath}
String[] complexCommand = {"-y", "-i", uploadFilePath, "-ss", "20" , "-t", "30", editFilePath};