Log in

View Full Version : demuxed audio/video lenght - i start to hate this crap


hyper
2nd December 2002, 18:25
i think i'm gonna cry (yes i'm a sissy ;-)) k, here's the issue. when i demux a perfectly sync vcd mpg i end up with either the audio 3 secs to short or the video (varies randomly). how can this be possible? shouldnt the audio stream and the video stream be the same lenght as the total video shows in WMP, or any other player?
i tried to use diff. demuxer, only bbdmux has given me 2 streams the same lenght. but when i import the audio into dvdmaestro, it shows there with a wrong duration again. but the audio is longer, checked it with 3 different audio editors.
can i cry now?

please, pretty please.....inputs

auenf
3rd December 2002, 10:55
...and after you import the files into DVDMaestro, drop the video on the timeline, and do a create sync audio track on the audio track.

Enf...

hyper
3rd December 2002, 17:39
bah, didnt work for the ac3 files. well, did stretch the audio manually with an audio editor and now the lenght matches the video in maestro. and its sync. strangely those audio files show now longer in any audio editor or video player, but i've given up on trying to find out why and how this works. as long as its sync, i dont care.

atreides93
3rd December 2002, 19:05
I've noticed this same issue with many demuxing programs. The AC3 file is often a different length than the video file.

I wish we could figure out why this is happening...sure you got it in sync this time but isn't that a little too much trial and error? I mean you say you stretched it to make the length match, with what silence? at the end? beginning?

hyper
4th December 2002, 22:35
no silence or trim at all. its a bit of a hassle, but it works. i keep a 48khz wav file of the same ac3 audio file and import the ac3 into maestro. check what lenght it shows and then stretch or shrink the wave in CE pro accordingly keeping the pitch.
re-encode it back to ac3 with the ac3 encoder supplied with scenarist and import the modified file into maestro.
strangely it now shows the same lenght as the video file but if you check that file in softencode, it's in a different lenght than the video. well, what do i care, its sync now.
at least on the pc, still have to check on my standalone ;-)
btw, does anyone know if there's an ac3 file editor that would do the stretch shrink stuff? could skip the wave convertion and re-encode part then.

ac3
15th December 2002, 23:17
Hyper, I reviewed many relevant posts on the subjects, all seem to be lost. Your method is most promising--- You said "I keep a 48khz wav file of the same ac3 audio file and import the ac3 into maestro. check what lenght it shows and then stretch or shrink the wave in CE pro accordingly keeping the pitch." But I like to know a little bit more, can you please elaborate this procedure a bit using the CE Pro, I couldn't figure out what you did. I am new to CE pro.

I like to put many VCDs on DVD-R, I demux A/V, and like to keep the video stream, but need to recode mp2/mpa to ac3 instead of wave to save storage. A/V sync is a problem.

In the past, I bypassed the sync problem by using TMPenc DVD template to recode both video/audio then using DVDit PE, which would consume a lot of time and lower the video quality.

Thanks.

john@sympatico.ca
16th December 2002, 22:16
I may be waaay off base here, but does it really matter that the files are not the same length? The AC3 has a time code thing, that will synch it with the appropriate cell / frame of the video stream.

I've only noticed this twice in Maestro, and strangely enough, I've only used Maestro twice (with sucess that is): when I imported my assets, the audio was 5 sec. longer than the video, however the end product was perfectly in synch.
:confused:

I suppose a question to ask Hyper: did you try remuxing the missmatching streams and were they out of synch?

ac3
17th December 2002, 00:47
John got an excellent valid point, I immediately tested by using both hyper and john's methods:

1. I managed to learn to stretch wave in CE Pro for 3s (which was A/V diff found in maestro, A was 3s short). Then I soft encode stretched WAVE into ac3, and import into maestro. Now I see A/V length is the same). Just when I about to get excited, however, sync problem didn't go away.

I tested A/V authoring in both spruceup and DVDit PE, same result. I couldn't test in maestro because don't have the cinemaster 2000 installed.

2. Timecode as john pointed out, I recoded ac3 this time I checked time stamp option in soft encode when encoding to ac3, I noticed with this method, the file is now the same length as video file when imported in Maestro. However, sync problem is still there when I previewed in Spruceup. I couldn't preview in maestro because I did not have the realview enabled. Since audio is early, I tried to get rid of the problem by using fix ac3 delay connector, it refused to recognize the ac3 when encoded with time stamp option enabled.

This is more complicated than I expected...

john@sympatico.ca
17th December 2002, 06:13
I may have had a good point, but I think I was mistaken about my experiences, I'll have to redo it to test it, but I think it may have been 5 / 100 of a second difference in the lengths of the audio and video streams, and not 5 sec. :rolleyes:

ac3
18th December 2002, 01:08
I finally found a successful workaround for the problem. This is not a fix, but rather just a workaround.

I go back to old way to use tmpenc DVD template to recode the .dat A/V to low reslution DVD specs. Then I demux A/V from the newly encoded mpeg. I soft encoded A to ac3, (at this point you may substitute V with the original V from the .dat demux--if you do not substitute V file, it will also work here, but V size will be larger after encoding).

Now all is perfect in sync... Hyper, my method maybe a little faster than yours... but who cares, as long as it works...

hyper
18th December 2002, 12:03
lol, this thread was long gone for me, obviously it carried on. well, i finally managed to get everything synced and on dvd-r. svcd's, vcd's and reencoded dvd compliant mpgs (obviously ;-)).
the lenght difference does indeed not matter, if the ac3 audio has a timecode stamp to begin with or the mp3/mpg audio has been encoded in a proper way, but most vcds arent. (tvrips i mean by this)
i did like 200 vcd tv show eps by now and they're all perfectly sync. on some i didnt have to do the stretching although the time lenght didnt match in maestro (or any other authoring tool for that matter) and on some i had (only knew which ones after i made a TS_Video folder to test in powerdvd). dont know why that is, just know it had to be done to be sync on standalone.
btw, if you do the stretching right in CE Pro, you should get synced audio in any case.
btw, read tons of threads about this issue in sooo many forums and no one really seems to know why it happens. most point to conflicting/bad video audio codecs on the system use.

dannyv
18th December 2002, 16:24
I read in a few threads that the problem may be 2:3 pulldown when encoding NTSC movies. The solution was to encode as non-interlaced instead of 2:3 pulldown. Then run pulldown.exe on the resulting .m2v file with no command line switches. e.g "pulldown.exe movie.m2v movie1.m2v". I encode using cce and run pulldown on the resulting .mpv (renaming it to .m2v) and have never had an audio sync problem. So for you tmpgenc encoders this may be worth a try.