FFMPEG命令视频和音频的输出视频文件不匹配
我正在尝试使用此命令使用FFMPEG修剪视频文件 ffmpeg -i input.mp4 -ss 00:05:20 -t 00:10:00 -c:v复制-c:复制output.mp4
。问题是当我打开输出视频时,音频正常启动,但视频仅出现仅5秒钟。我尝试删除-c复制
选项,并且输出是准确的,但是该过程非常慢。因此,我的问题是在使用-c复制
选项时如何进行输出视频/音频匹配,或者在不使用-C复制
选项时如何更快地使过程更快。这是我第一次使用它,所以我对视频/音频编码不了解,我只是想从PHP脚本中提取视频剪辑。
i'm trying to trim a video file using ffmpeg using this commandffmpeg -i input.mp4 -ss 00:05:20 -t 00:10:00 -c:v copy -c:a copy output.mp4
. The problem is when i open the output video, the audio starts normally but the video appears only 5 seconds after. I tried removing the -c copy
option and output is accurate but the process is very slow. So my question is how to make output video/audio match when using -c copy
option, or how to make the process faster when not using -c copy
option. It's my first time using this so i don't know much about video/audio encoding, i am just trying to extract a video clip from a php script.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,当音频在视频之前,
-Async
Switch自动校正在以-Async 1
传递时,音频流的开始。所以尝试跑步Usually when audio is ahead of video the
-async
switch auto-corrects the start of the audio stream when passed as-async 1
. So try running