Log in

View Full Version : Audio out of synch on large files


Minas6907
22nd July 2009, 22:12
Hello everyone.

I have a problem encoding large files with vdubmod, on these large files the audio gets horribly off synch. I did search the forum, and there were a few threads that kind of applied, but in the end didn't really help. I'm going to try to explain this the best I can, and please do let me know if I am leaving out any important details.

I have a Pinnacle PCTV HD Stick that I use to record TV shows, and I do use the TV Center Pro software that came with it. I have found that when I record large amounts of Video (say...two hours or so), when I go to encode it in vdubmod, the resulting audio and video is not synchronized. When I have recorded a show that is a half hour long, what I normally have to do to make the audio and video synchronized is go to Streams, then Interleaving, then I delay the audio by 200 ms. That seems to do the trick most of the time.

As for other details, I am converting the audio to mp3, using Divx 6.6.1...and I dont really know what else to include.

Is there any options I am not seeing or have not play around with much? I did encode a short video with xmpeg, and the audio was in synch with the video, but xmpeg wont open the larger files, which are 5+ gb, the program just crashes.

I dont know much about video editing/encoding, I just kind of know enough for what I want to accomplish, but this has thrown me through a loop. Any help at all with vdubmod is appreciated (or even of you want to recommend another program). Thanks guys.

CWR03
23rd July 2009, 03:15
Can you capture the audio in .wav format? I've read before that capturing in .mp3, especially vbr or abr, can introduce synch issues.

setarip_old
23rd July 2009, 03:47
@Minas6907

Hi!

Have you played the original captured video (before running it through VirtualDubMOD), to see if it's in synch?

Minas6907
23rd July 2009, 04:24
I think I may have found the issue. To answer your questions, I believe I am capturing in .wav...I think. And yes, I have been watching the video before I process it, the audio and video stays synched all throughout.

I just read about avidemux, and in the FAQ it reads:

"Why do my MPEG-2 files get out of sync when I cut/edit them in Avidemux?

Captured MPEG files are generally from DVB S/T (in MPEG TS format) or from IVTV based cards or any other card with hardware MPEG-2 encoding (in MPEG PS format). These captures often contain transmission errors which end up as missing or broken frames! A video player (MPC, MPlayer, xine, VLC, etc.) will constantly re-sync the streams using the timing information embedded in the stream. Avidemux will not! Apart from the constant shift, which is easily recoverable using the timeshift filter, it will result in a growing synchronisation issue when encoding or transcoding. Even saving without re-encoding will be async! MythTV recordings are a prime example of this problem: The audio will be offset by approximately -330 ms at the start of the recording and the drift throughout the duration of the recording. Please note that not all MythTV recordings have this problem, just some depending on the software and hardware configuration. The only 100% reliable way to fix your MPEG-2 files is to use ProjectX. You can get ProjectX from http://project-x.sourceforge.net/, a tutorial can be found at http://www.avidemux.org/admWiki/inde...itle=Project_X."

This sounds a whole lot like my problem, so I will give 'ProjectX" a try and update later. Thanks.

Minas6907
23rd July 2009, 05:17
Ok, so ProjectX and Avidemux seem to be doing the trick, the real test will have to come tomorrow. Thanks for your help, guys.

Ghitulescu
23rd July 2009, 07:50
Ok, so ProjectX and Avidemux seem to be doing the trick, the real test will have to come tomorrow. Thanks for your help, guys.
Only ProjectX, PVAstromento and a couple of other commercial software. Not avidemux, according to your own submission (excerpt from avidemux faq). ;)
Coming back to your problem, if you have a noticeable drift, it seems that your recordings are really broken. Instead of correcting them, better optimize your reception.
There is another side of the story: HD transmissions. ProjectX cannot do h.264. Also HD transmission may be TS (188) or M2TS (192), for the latter you need TSdoctor or TSmuxer. M2TS is not widely recognised by software, that's the need for a remuxer.

Poutnik
16th August 2009, 16:13
Is there any chance to built MPG syncing into Avidemux ?
If players can do so while playing, can Avidemux do so well, without reencoding ?
I think it would be quite handy feature.
Or, if not builtin, maybe by calling ProjectX and muxing utilities as their frontend ?

mean
16th August 2009, 18:38
being done in avidemux 2.6

MatLz
16th August 2009, 20:31
I had same problems with tnt tv mpg captures on pc. Winavi corrects these problems correctly. But It's shareware unfortunately.

Poutnik
30th August 2009, 19:30
Could you, please, confirm my way of providing A/V synced DVB-T source for AviDemux / Avisynth-MeGUI Processing ?

I get DVR-MS files by Windows Media Center from DVB-T.
I convert it by DVRMS2MPG utility from DVRMS2MPGToolbox to MPG PS,
with option "convert to MPG by ffmpeg" ( I do not trust to offerred commercials autocutters).

( CLIs are simplified )

dvrms2mpg /if="source.dvr-ms" /of="intermediate.mpg" /act="ffmpeg" /p=16384 ( p parameter was generated )

Then I fix the A/V sync of produced .mpg file as adviced by ProjectX. I am choosing export to TS, not familiar with other options.

java.exe -jar ProjectX.jar intermediate.mpg -tots -out M:\wfwa -name "final.ts"

Finally I let Avidemux to index TS when loaded.

Main questions are:
Is TS output from ProjectX the best one for Avidemux ?
Is ProjectX step necessery ?
Can A/V sync be done by dvrms2mpg
(looks like making heavy processing, showing some stream errors, in opposite to ProjectX, that shows no errors/warnigs ?)

What are recommended steps for MeGUI / Avisynth processing ?
Maybe DirectShowsource + AVS A/V sync abilities ?

LoRd_MuldeR
30th August 2009, 19:43
Main questions are:
Is TS output from ProjectX the best one for Avidemux ?

TS (Transport Stream) is for transport/broadcast and contains a lot of error resilience stuff. For local processing PS (Program Stream) should be more suitable.

Is ProjectX step necessery ?

Only if the MPEG stream contains error, because Avidemux doesn't have any error handling.

Stream captured from DVB are likely to have errors, but if no problems pop up without ProjectX, then no need for ProjectX ;)

What are recommended steps for MeGUI / Avisynth processing ?
Maybe DirectShowsource + AVS A/V sync abilities ?

When processing MPEG sources with Avisynth, DGIndex/DGDecode is highly recommended!

Also you should try FFVideoSource before you fall back to DirectShow...

Poutnik
30th August 2009, 20:38
TS (Transport Stream) is for transport/broadcast and contains a lot of error resilience stuff. For local processing PS (Program Stream) should be more suitable.
I know about TS intention and I would choose the PS instead. I could not see PS option in Project X to create PS,
but I can be blind totally ;) .
I have tried also demuxing, but was not able to add MP2 audio track to Avidemux.

Only if the MPEG stream contains error, because Avidemux doesn't have any error handling. Stream captured from DVB are likely to have errors, but if no problems pop up without ProjectX, then no need for ProjectX ;)

Thats is just why I do it ;)
I did not yet try ( or at least not sure if did and was not satisfied ) to reencode by Avidemux the intermediate MPG, produced by dvrms2mpg.
But file info for video length / audio length is same for this mpg and original dvr-ms, so I am afraid encoding this MPG would not help.
For TS produced by ProjectX it differs and encoding TS produces synced encodes.

When processing MPEG sources with Avisynth, DGIndex/DGDecode is highly recommended!
Also you should try FFVideoSource before you fall back to DirectShow...

I am used to it in MeGUI, when I was processing mpg captures from Analog TV card, that did not suffer with sync problems.
But dealing with DVR-ms processing overhead, it seems to be too many steps... ;)

Interesting, I have never heard about FFVideoSource, thank for the tip.

LoRd_MuldeR
30th August 2009, 21:52
I know about TS intention and I would choose the PS instead. I could not see PS option in Project X to create PS, but I can be blind totally ;)

I think the "M2P" option in ProjectX means "MPEG-2 Program Stream" ;)

Poutnik
30th August 2009, 22:23
Thanks. Until recently I did not processed mpeg2 related stuff,
so I am not familiar with all extensions and filetypes, theyare still little tricky to me :-)

mgh
31st August 2009, 06:41
audio-video sync issues normally originate from the source and correcting the source usually solves the problem. projectx is one of the tools that does it for mpeg1 and mpeg2.
problem free playback does not mean that the source is problem free.

LoRd_MuldeR
31st August 2009, 14:08
Also note that even if the source is "good", the initial audio delay must be set correctly. Avidemux defaults to "0 ms" (see the "shift" box), so you usually need to adjust that for proper sync!

In my experience the most reliably tool to detect the initial audio delay of MPEG-2 captures is DGIndex. Avidemux also shows the delay under "Audio" -> "Main Track", but doesn't seem to be accurate :(

stax76
31st August 2009, 15:18
Maybe DVBViewer -> StaxRip

Poutnik
5th October 2009, 06:25
I have tried dvr-ms converting by DVR2MSToolbox and fixing by ProjectX,
and processing by DGIndex before Avisynth processing.

For slight DVB-T disturbances it works.
But for more frequent it ends with up to 30-50s out of sync for 90min movie.

For Analog TV processing, I was used to Timestratch AVS function to fix it.
The problem is, the sync divergence is rather randomly stepwise than proportional,
so proportional sync fix by timestratch is not applicable.

So, for now, Directshowsource("*.dvr-ms") seems to be
the only easy solution for me.
There are some disturbances, but it gets resynced.

I will try FFVideoSource, have found it just now...
But not sure, if the gain will be worthy to abandon
straightforward dvr-ms - Directshowsource - AVS - X264 processing.

sure, ideal approach is to use a good outdoor antenne.
But living in rented place, it is not an option for now.[/QUOTE]