E
E
Evgeny Ivanov2020-03-19 07:34:26
Video
Evgeny Ivanov, 2020-03-19 07:34:26

How to properly cut and join ffmpeg video?

There is a 10 second video.

sharing video

echo Y | ffmpeg -ss 00:00:00 -to 00:00:05 -i original_video.mp4 -c copy cut_0.mp4
echo Y | ffmpeg -ss 00:00:06 -to 00:00:10 -i original_video.mp4 -c copy cut_1.mp4


Merge video
echo Y | ffmpeg -f concat -i join_video_filelist.txt -c copy join_video.mp4

join_video_filelist.txt
file 'cut_0.mp4'
file 'cut_1.mp4'


As a result, on the combined video, "at the junction" of 4 - 5 seconds, the sound disappears. Disappears for a second and then reappears. Why is this happening and how to fix it?
How to properly cut and join ffmpeg video?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
15432, 2020-03-19
@15432

on the contrary, the video disappeared for me .. try specifying -ss and -to after -i
or transcoding the audio, specifying copying only for video -c:v copy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question