first commit
This commit is contained in:
7
content/deepin折腾笔记/第六章/6.11.7.md
Executable file
7
content/deepin折腾笔记/第六章/6.11.7.md
Executable file
@@ -0,0 +1,7 @@
|
||||
# 6.11.7 ffmpeg 截取视频
|
||||
ffmpeg -i in.mp4 -to 5 -c copy out.mp4 #截取开头至第5秒
|
||||
ffmpeg -i in.mp4 -ss 10 -c copy out.mp4 #截取第10秒至结束
|
||||
ffmpeg -i in.mp4 -ss 6 -to 9 -c copy out.mp4 #截取第6秒至第9秒
|
||||
ffmpeg -i in.mp4 -ss 8 -t 5 -c copy out.mp4 #从第8秒开始截取5秒
|
||||
ffmpeg为了加速,会使用关键帧技术,所以有时剪切出来的结果在起止时间上未必准确。通常来说,把-ss选项放在-i之前,会使用关键帧技术;把-ss选项放在-i之后,则不使用关键帧技术。如果要使用关键帧技术又要保留时间戳,可以加上-copyts选项:
|
||||
ffmpeg -ss 00:01:00 -i in.mp4 -to 00:02:00 -c copy -copyts cut.mp4
|
||||
Reference in New Issue
Block a user