Log in

View Full Version : 1280x720p MPEG2 HDTV .ts -> Xvid 1280x720-HD + AC3 Asych problem


lelik67
26th October 2006, 01:11
Trying to convert 1280x720p MPEG2 HDTV broadcast .ts file to Xvid 1280x720-HD + AC3 .avi file using HDTV 2 XviD guide by Semec.

End reult is Audio & Video gradualy go out-of-synch problem.

Original .ts file has no synch problem (tested with Zoom player).

Here's the process:

1) Creating D2V project file with DVD2AVIT3

2) Creating AviSynth project file:

Loadplugin("D:\AVIsynth 2.5\plugins\mpeg2dec3.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\decomb521.dll")
Loadplugin("D:\AVIsynth 2.5\plugins\undot.dll")
mpeg2source("D:\your_project.d2v")
SelectEven()
Decimate()
UnDot()

3) Frameserve AviSynth script to VirtualDubMod (Fast Recompress)

set Codec to Xvid MPEG-4
set Quantization type: to MPEG
set Encoding type: Twopass
Set Interleave audio every 1 frame(s)


Any suggestions? :confused:

CWR03
26th October 2006, 06:32
In VirtualDubMod in Framerate settings there's an option to "Adjust framerate so audio and video lengths match."

Koepi
26th October 2006, 07:28
This is a general problem with DVB-conversions and not at all xvid related. Moving to appropiate forum.

G_M_C
26th October 2006, 09:26
Trying to convert 1280x720p MPEG2 HDTV broadcast .ts file to Xvid 1280x720-HD + AC3 .avi file using HDTV 2 XviD guide by Semec.

End reult is Audio & Video gradualy go out-of-synch problem.

Original .ts file has no synch problem (tested with Zoom player).

Here's the process:

1) Creating D2V project file with DVD2AVIT3

[...]



Dont know if that will be your solution, but DVD2AVI has been repalced with DGIndex, because DVD2AVI makes errors. Read this too: http://forum.doom9.org/showthread.php?t=87809

And i'm not an expert on the Decimate() command, but could Decimate be removing frames and making syncing a problem ?

lelik67
26th October 2006, 15:36
CWR03,

Thanks, will try that.

G_M_C,

SelectEven will reduce frame rate to 29,97 fps
Decimate will reduce frame rate to 23,976 fps
UnDot will remove small noise and raise compressability

Turtleggjp
26th October 2006, 19:24
Are you making any cuts or edits on the video clip? I've had trouble before getting audio and video to sync after making several cuts (cutting out commercials) when I preserve the audio in its original form, usually AC3. And no, using those two filters for dropping the frame rate should not cause any problems.

lelik67
29th October 2006, 15:51
Original .ts file has no a/v sync problems.
No commercials were cut out of the file.
Converted to .mpg still no a/v sync problems
Loaded to DGIndex instead of DVD2AVI -> timestamp reported 1:29:00

Used following avs to load to VirtualDubMod:

LoadPlugin("C:\path\to\DGDecode.dll")
LoadPlugin("C:\path\to\TIVTC.dll")
LoadPlugin("C:\path\to\FDecimate.dll")
MPEG2Source("file.d2v")
FDecimate()

VirtualDubMod reports
Video as 1:29:02.50
Audio as 1:29:00.768

When Audio/Video interleaving options:
- inerleave every 32ms (every 1 frame also was tried)
- audio block plasement: preload 500ms before vide starts
- offset audio to maintain a/v sync
- cut audio when video ends

After 20 min of the movie a/v is noticeably out of sync

I haven't tried yet CWR03 suggestion to change in VirtualDubMod in Framerate settings an option to "Adjust framerate so audio and video lengths match."

Wouldn't it change the framerate from a desirable 23,976 fps?

Turtleggjp
29th October 2006, 23:17
Sounds to me like there are glitch(es) in your .ts file. I've never known DGIndex to handle glitches very well. I would say try running you file through ProjectX first. This should give you a .m2v file (video only) and an audio file (AC3 most likely). These two files should be in sync. I have seen a few exceptions to this, but usually ProjectX handles glitches very well. Once it is done, use DGIndex to index the .m2v file, and proceed as before. ProjectX tends to just rip out an entire GOP if it encounters a glitch, so you may end up with a missing piece of your video (which probably would have been messed up anyway due to the glitch), but it will also cut the audio and insert silence as necessary to keep things in sync.

Oh, and as for the adjusting framerate trick, I used to do that all the time with my analog captures to make up for the extra "dropped" frames inserted when I captured the video, but I have never had to use it with HDTV captures. If you are almost 2 seconds off after an hour and a half of recording, then something else is definitely wrong, and adjusting frame rate will most likely just cause the file to go in and out of sync.

Blue_MiSfit
29th October 2006, 23:27
Might wanna give MPEG Streamclip a try. It's a great freeware tool for working with MPEG containers.