Log in

View Full Version : Demuxing *maybe* causing sync problems


wackman
8th January 2006, 13:42
Hey all,

Another stupid problem of mine. For the last few weeks, I've been having sync problems when I convert movie files (mainly AVIs, but also mpeg) to mpeg2. I usually use Avisynth/quenc, but have also tried tmpeg (2.521.x and 3.x).

If I convert to an mpeg2 .mpg, the movie is in sync (not the band), but if I demux it with anything to m2v/mp2 and play the resulting files in Media Player Classic, there are sync problems. I've tried tmpeg's mpeg tools and rejig. I haven't really tried anything else, but I guess I could try bbdemux. If I just straight encode to m2v/mp2, the audio sync is off right from the beginning. It'd probably be fine if I muxed back to .mpg.

For a while there, I was doing the whole Goldwav's Time Warp to get *close* to being in sync, but never completely accurate. I also used VirtualdubMod's Frame Rate feature to see how much I'm off and that helped.

This week, I was having system problems on my computer and had to reinstall XP, so I was hoping those system problems might have something to do with it. After reinstalling XP, I still have the problem.

I've played around with ChangeFPS, ConvertFPS and AssumeFPS, but nothing could get it right. If I played the avs in MPC before encoding, the sync would be way off.

Before the XP reinstall, I had codec packs installed, so I had multiple MPCs installed. Now, I'm being a bit more reserved, so I just have codecs installed one at a time and only one MPC.

Could this just be an MPC issue? I make my DVDs with DVD-Lab and to avoid any demux sync issues, I always tell it to not demux into ES files. I guess there's a chance there really isn't a sync problem and MPC is lying to me. If so, is there an alternate media player that will let me load an m2v/mp2 at the same time? I can do it in VirtualdubMod, but that's kinda a pain.

Thanks for any help.

Wackman

ronnylov
13th January 2006, 12:49
You could try demuxing with ProjectX or PVAStrumento and see if it makes any difference. Those programs sometimes fix synch problems at demuxing.

You can try playing the demuxed files in MPEG2Schnitt which is a nice tool for editing elementary streams before authoring to DVD. It also have a feature to add an audio delay (positive or negative) which can be used to manually fix synch problems (first adjust the delay until it plays in synch and then cut out the synced part to new files).

wackman
16th January 2006, 01:59
So, I don't know what my problem was with those AVIs, but the problem was really with DirectShowSource. The AVIs I was using had VBR MP3 as their audio codec, so I just had to add EnsureVBRMP3Sync and they were fine.

I'm still having the problem with DirectShowSource and have heard that has been a problem for people. I'm using it to convert mpeg1 files from VCDs. If I play the file without going through AVISynth, it's fine. If I even do a simple script like:

DirectShowSource("movie.mpg")
ConvertToYV12

immediate sync problems. So, it's either AVISynth, ffdshow, or a combination of the two. I googled for a bit and saw that some people got things working if they went into ffdshow's configuration and changed the decoding options for mpg to xvid (libmpeg2?) instead of libavcodec. I played around with ffdshow configurations, but I'm not sure if I changed the right one(s) or not. So far, it hasn't made a difference, but I haven't rebooted yet.

Maybe this might clear things up and someone will have a suggestion. By the way, thanks for your MPEG2Schnitt suggestion. I forgot about that one. I think the whole demux issue I was having was because of some win64 issue. I've since reformated and I'm back on XP32.

Wackman

Wilbert
16th January 2006, 10:46
Try

DirectShowSource("movie.mpg",fps=...,convertfps=true)
ConvertToYV12
or

DirectShowSource("movie.mpg",fps=...,convertfps=true)
EnsureVBRMP3Sync()
ConvertToYV12

towerblocks
17th January 2006, 18:13
I've been having the exact same problem for over 2 month's now every encode i do is out of sync, Sound can be in sync for 10.. 20.. or 30 minutes then it will drift in and out of sync, I've try'd everything from formating the HDD to changing the HDD to changing my OS to trying different software and even replacing the ram to no avail the problem still continues, Then i came across this tool http://www.videohelp.com/tools?tool=ReClock_Directshow_Filter, I played a original file in wmp and looked at the audio clock speed and it was playing in the 48.000hz range, So then i rencoded the audio and played it then looking at the audio clock and it was playing at around 49.000hz, So now i've put it down to a clock problem with my mobo board has i have onboard sound, So for me it looks like a new board, But if you have a sound card try a different sound card, Could'nt hurt to try it.