Answer the question
In order to leave comments, you need to log in
How to properly split video using ffmpeg?
I cut the ffmpeg video file with the preservation of audio tracks.
echo Y | ffmpeg -i original_video.mkv -map 0:a -map 0:v -ss 00:00:04 -codec copy -t 10 cut_1.mkv
echo Y | ffmpeg -i original_video.mkv -map 0:a -map 0:v -ss 00:00:14 -codec copy -t 20 cut_2.mkv
Answer the question
In order to leave comments, you need to log in
The problem is that you don't start cutting from the keyframe, and transcoding is prohibited. Hence the blackness to the first I-frame. The -ss solution is based on the fact that ffmpeg can jump keyframes without decoding, and if -ss comes before -i, then the stream will start to be cut off exactly from the next keyframe, and not from the place you specified.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question