PDA

View Full Version : WMV2AVI without recompression


arty
12th January 2005, 14:03
First, sorry for my bad english.

I tried to convert a wmvhd file into an avi file, keeping the original video and audio file. ( these wmv_hd files can be downloaded from http://www.wmvhd.com/ (wmvhd.com) )

I used graphedit, rendered the file (xy.wmv) deleted all the opened filters except the file itself, opened AVI Mux directshow filter and file writer. Connected the pins, and rendered the AVI with the PLAY btton.

When I tried to play the file in a player, only some frames showed up(5-6 from the 500), the audio went fine - so, I opened the AVI in Virtualdub 1.6.3, and remuxed the AVI(direct stream copy(audio+video)). Now the video played at half the speed of the audio ... :( then I tried to remux the avi in vdub changing the video frame rate ( selected the radio button : "Change so video and audio durations match" ), this way the video became ~46.06 (2x23.976) FPS, and plays OK ... ( I had to convert the sound (wma to wav) too ... )

Is this ok? Now I have an AVI file, which has an info (in gspot, divxg400, every player) of 46.06FPS which plays at 23.976 (measured with FRAPS). Why this fps "doubling" in virtualdub needed ?

Is there anybody who tried this wma2wav process (without recompress)?

( Important: the wmv9/vc-1 vfw codec is needed for processing in vdub! - http://download.microsoft.com/download/9/8/a/98a6cb2d-6659-485e-b1f9-2c0d9bf6c328/wmv9VCMsetup.exe )

Koepi
12th January 2005, 15:12
Yes, I tried it. The result is simple: the files are stored as VFR (variable framerate) inside that wmv (asf) file which means that an image isn't exactly lasting 40ms (in PAL country that is).
It would be possible to store that in other containers as well, but the only one especially developed with vfr in mind would be mkv.

maybe you should give that a try.

Cheers
Koepi

arty
13th January 2005, 21:30
thank you koepi ... I am not familiar with matroska, is there any direct tool, or should I use the graphedit way ?

I have an AVI file(video FOURCC is WMV3), if I watch it while measuring the FPS with FRAPS, I see that, at a totally black picture the FPS goes down to 0. The audio continues and when the picture changes, the FPS goes up to 24 (normal). Is it VFR or is it something else?

stephanV
13th January 2005, 21:50
dont use the AVIMux filter in graphedit, that does weird things

you can use the matroska muxer from gabest in graphedit and you can also mux the audio in it that way. then afterwards you can open it in VirtualDubMod and save it as AVI.

you could also connect a WAV dest (without decoder)to the audio stream to make a WMA.wav

(note that VBR WMA wont work in AVI)

small question: why do you wanna do this?

arty
13th January 2005, 22:21
stephanV : thanks for the idea!! (wmv -> mkv -> avi) - so i should use graphedit ... ok :)

I need it, because:
- in an AVI container I can store .ac3 audio
- more audio track can be used
- I got some dvd with HD-WMV content(so sad T2 is DRM-ed), the audio is WMA :( - can not listen to through s-pdif (well, I could, with my soundstorm onboard soundcard by reencoding on the fly... )
- I downloaded lots of wmvhd content, I want to store them in the usual AVI, easier to cut, edit, etc. - don't you think ?

stephanV
13th January 2005, 22:51
while you can try avi first of course... if the stream really is VFR, AVI wont handle that nicely. In that case you can still keep matroska (it can do ac3 and more audio tracks too)

but first, try the AVI way :)

arty
14th January 2005, 13:06
wow, everithing worked perfectly! - as you adviced ... vdubmod was complaining about VFR but the resulted AVI plays fine, even with audio ...

my last prob is I get a 2 channel wav only, not a 6 channel ...

It seems the wmv audio decoder only outputs to 6ch under wmp9/10 :( not in mplayerclassic or graphedit ... ( I use winxp ).

I know from other topics, foobar2k can decode a 6ch wma to 6 wavs but how can I get a .wma fom a .wmv container? :)

Yong
14th January 2005, 13:17
Originally posted by arty
...but how can I get a .wma fom a .wmv container? :)

You can use Windows media file editor to extract the audio streams.(or stream editor, sorry can't remenber the name...:p ) this tool is bundled with Windows media encoder (http://www.microsoft.com/windows/windowsmedia/9series/encoder/default.aspx):)

stephanV
14th January 2005, 13:18
are you sure you deleted the decoder in graphedit?

foobar can also open MKA (i think), so maybe if you mux just the audio in matroska?

wmv muxing tools i dont know about.


edit: yong know better than me about this MS stuff :)

Yong
14th January 2005, 13:30
Originally posted by stephanV
are you sure you deleted the decoder in graphedit?

foobar can also open MKA (i think), so maybe if you mux just the audio in matroska?

wmv muxing tools i dont know about.

Matroska warpped WMA? if you play it with foobar2000, this audio player will complain:
"...Missing ACM codec...etc..."


edit: yong know better than me about this MS stuff :)

WME and some similar programs is my favorite tools:)

arty
14th January 2005, 13:40
Yong, thx.. I will check this WME - jesus, how I hate ms style apps, like movie maker etc :)

I cannot even find the open wmv menuitem :D

Yong
14th January 2005, 13:46
@arty:
for me, movie maker is a cr@p:p

arty
14th January 2005, 13:54
Ok, I gave up ... I need to open a profile to open a file ??? What kind of logic is it? I tried some profs, but can not find anything related to extract streams :(

And why is 23.976 often 23.980 in WMV ??? I am now very frustrated ...

Yong
14th January 2005, 14:03
@arty:
Please try another programs, File editor or stream editor...
That one you opened may be is profile editor...
I wish you Good luck:)

stephanV
14th January 2005, 16:45
i dl and tried it. you can do it with Windows Media stream editor, it should be in the utilities dir of start-->programs--->wmencoder :)

arty
14th January 2005, 23:23
yeah, I tried the encoder itself ... :(

stream editor works ok, but my problem is now with vdubmod's MKV reading ... when I try to save the AVI from the MKV the screen gets like.. aa.. uh ... when I seek to a not_keyfreme in a video :) - I can not explain ... :) maybe a screenshot will come :)

is there any tool other than graphedit (you said AVIMux is bad) and Vdub Mod to process MKV ? ( I use vdubmod 1.5.10 )

stephanV
14th January 2005, 23:34
you mean it gets all distored until the next keyframe? there might be no way to fix that... but of course, your not gonna seek every 3 seconds while watching a movie...

you could also try avimux GUI, although i think it will refuse it.

arty
15th January 2005, 08:52
yes... disorted :)

it gets disorted when I just play... not when I seek ... :( the mkv is OK, the problem is with vdubmod ... in mpc the mkv plays fine, in vdubmod it gets disorted (when I press the play INPUT video button for preview).

AVIMux works well... IT handles .mkv, writes correct AVI - now I continue to my destination stream: AVI+2xAC3 :D

THANKS FOR THE IDEAS!

arty
16th January 2005, 11:56
so I summarize what I did:

- rendered the WMA in graphedit, and modified the graph:
video: xxx.WMV -> Matroiska Muxer -> File writer
audio: xxx.WMV -> DMO WMA Audio decoder(?) -> WAV Dest. -> File Writer

- pressed <play>, I got xxx.mkv, xxx.wav :)

- audio reencode to anything (mp3 or ac3 .. whatever u like)

- opened the xxx.mkv and the xxx.mp3 in AVIMux 1.16.11, and muxed them into an AVI container

- the resulting AVI plays fine in everything :)

(honestly: I didn't reencoded wma audio to wav, I exhanged it with an xxx.ac3 from my dvd source, changed the video framerate in virtualdub to 25fps - you know I live in europe (PAL))

Thank you very much : StephanV, Yong, Koepi!

stephanV
16th January 2005, 14:03
if the WMA is CBR you dont need the WMA decoder in the filter graph.

Yong
18th January 2005, 11:22
Originally posted by stephanV
...(note that VBR WMA wont work in AVI)...

Not only the VBR WMA, CRB also cause the A/V out of sync,
fortunately WME provided another audio profile called Low-delay CBR.
This low-delay CBR codec will solve the A/V out of sync problem in AVI or Matroska container.;)

stephanV
18th January 2005, 13:47
hmmm, i havent noticed any synch problems with CBR audio in AVI and no problems whatsoever in Matroska...

ill take you word for it though :)

Yong
19th January 2005, 12:07
Well, if you transmuxing WMA VBR or CBR mode audio with Matroska muxer(haven't try with AVIMux) in graphedit to Matrosak container, i'm sure you will never encounter the A/V out of sync problem(same as [mencoder -oac copy -ovc copy] transmuxing).

I was always use the Nic's WMA2WAV (http://files.divx-digest.com/software/encode/Wma2wav.zip)(strange, not found in the nic's website, seems removed:p), easy to do batch converting;) or use it with Virtualdub/MOD,
but only problem-free with Low-delay CBR mode:)

arty
31st January 2005, 08:18
It was a 5.1 channel wma/320kbit (don't know cbr or vbr)... I haven't found any sync problems, and I exchanged the wma(wav...) with an ac3 stream at last :)

Yong
31st January 2005, 11:40
Originally posted by arty
It was a 5.1 channel wma/320kbit (don't know cbr or vbr)... I haven't found any sync problems, and I exchanged the wma(wav...) with an ac3 stream at last :)

Try this asfview (http://www.microsoft.com/windows/windowsmedia/format/ASFViewer.aspx) , it can check ASF/WMA/WMV and MP3 fiels properties
, but supported OS is:
Windows XP Professional, Windows 2000 Professional, Windows Server 2003,
too bad, M1cr0$0ft is ":devil:"

arty
2nd February 2005, 07:55
thx, Yong... I will use it next time.