VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Hi,

    I am trying to re-encode an H.264 mkv file (no audio/chapters/subs) in pieces using x264. On the first encode, I seek to frame 1, and then encode say 1000 frames. On the second encode i use all of the same parameters but seek to frame 1001 and encode another 1000 frames. When doing this I was doing a 2-pass encode for each, at the same bitrate for both. Each encode would output an MKV file. When I use mkvmerge to append the second file to the first file, when I play the resulting MKV back, there is a slight jerk/pause where the two files meet... How can I fix this? and what would be the cause of this? I have also tried encoding the files to output h264 files and combining them with a simple binary file joiner, but I get the same results after putting the h264 file in an mkv and playing back...

    The goal is to encode a different range of frames on 2 separate computers to complete the job quicker, then merge the resulting pieces into one seamless file.

    Thanks for the input..
    Last edited by krv; 13th Nov 2010 at 23:26.
    Quote Quote  
  2. NEVERMIND. I just tried splitting the original MKV with MKVMERGE first, it seems that it may be splitting it at keyframes, whereas before I was splitting them at a random frame. I then merged these pieces back together and it played seamlessly. Therefore I can just split with mkvmerge and can later re-encode each of these pieces individually with identical parameters, and without seeking (just encode the entire piece). Then I can join these files back together and the final movie should play seamlessly. duh. newbie.
    Quote Quote  
  3. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    Most highly compressed formats have that problem. You can split anywhere, but you would need to re-encode, at least at the split point to restore the keyframe sequence. Best is to split at keyframes, but not always desired. It gets worse if you want to do a lot of cutting on a video, like removing commercials. Then you would definitely need to re-encode. Or you can convert the video to a lossless or near lossless format, do your editing, then convert back to your compressed format.
    Quote Quote  
  4. Well i take back what I said. I had split the video using mkvmerge and the re-combined the parts and it was all smooth, however, when I actually re-encoded each of the parts and then recombined those re-encoded parts, the pause/jerk was still present...
    Quote Quote  
  5. Just a hunch - When you re-encode, you change the frametype distribution. But when you split, each split is right before an IDR-frame (so each segment after the 1st will always begin with an IDR frame) . However, when you re-encode, frame 0 might not be an IDR-frame (it might be placed later on in coding order). A decoder cannot begin decoding that new section until the that IDR frame is reached (so it has to find that IDR frame, and then go backwards - this might cause a pause). You can force frame 0 of each newly encoded split section to be an IDR frame with a qpfile

    The more segments you use, theoretically the more deviation from a regular 2-pass encode - it gets less efficient (lower quality at the same bitrate) because of the change in GOP characteristics

    Also, have you tried other builds (maybe you mkvmerge build is buggy) , or maybe mp4box ? and have you tried other players?
    Last edited by poisondeathray; 15th Nov 2010 at 09:07.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!