I've donwloaded some youtube videos that I want to join. I joined them with mkvmerge, but in the joined video, there are ~5 seconds skips (in VLC the second counter stops and then jumps 5 seconds) at the start of each video I joined (even at the start). Is there another way to join them so I won't have this problem?

  • Do other players have this problem as well or only VLC?
    – v010dya
    Commented Jul 18, 2014 at 13:28

2 Answers 2


Try a video editor like Lightworks to join them into one video, there you can cut any black frames and won't have to deal with possible glitches introduced by muxing different videos into one stream.

If your videos are indeed webm and not h264 you might need transcode them into another codec (f.e. with ffmpeg), a production codec like MJPEG or any lossless codec might be suitable as an intermediate codec so you don't loose much visual quality after exporting your finished video.

  • I've tried using video editors to join videos in the past, but these programs allways try to reencode the videos. Also I was told to use mkvmerge precisely to avoid recoding them to anything (even MJPEG) so they didn't lose quality.
    – noName
    Commented Jun 26, 2014 at 15:27
  • Sure muxing is always the lossless method. You can also use ffmpeg to cut the file without re-encoding. Might be a bette solution than mkvmerge.
    – timonsku
    Commented Jun 26, 2014 at 18:45

Maybe try a different tool for muxing your files all into one? Like ffmpeg's concat meta-demuxer. (the concat filter (-vf concat) doesn't work with -codec copy, but -f concat for the input does.)


Probably your pauses in the concatenated video are from a timestamp glitch in the merged file. The mkvmerge manual sheds some light on how it does timestamps for the resulting file.

You could check the frame pts values in your merged file with ffplay -vf showinfo (from ffmpeg). (or ffmpeg -i merged.mkv -vf showinfo -f null - to not show the video.) If there are big gaps in the pts (presentation timestamp) of frames on the merge boundaries, then that's why the player is pausing.

Using a different tool to concat (like ffmpeg) might solve it. Or you can do what Prof. Sparkles suggested, but without actually encoding to lossy mjpeg, and then back to lossy h.264. Tell ffmpeg that the input frames should be considered 24000/1001 fps CFR, and that it should generate new PTS values, ignoring the input timestamps. (old question, so not digging up the details on how to do it. check the ffmpeg manual.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.