Log in

View Full Version : converting wmv to xvid w/o sync issues how ??


cjaar
8th February 2008, 06:38
Am looking for a reliable way to convert wmv(non-protected) to xvid. I tried with megui, but the audio came way out of sync!

my avs
-------
a = DirectShowSource("D:\DL\New Folder\New Folder (2)\VTS_01_1.WMV",fps=25, audio=false)
b = DirectShowSource("D:\DL\New Folder\New Folder (2)\VTS_01_2.WMV",fps=25, audio=false)
c = DirectShowSource("D:\DL\New Folder\New Folder (2)\VTS_01_3.WMV",fps=25, audio=false)
d = DirectShowSource("D:\DL\New Folder\New Folder (2)\VTS_01_4.WMV",fps=25, audio=false)
alignedsplice(a,b,c,d)
crop(0, 114, 0, -108)
Undot()
Lanczos4Resize(624,304) # Lanczos4 (Sharp)
Undot()

MPC says its 25FPS so i used 25. Opened the avs in vdub and saved the audio to wav. then converted to mp3. The total time of audio/video matchs, but some part of the movie is in sync and some not.

Did a serch here, found that mux to MKV, then get timecode etc.. which I coudnt follow! google didnt help much. I want to try with megui, gk, not any boalt-wares.
Any better ways ?

thanks
cjaar

martino
8th February 2008, 20:36
Considering the fact that most WMVs come as VFR, you only have two options really:

1) Convert the framerate to CFR. So use something like:
DirectShowSource("C:\EvilWMV.wmv",converfps=true,fps=something)

2) Retain VFR and mux into a container that supports it, like MKV or MP4.
WMV in .wmv
This may be slightly tricky. Either you use ffmpegsource() to encode to a lossless AVI (since WMV reading isn't 100% guaranteed to be frame accurate) and encode workraw/other stuff from that, or you use GDSMux to transmux to a MKV, which you then handle with mkv2vfr (see above).
Brief GDSMux primer:
1) rightclick the input area and hit "add source", find your .wmv and hit OK
2) rightclick the audio stream, choose "encode" and pick "PCM"
3) click the output button and select where to save the mkv
4) hit start
5) wait.
This will give you a VFR MKV with uncompressed PCM (WAV) audio.
Source: http://forums.animesuki.com/showthread.php?t=34738

Both will ensure a/v sync, if done correctly of course.

20-40
8th February 2008, 21:30
martino's advice is one to follow. I use similar line in my .avs for ages; starts as:

DirectShowSource("G:\capture\show2512.wmv", FPS=23.976, ConvertFPS=True)
ConvertToYV12()
Deblock()
... and some heavy filtering afterwards.
I need joining video and audio tracks... IF you need only video - KILLaudio() after source line(s).

cjaar
9th February 2008, 05:14
martino, thanks for the help, will try that, meanwhile i found that vdub1.7.7 supports wmv with fcchandler's plugin, i tried a small clip, looks audio/video in sync.

Is there any tool, to check what the wmv is hving, VFR/CFR ?
tried gspot, didnt show any :(

20-40
9th February 2008, 09:05
MediaInfo
http://mediainfo.sourceforge.net
shows 1000 fps for instance.

martino
9th February 2008, 14:11
Is there any tool, to check what the wmv is hving, VFR/CFR ?
tried gspot, didnt show any :(
Remux to MKV as described in my post, demux the timecodes and see from that. However in most cases it almost certainly will be VFR.

Other than that, I'm not really aware of any WMV tools that could get you the information simpler.

cjaar
11th February 2008, 12:09
martino, yes convertfps=true, did the trick.

what could be a better way to get sharp image for wmv->avi.
I see less details and looks washout. Read somewhere that better resize to double the res, then sharpen it, de-noise and resize back to normal.

here is my avs

a = DirectShowSource("D:\DL\New Folder\New Folder2\VTS_01_1.WMV",fps=25, ConvertFPS=True, audio=false)
b = DirectShowSource("D:\DL\New Folder\New Folder2\VTS_01_2.WMV",fps=25, ConvertFPS=True, audio=false)
c = DirectShowSource("D:\DL\New Folder\New Folder2\VTS_01_3.WMV",fps=25, ConvertFPS=True, audio=false)
d = DirectShowSource("D:\DL\New Folder\New Folder2\VTS_01_4.WMV",fps=25, ConvertFPS=True, audio=false)
alignedsplice(a,b,c,d)
#crop(0, 114, 0, -108)
crop(0, 116, 0, -108)
#Tweak(bright=25)
Undot()
HybridFuPP(1440,704, resizer = 5, preset = "very high", E_Str_X= 20, E_Str_Y = 20, deblock=true, dering=true)
#Lanczos4Resize(720,352) # Lanczos4 (Sharp)
#Lanczos4Resize(1440,704) # Lanczos4 (Sharp)
Convolution3d("movieHQ")
#Unfilter(15, 20)
#asharp(2,4,1)
Undot()
Lanczos4Resize(640,324) # Lanczos4 (Sharp)

The whole wmv filesize is 1G with 1044kbps for video, am trying for the 1.2G with hvsbest matrics.
still its not sharper! any better way to get more sharper image ?

Ranguvar
11th February 2008, 18:11
still its not sharper! any better way to get more sharper image ?
Use a sharpener.

LimitedSharpenFaster, SeeSaw, aWarpSharp, try them all.