How to using ffmpeg to split your exist video
How to using ffmpeg to split your existing video into small videos by time.
in Linux:
if you already installed the FFmpeg, then FFmpeg can do this job, but the quality of video or audio maybe needs further setup:
$ ffmpeg -i source-file -ss 0 -t 600 first-10-min.mkv$ ffmpeg -i source-file -ss 600 -t 600 second-10-min.mkv$ ffmpeg -i source-file -ss 1200 -t 600 third-10-min.mkv
video quality if using H.264, you can reference this usage: https://trac.ffmpeg.org/wiki/Encode/H.264
ffmpeg have presets and tune can using for encode video quality.
Constant Rate Factor (CRF)
The range of the CRF scale is 0–51, where 0 is lossless (for 8 bit only, for 10 bit use -qp 0), 23 is the default, and 51 is worst quality possible.
CRF Example
This command encodes a video with good quality, using slower preset to achieve better compression:
ffmpeg -i input -c:v libx264 -preset slow -crf 22 -c:a copy output.mkv
or for finding useage you can easily to using "ffmpeg -h" command to find it.
留言
張貼留言