Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Source by shotstack.io #
 
PREVIOUS NEXT
Tagged: #ffmpeg #video #trim
ADD COMMENT
Topic
Name
1+1 =