A/V synch errors after encoding



Hi everyone. I use a leadtek DTV2000H to capture tv shows, and then encode them to XviD, and I am having A/V synch problems with the final file. The strange thing is, I am ONLY having these issues with digital captures. Whenever I capture off analog (composite input), the files come out excellent.
I have tried using the stock WinFast PVR program to capture, and also PowerCinema, no help. I am currently using Ulead VideoStudio 10 to edit the commercials out of the shows, and then I encode them to XviD + MP3 using AutoGK. The originally captured .mpg files, and the .mpg files produced after editing have no issues, however the final .avi’s do. The video and audio are in synch at the beginning of the video, and get out of synch as the video progresses. The same combination (Ulead VS10 / AutoGK) work perfectly with the composite captures though.
What could be happening, and what can I do about it?

Thanks in Advance.


Run GSPOT against one of your problem files, and post the results here so I can take a look.


Maybe you could fix them using VirtualDub.

Or it is an CBR vs. VBR problem?!


Thanks harley2ride,
I can’t seem to find an option in GSpot export a log, or anything like it, so I’ve just included a screen dump from GSpot.

(that appears to still be a link to the file on my computer, I don’t know how else to put the picture here though).

@chef, I have yet to test CBR (I only ever use VBR), however, I have tried to use the original audio option in AutoGK (the recordings contain AC3), and the synch errors still occur, so I think it may have more to do with the video codec. If it is possible to fix them using VirtualDub, how would I go about that?



Try to copy and paste it, if you can’t figure out how to link it in.


omg, I can’t believe I didn’t see the attach files option down the bottom. anyway, here it is. thanks for ur help.


You say when you capture using composit cables it works fine. What are you doing when it doesn’t work?

Also have you tried saving your audio as mp3 or ac3?


If you’re capping it digitally save the transport stream and then encode…


for one thing, 720x400 isn’t really a standard. I’m assuming you’re in the NTSC world (29.97 fps) and it should be 720x480. Your audio is in PAL format of 25 fps. That could explain the audio synch issue.

misread the picture… still could be something to look into though


No, Daemonicus, I’m in the PAL world, so the source should be 720x576 @ 25 fps, however the file in GSpot is the avi produced after encoding so I think the resolution has been changed to squared pixels. I have noticed that short videos are fine, however, the longer the video goes for, the more out of synch it gets by the end.

At the moment I am trying encoding to DivX instead of XviD, to see if that helps. I have considered capturing as TS, however I cannot import that into VideoStudio to edit out the ads, so if anyone can tell me how to do it, I’d certainly like to try it.



ok, encoded to DivX, again using AutoGK, but this time leaving the original AC3 Audio intact, same result, with the final video being out of synch (strangely enough, by the exact same amount). Here is the GSpot for the new file.
When playing back the .mpg, the audio and video are perfectly in synch throughout the 40 odd minutes, however, being an MPEG-2 with ac3 audio, it is a space hog. Any ideas on what I could try? The transport stream idea suggested by Diizy seems promising, however I don’t know how I would edit these.


Demux the stream into video and audio (eg. with tmpgenc) and then use a proper authoring tool to insert them and author, the tools should set video and auio correctly to fit together.

If it wont work, run the audiostream through besweet.


@ madnessss
Use DGIndex to demux sound and save it as a project.
Use Avisynth to import in into VirtualDub to edit using the project file.


Unfortunately, I don’t own TMpgEnc, and, pardon my ignorance, but I don’t know what constituted a proper authoring tool.

And to top off my incompetence, I don’t know how to use AVISynth either, so I will try Diizzy’s method (I assume you mean from a TS recording), but until I know how to use AVISynth, I will use AutoGK, up until the VirtualDub (actual video encoding) step, then abort, and perform that step myself, using Virtual Dub to edit the video first.

Hopefully this will work.

Thanks for your help, and your patience with what must seem like stupidity on my part.


a freeware TS editor would be HDTVtoMPEG2. You can edit out unwanted stuff, then save out as either .TS, or convert to MPEG2. You then should be able to convert to whatever format fairly easily. I use Procoder 2 to go from TS to DivX, WMV, DVD, etc to encode just the video, using the original demuxed audio from the TS file as the audio for the new format… but there are many encoding options available via freeware apps.


TMPGEnc is available as trial version.


Success, finally. Using TMPGEnc (thanks Chef), I took the raw .mpg, edited it in the program, and encoded it within the same program. Only bugbears are that I encoded to DivX instead of XviD (although it does have custom option for XviD, which I am yet to try), and that it took WAY longer than expected (2 1/2 hours for a 1 hour tv show, 2 pass encoding, compared to less than 1 hour for AutoGK), but at this point, I am beyond caring about these tiny quirks, and I am yet to toy with the settings to try and improve them.

I didn’t get a chance to try the TS methods, as I hadn’t yet captured any shows in TS, and I already had a backlog of .mpg’s sitting on my hard drive.

Thanks for all your help everyone.

Also a question, am I supposed to be cutting only at keyframes, or will any frame do?


Keyframes, because they hold the whole picture.

Otherwise tiny or big re-encoding would be necessary.


ok, thnx, perhaps that’s what I was doing wrong the entire time.

Will try my old software again cutting only at keyframes, and see if that helps them. If it still doesn’t work, then I’ll just stick with TMPGEnc.