View Full Version : Audio is not muxing properly
EuropeanMan
12th October 2008, 23:39
Mods, I hope I've put this in the right section.
I have a DVD9 (Apne, 2007, R0, MoserBaer release) that I demuxed via PGCDeMux...of course I get audio, video & sups...
I wanted to re-encode the video to progressive & fix some colour levels...that was successful. However, in ReJig or any other DVDAuthoring software, the audio doesn't synch properly anymore. The audio gets more & more (plays earlier) un-synched as the movie progresses.
If I look at the m2v file in VDM I have a length of 2hrs50mins...audio in delaycut software lists the untouched ac3 as 2hrs47mins...if i put in a delay of 4020, i get similar run-times...and remuxed the 'fixed' AC3...and this is now even worse...and can't really tell if the synch issue gets progressively worse or not....
So what do I do?
Original video is NTSC...
I used yadif(mode=1).sRestore() to get it to 25.000...even i ripped this to xVid & x264 codecs and muxed ac3 (and even mp4 audio)...and still the same issue. audio steadily comes before lips are moving, and gets worse throughout til the end. For DVDauthoring, I did use DGpulldown to get back to 29.970...and again, this is what I listed above in the 1st paragraph...
45tripp
13th October 2008, 01:58
if it's gradually losing sync,
you can't just offset with delaycut.
you'll have to stretch the audio to fit,
perhaps both offset and stretch.
use an audio editor on the uncompressed audio.
and if that doesn't fit,
then you have to manually tackle it,
which sucks more than you can imagine.
tripp
linyx
13th October 2008, 02:11
BeLight has a setting for changing the "framerate" of the audio uner Advanced Settings > SoundTouch.
EuropeanMan
13th October 2008, 02:38
^ ok, so I change the audio framerate from 31.25 to what?
Also for whatever reason, I can NOT transcode AC3 TO AC3...only AC3 -> mp3, mp4, .wav; but nothing ever goes to AC3 except when doing delays
& yes, i have AC3 filter installed...
manono
13th October 2008, 03:06
Rather than messing with the audio, your best bet is to try and figure out why the video no longer synchs up with it. To do that you have to figure the video length at each stage of the way. You can get the exact audio length with no trouble. I use HeadAC3he for that, but there are other ways as well.
Right after the PGCDemux stage I would first try and remux the original untouched audio and video before doing anything else, just to make sure it muxes OK, with both in synch. If they don't synch up, it might point to a bad decrypt or some peculiarity of the DVD.
Then use AviSynth scripts to find the video lengths at each stage. The first would be right after the DGIndex step, before any filtering. The second would be after you've added all your filters to the original script. The third would be after the encoding and DGPulldown stage (make a new D2V and AviSynth script). My guess is that the audio is muxing properly, but that you've done something somewhere along the line to change the video length. Just a guess, though.
if i put in a delay of 4020, i get similar run-times
If one is 2 hours 47 minutes and the other is 2 hours 50 minutes, adjusting the delay by just over 4 seconds does not give you similar run times.
EuropeanMan
13th October 2008, 05:01
^ what would I use to stretch the audio?
EuropeanMan
13th October 2008, 05:04
BeLight has a setting for changing the "framerate" of the audio uner Advanced Settings > SoundTouch.
i used it (29970 - 25000) and obviously i don't know anything about pitch correction, thus sound was horrible...and still unsynched :(
manono
13th October 2008, 05:20
Nothing you've said so far indicates you're intentionally trying to change the length of the video, so why are you trying to change the length of the audio? Do you have an AssumeFPS(23.976) in your script anywhere?
45tripp
13th October 2008, 05:53
i used it (29970 - 25000) and obviously... still unsynched :(
obviously!
a repal, shouldn't change duration
but checking your process in steps as manono suggested
is sound advice.
you're looking at a ~1.8% slowdown, according to your run times.
try something like that....
EuropeanMan
13th October 2008, 06:55
What is a way to stretch the audio?
I used DVDDecrypter to rip the DVD; when I play this in VLC, the movie length is 2hrs47mins46 sec
After reading manono's post; I re-ripped the DVD using Ripit4Me...movie only mode...after cleaning .VOBs 8 packets removed; movie plays @ 2hrs47mins40secs...
does this mean those 8 packets MIGHT have made a difference somehow? and why 6 seconds difference...and must I now re-rip this again using the new files? After demuxing audio, it is exactly the same length as before; same as video...
Where do I go from here? All I can think of right now is to stretch the audio...but how?
video for rip #1: 02:47:50.594
video for rip #2: 02:47:50.594
audio for rip #1: 02:47:46.656
audio for rip #2: 02:47:46.656
PS...I didn't use AssumeFPS(23.976)...I encoded to 25 (using yadif/srestore) in Xvid & x264 rips as well...even in CCE @ 25; then used DGPulldown to get 29.970 again for DVDAuhoring.
manono
13th October 2008, 07:17
If you're counting on players to give you the correct length, don't. Use AviSynth scripts using MPEG2Source (and not DirectShowSource) to get the lengths.
In your last post you gave 3 different lengths for the video. Come on now, how are we supposed to help if you won't even use recognized methods to help get to the bottom of this?
The fact that the audio is shorter means nothing. Maybe the audio ends before the video does. Did you try reauthoring the decrypted AC3 and M2V to see if they were in synch, as I suggested earlier?
All I can think of right now is to stretch the audio...but how?
BeSweet or any WAV editor, but you'll be wasting your time, causing yourself lots of headaches, and degrading the audio.
manono
13th October 2008, 12:07
I was trying to think about this some more, but don't know if I've come up with anything even half intelligent. However, I do think trying to remux the audio and video right after demuxing can be useful because if they don't synch up, perhaps with a delay added to the audio so they start off in synch, then any other work you might do after that (including all the reencoding) is just wasted effort.
I've never heard of any Indian DVD having any advanced copy protection (particularly from a cheap company like MoserBaer), but I suppose there's always a first time, because this sounds a bit like it may have some form of ARccOS applied, with a bunch of unreferenced cells in the DVD, cells which if kept will cause the audio to become unsynched.
When you said in your last post you redecrypted the DVD using RipIt4Me followed by cleaning, did you mean you ran it through FixVTS afterwards? You might try and track down these unreferenced cells if they exist, using PGCEdit or maybe VobBlanker, removing them before then running the result through FixVTS. I don't work with all that many newer DVDs, and am far from an expert on this subject.
If the retail DVD plays in synch, the reencoded DVD should also, without having to resort to stretching the audio, once you figure out what's going on. Have you tried decrypting it using DVDFab HD Decrypter yet?
ankurs
13th October 2008, 16:48
exactly same problem as vaastav , never was able to find a work around , ended up buying 2 different sources but turned out both are same by the same authoring company ( wtf , u can never trust ebay :s ) and i lost $$ + wasted so much effort , was exactly the same scenario , if i remember correctly the video was 2:34:06 and the audio was 2:26:xx and the difference was screwing everything up , on a cce , xvid and x264 as well .
tried all the above mentioned methods then even ( besweet and 1.8 % speedup and all ) still the closest i got to synching things up was until the last 40 odd minutes of the movie , it used to go progressively out of sync .
why i did it , cuz i LOVE both the movies , vaastav AND hathyar , its sequel , hathyar dvd9 sucks as well but not as much as vaastav , rainbowing artefacts to hell :(
i really hope a work around can be made possible and probably following that i can fix my problem as well . . . for now dont know what to say .
p.s : i used tempgaussalpha to bob and mrestore ( then ) to bring it back down to 25 fps .
EuropeanMan
13th October 2008, 19:12
@ Manono; I tried everything you asked for without any solution; the only thing I forgot to do was remux after demuxing from PGCDemux...to see if the m2v & ac3 audio synch back properly. I'll check out PGCEdit and see if there are any unreferenced cells...and will report back later tonite; just give me 8 hours or so...work calls :)
EuropeanMan
14th October 2008, 07:15
@ Manono - there were no unreferenced cells
My times in first OP were wrong...they should have been both @ 2hrs 47 minutes; video though @ 50.680 seconds & audio & 46.656 seconds as an addition to 167minutes
EuropeanMan
14th October 2008, 08:13
After decrypting 3 times this evening (DVDFab, Ripit4Me & DVDDecrypter), and demuxing 3 times; then muxing back...I get 3.68GB (not full movie; it is last 1hr27mins40sex)...I have NO idea why.
Each m2v file was 6.44GB; Audio was each 460MB :(
PS - audio is not in synch here either...
45tripp
14th October 2008, 08:48
i'm pretty sure you're not making sense anymore.
sounds like fun,
for some reason i'm strangely drawn to the task.
maybe i should seek out on of these disks.. :p
tripp
manono
14th October 2008, 09:32
Hehe, yeah, I didn't understand some of that either. What I can gather so far is that this is one messed up DVD, that the problems he's having have nothing to do with the filter chain, the encoding process, or (especially) the DGPulldown process (as was thought earlier, assuming this is the same DVD):
http://forum.doom9.org/showthread.php?t=141622
We now also know there are no unreferenced cells. Thus, I'm led to conclude that for some of the cells (the songs, maybe?), the audio is shorter than is the video. If true, the audio loss-of-synch isn't gradual, but occurs at specific places - either at the end (probably) or the beginning of specific cells. This would be tricky to pinpoint, but it is possible, I think. You'd have to check the beginning of each cell (chapter) and determine if it's out of synch, and then go back to the previous chapter and determine that it was still in synch. And there are probably several places where this might occur.
How to fix it? One way is to reencode and replace by cell. You could test this theory by doing a reencode at 29.97fps using DVD Rebuilder as the front end, as it encodes by cell. I'd almost be willing to bet that it would be in synch after it got done with it. I say 29.97fps because DVD-RB doesn't allow for IVTC, unblending, or any other framerate changes. However, you might be able to use the D2Vs it makes for each cell (and the audio sections, and bitrates, maybe) to then set up your own encodes.
Another way is to pinpoint the places where asynch occurs, cut the audio at those places (I use HeadAC3he for this), add silence to make up the difference (DelayCut), and rejoin the audio pieces during authoring (Muxman). That's a lot of work, but it would allow for the use of the already encoded video.
Yeah, 45tripp, I'm also tempted to get the DVD myself and fool around with it, as a challenge, but the place I use that stocks the MoserBaer DVDs is out of it at the moment.
ankurs
14th October 2008, 12:27
the dvdrebuilder idea is innovative :p
lets see how it turns out .
EuropeanMan
14th October 2008, 18:12
^ will grab DVDRB from hotmail....grrr, this will now have to wait til tomorrow; currently doing a lag for another source; will finish in about 12 hrs...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.