Log in

View Full Version : Alternative to Avidemux Which Keeps Audion In Sync?


Quantumstate
7th June 2009, 19:13
(er, 'Audio')

I really like the features and plugins for avidemux, but no matter what I do it simply can not keep any mkv in video and audio sync. This is a total dealkiller.

Is there any app like avidemux, which allows you to edit transport streams without de/reencoding, and transcode to H.264, which is able to keep audio and video in sync? Is there a fork of avidemux which has fixed this fatal problem?

Inspector.Gadget
7th June 2009, 19:20
Post a sample that you're having problems with.

Quantumstate
7th June 2009, 20:54
I'd like to, but it'd be a gigabyte file, and my upload speed is only 40k. (Thanks Queerwire)

I always have to start with an audio delay of -600 (advance audio) or else it's off from the start. Then as the video progresses it goes off worse and worse, until after 30 minutes the audio is off a good 4 seconds. Impossible to watch.

This happens whenever I transcode ATSC mpeg2 to H.264/AVC-MKV.

I know that audio just plays and video is supposed to be keyed to it, and I know that in an ATSC TS audio and video are muxed, so I do not understand how avidemux could mess this up. The packets are in order, and they should be kept in order.

Inspector.Gadget
7th June 2009, 21:05
Have you check to see whether a delay is present by going to Audio->Main Track? If the delay changes over time, then it's less likely to be a problem with Avidemux detecting a delay and more likely to be some oddity with the TS files (changing audio formats, perhaps).

Quantumstate
8th June 2009, 15:30
Whenever I load a particular video it warns me there are several audio tracks, and that I should pick one. So I pick 5:1 and it says 0ms shift. Nevertheless I have to start out with -600 audio delay or it's always off from the start.

I am beginning to believe that avidemux does not understand the framerate of my source files. All my source files are ATSC mpeg2 at either 29.97fps or 59.94fields/s. I suspect avidemux is treating these as 30 and 60, but I don't know how to set it straight?

Inspector.Gadget
8th June 2009, 20:14
Cut a sample of the original TS (start from the beginning) and post a link to it - this is perhaps better done on the Avidemux forum over at the Avidemux site.

Quantumstate
14th June 2009, 16:12
Thanks IG, I have it uploading now. From the 7GB file I used avidemux to cut the first 240MB for upload. I used audio and video copy, but I find that the resulting file is already off sync. I don't know what to do. Since my upload connexion is so slow it will take me a day or two to get this file upoaded.

I've tried several times on the avidemux forum over the past couple months, but they just give an offhanded answer without any thought which is no help, and then they disappear. I think they don't actually know.

Trademark
14th June 2009, 19:35
Try QT sync: http://www.macupdate.com/info.php/id/15245

It provides fast and easy frame syncing for audio and video, and it doesn't re-encode your file to do so. When you're done syncing up your audio and video save as a self contained file. If you're not a mac user oh well.

Quantumstate
14th June 2009, 20:49
Yeah, Debian user. Oh well, it's worth it.

No one seems to actually know how A&V are actually synced up in the first place. I know audio is supposed to just play and video keeps in sync with that, but how is a Mystery To Science, much less why they get out of whack with avidemux.

WalterK
15th June 2009, 03:03
Avidemux will never keep mkv file audio in sync because its still being worked on.
If you want to edit mkv files without audio sync issues use mkvtoolnix http://www.bunkus.org/videotools/mkvtoolnix/
This allows you to demux/mux audio and video, cut, join, add titles and create chapter stops for mkv files.
And dont panic theres a gui frontend for you to see what you are doing.

Quantumstate
15th June 2009, 03:31
OK, here's the video clip. It's not very long, but a decent test size would have taken me days to upload.
http://www.archive.org/download/DocMartin/DocMartin.mpg

Thanks Walter, but the thing is I need to convert mpeg2 ATSC transport streams to h.264 and filter, crop, etc. But I'll check out mkvtoolnix. I doubt any work is actually being done on avidemux; at least bugs are ignored.

WalterK
15th June 2009, 04:34
my advice is try froggy's h264enc , the script allows cropping , filters (deinterlacing etc) resizing and encoding and the basic use of mkvtoolnix (mkvmerge)

Quantumstate
15th June 2009, 14:27
Nice. I've never heard of Froggy's script, but I have tried just about everything else. I'll check it out.