View Single Post
Old 20th October 2008, 01:33   #651  |  Link
lchiu7
Registered User
 
Join Date: Apr 2002
Posts: 279
Quote:
Originally Posted by Merlin7777 View Post
One thing you could do is to do all of your editing in Avisynth using the trim() command. That way you will result in one video and audio file. If you want more information on how to do this, use search on this forum, or visit the Avisynth wiki. Right now it just sounds like you are doing it the hard way.
Alas it's a bit more complicated than that. I can edit the .ts files fine with tspacket editor and the resultant file plays fine with audio and video in sync. But the file is still 3G for 42 minutes.

But as soon as I compress the video and try to mux it back with the audio, the various programs I use including mkvmerge and tsremuxer complain about bad packets in the AC-3 stream and lose data. I am guessing it's the way tspacket editor is cutting the video perhaps.

So I end up with a file with AV out of sync

Breaking it up into its component pieces seems to fix that but I can't find a way to join them all back as noted above.

Will check out avisynth. I am guessing the best way is to frameserve the video to Virtualdub but will try a few things out.

[edit]

However still doesn't explain why merging several MKV files together, each which have in sync audio/video creates a file which has the audio/video out of sync. I would have thought the mkvmerge just joins the files together but clearly it must be doing other processing also.

[edit]

Seems like merging MKV files is a known bug in mkvmerge when each stream has different audio/video sync offsets. Solved the problem by muxing each stream as a separate file and them merging them with avimux

http://alexander-noe.com/video/amg/

Works fine and resultant merged stream has all audio/video in sync.

Last edited by lchiu7; 21st October 2008 at 01:10.
lchiu7 is offline