Under Linux video capture command

For example, you have a video, then you are interested in a certain period in which you want to intercept him down, and do not want the picture worse, (of course you do not want to spend money on video editing software), you can use the following command in Linux:

ffmpeg -ss 00:00:05 -t 00:00:10 -i input.mp4 -q 0 output.mp4

00:00:05 indicates the start time

00:00:10 represents the length you wish to capture (not the end of time)

-q 0 should be no loss of quality representation

 

 

Or you can use the following command should be faster

ffmpeg -ss 00:00:05 -t 00:00:10 -i input.mp4 -c copy output.mp4

-c copy representation does not have to re-encode

 

In theory, the above command can be replaced by:

ffmpeg -i input.mp4 -c copy -ss 00:00:05 -to 00:00:15 output.mp4

-to parameter represents the end of time,

But when I tried the command production of video files, the first few seconds may be black, so we all try it

 

Reference links

https://superuser.com/questions/377343/cut-part-from-video-file-from-start-position-to-end-position-with-ffmpeg

 

 

Guess you like

Origin blog.csdn.net/zhqh100/article/details/82014803