Log in

View Full Version : Transcoding WMV-HD.


Splashdriver
6th December 2007, 18:38
Hi,

first of all, I like to thank all the developers of the wonderfull x264 codec for their hard work and dedicating (and all the people who've been around for testing purposes). Since I've decided to exchange Xvid for x264, I've never went back (Allthough Xvid is not a bad codec, it's just that x264 is better, way better:D). I'm very content at the moment, so keep up the good work!

Now here's the following. I've downloaded a HD clip from Microsoft's website (All clips are their for free, so I guess I'm not violating any rule, right?). This movie is in .wmv format. Now, I would like to transcode this clip to a x264 format and mux it into a .mkv container. Unfortunately, I cannot find any appropriate tool to convert this file decently into x264 (mkv).

I've tried "Allok Video to MP4 Converter", and although it's not too bad qualitywise (profile Baseline@L1.3, 1 ref frame is being used) but it doesn't have any ability to let one acces or customize various parameters through advanced settings (like MeGui).

I like to do this for experimental purposes. Is there anybody around here who knows how to do transcode this stuff to x264?

Although I've done numerous encodings with x264 (simply lurking around could really adds value to ones knowledge;)), I still consider myself quite newbe, so talk understandable language please.

Thanks in advance.

ps. sorry for the long intro, just wanted to be clear.

Sagekilla
6th December 2007, 19:22
Hi,

first of all, I like to thank all the developers of the wonderfull x264 codec for their hard work and dedicating (and all the people who've been around for testing purposes). Since I've decided to exchange Xvid for x264, I've never went back (Allthough Xvid is not a bad codec, it's just that x264 is better, way better:D). I'm very content at the moment, so keep up the good work!

Now here's the following. I've downloaded a HD clip from Microsoft's website (All clips are their for free, so I guess I'm not violating any rule, right?). This movie is in .wmv format. Now, I would like to transcode this clip to a x264 format and mux it into a .mkv container. Unfortunately, I cannot find any appropriate tool to convert this file decently into x264 (mkv).

I've tried "Allok Video to MP4 Converter", and although it's not too bad qualitywise (profile Baseline@L1.3, 1 ref frame is being used) but it doesn't have any ability to let one acces or customize various parameters through advanced settings (like MeGui).

I like to do this for experimental purposes. Is there anybody around here who knows how to do transcode this stuff to x264?

Although I've done numerous encodings with x264 (simply lurking around could really adds value to ones knowledge;)), I still consider myself quite newbe, so talk understandable language please.

Thanks in advance.

ps. sorry for the long intro, just wanted to be clear.

For me, my typical workflow goes like this when I'm working with a WMV source file (Like the ones from microsoft's website)

Avisynth script:

DirectShowSource("video.wmv")
FiltersHere()

Use it as the source for x264 to transcode the video, then open that avisynth script with VirtualDubMod and under "Stream List," demux the audio and (optionally) transcode it using the BeLight frontend for BeSweet. After all that, mux to mkv using mkvtoolnix for mkvmerge.

I -THINK- you can use Avisynth + VirtualDubMod to demux the audio, I'm not sure.

Splashdriver
6th December 2007, 20:04
Thanks for replying so fast.

Unfortunately, as soon as I try to open the .avs file, both vdubMod and MeGui are generating the following error message:

Avisynth open failure:
DirectShowSource: Renderfile, the filter graph manager won'talk to me
(C:\xx\input.avs, line 1)

Maybe I'm using an older avisynth version (as far as I know there's only Avisynth version 2.5 installed on my pc):confused:

I just need to know how to transcode this thing like I would do with MPEG2 video and I'll be happy after all.

Sagekilla
6th December 2007, 21:12
Thanks for replying so fast.

Unfortunately, as soon as I try to open the .avs file, both vdubMod and MeGui are generating the following error message:

Avisynth open failure:
DirectShowSource: Renderfile, the filter graph manager won'talk to me
(C:\xx\input.avs, line 1)

Maybe I'm using an older avisynth version (as far as I know there's only Avisynth version 2.5 installed on my pc):confused:

I just need to know how to transcode this thing like I would do with MPEG2 video and I'll be happy after all.

It may have to do with the fact that you don't have the proper codec installed. What version of windows media player do you have? You'll need one of the latest versions (11 I think) to correctly decode WMV-HD.

Splashdriver
6th December 2007, 22:03
It may have to do with the fact that you don't have the proper codec installed. What version of windows media player do you have? You'll need one of the latest versions (11 I think) to correctly decode WMV-HD.


I do have WMP 11 installed. Even though this application is installed on my system, I rarely use it. I rather playback media-files with MPC or KMplayer:D (btw, I can playback any WMV-HD file in WMP 11 without a problem)

I've really searched my *ss off, but I still can't find any guide about it. What to do next?

qyot27
6th December 2007, 23:00
Granted, the only WMV-HD material I've worked with was the Robotica clip from MS' website, but ffdshow worked with it fine. If you've got WMV9 and WVC1 set to libavcodec in the video decoder configuration then DirectShowSource should work without issue.

And as far as DirectShowSource goes, it may just be my own paranoia about it working against me, but I usually use convertfps=true just to make sure the audio remains synced.

For demuxing the audio from WMV files, you can actually use the Windows Media Stream Editor (part of the Windows Media Encoder suite). Of course, if you're serving the file into VDubMod via AviSynth, then you'll need to use Save WAV... in the Streams List area and then just process the audio as usual using your converter of choice (which you'd probably have to do anyway, seeing as how using the Stream Editor would give you a WMA file).

Sagekilla
6th December 2007, 23:01
I do have WMP 11 installed. Even though this application is installed on my system, I rarely use it. I rather playback media-files with MPC or KMplayer:D (btw, I can playback any WMV-HD file in WMP 11 without a problem)

I've really searched my *ss off, but I still can't find any guide about it. What to do next?

Hm, that's very odd. Which trailer did you get from Microsoft's website?

Edit: Also, what avisynth version are you using? Using a simple DirectShowSource("Coral_Reef_Adventure_1080.wmv") I could decode the video perfectly in VDM, play it on mpc through the avs, or encode it with x264. Also, you'll need to find an alternate method of grabbing the audio from the file because I could only get 2 channel PCM in a .wav file using VDM, so you'll pretty much lose the surround sound audio unless you do something else.

Splashdriver
7th December 2007, 00:00
Hm, that's very odd. Which trailer did you get from Microsoft's website?

Edit: Also, what avisynth version are you using? Using a simple DirectShowSource("Coral_Reef_Adventure_1080.wmv") I could decode the video perfectly in VDM, play it on mpc through the avs, or encode it with x264. Also, you'll need to find an alternate method of grabbing the audio from the file because I could only get 2 channel PCM in a .wav file using VDM, so you'll pretty much lose the surround sound audio unless you do something else.

You probably missed it, but like I previously said, I'm using Avisynth version 2.5 (if that is what you mean). That is the only folder I could find in my "Program Files".

It's the robotica clip which I've downloaded from the Microsoft website, by the way.

I don't care about the audio that much in this case, because I do have alternatives for that ;)

Maybe I should reinstall avisynth and retry previously described frame-serving method? :confused:

Sagekilla
7th December 2007, 03:55
You probably missed it, but like I previously said, I'm using Avisynth version 2.5 (if that is what you mean). That is the only folder I could find in my "Program Files".

It's the robotica clip which I've downloaded from the Microsoft website, by the way.

I don't care about the audio that much in this case, because I do have alternatives for that ;)

Maybe I should reinstall avisynth and retry previously described frame-serving method? :confused:

Well I meant specific version of avisynth, there's a few variants of 2.5 but I'm not sure if that should make a difference. You can try uninstalling it and installing the latest Avisynth version and see if that fixes the problem. Otherwise, I'm sorry I can't help you to that extent, only the way detailing how to transcode from wmv to x264

qyot27
7th December 2007, 17:38
What response does AviSynth give you when you run a script that only contains Version() - if it isn't AviSynth 2.57, then you might have to update.

Also, try my prior suggestion about letting ffdshow handle WMV decoding with libavcodec. Even though I don't have WMP 11, the Robotica clip still decodes just fine (although my computer is simply not powerful enough to handle playing it back - but it can be converted without issue). Just make sure it's a recent build of ffdshow (http://sourceforge.net/project/showfiles.php?group_id=173941&package_id=199421&release_id=469925), go to Start->Program Files->ffdshow->Video decoder configuration and ensure both WMV3/9 and VC-1 are being decoded by libavcodec (in the Codecs section of the config screen). If not, click where it says 'disabled' and change it to libavcodec with the drop-down menu that appears. Worst-case scenario is that the system codecs that WMP 11 comes with take higher priority than ffdshow, in which case you just need to raise ffdshow's priority (or so I would assume) using the Merit slider under the DirectShow control section of the config.

Another thing to note is that the Robotica clip has 16:9 AR flags set in it, although this is probably already obvious. So either tell MKVMerge to use 16:9 and keep the real resolution the same (or downscaled to whatever base dimensions you prefer), or resize it to an actual 16:9 ratio before encoding.

buzzqw
7th December 2007, 17:52
you can also try AutoMen, that use mencoder as encoder

BHH

Splashdriver
8th December 2007, 07:03
What response does AviSynth give you when you run a script that only contains Version() - if it isn't AviSynth 2.57, then you might have to update.

Also, try my prior suggestion about letting ffdshow handle WMV decoding with libavcodec. Even though I don't have WMP 11, the Robotica clip still decodes just fine (although my computer is simply not powerful enough to handle playing it back - but it can be converted without issue). Just make sure it's a recent build of ffdshow (http://sourceforge.net/project/showfiles.php?group_id=173941&package_id=199421&release_id=469925), go to Start->Program Files->ffdshow->Video decoder configuration and ensure both WMV3/9 and VC-1 are being decoded by libavcodec (in the Codecs section of the config screen). If not, click where it says 'disabled' and change it to libavcodec with the drop-down menu that appears. Worst-case scenario is that the system codecs that WMP 11 comes with take higher priority than ffdshow, in which case you just need to raise ffdshow's priority (or so I would assume) using the Merit slider under the DirectShow control section of the config.

Another thing to note is that the Robotica clip has 16:9 AR flags set in it, although this is probably already obvious. So either tell MKVMerge to use 16:9 and keep the real resolution the same (or downscaled to whatever base dimensions you prefer), or resize it to an actual 16:9 ratio before encoding.

Thanks for the suggestions. All ffdshow (I allways grab the latest from www.free-codecs.com) settings were allready put like mentioned above. Still, when trying to playback the script in MPC, I can only hear the sound, no video whatsoever. The Robotica clips (or any WMV-HD file) plays fine in any media-player though.

Current Avisynth version: 2.57, build: Dec 31 2006

@ buzzqw

Thanks for the hint. I've tried that, but I think would rather stick to MeGui.

Has123
8th December 2007, 15:44
Try this version of Avisynth http://www.free-codecs.com/AviSynth_download.htm
and download the latest alpha. Hope this will help.

qyot27
8th December 2007, 17:44
Thanks for the suggestions. All ffdshow (I allways grab the latest from www.free-codecs.com) settings were allready put like mentioned above. Still, when trying to playback the script in MPC, I can only hear the sound, no video whatsoever. The Robotica clips (or any WMV-HD file) plays fine in any media-player though.
A) Are those settings also set in the VFW side? Not that I think it would do anything as DirectShowSource has nothing to do with that, but for completeness' sake.

B) When playing those clips regularly, is ffdshow the one doing the decoding, or is it the system codecs? You might have to raise ffdshow's priority to get it to do so, like I mentioned before. I seem to remember (somebody point out the thread if you know what I'm referring to) reading something around here about there being a change in how things like WMV are handled with the advent of WMP 11, and this might be the cause of the AviSynth troubles. Setting ffdshow to a higher priority would, as far as I can tell, eliminate the issue.

Splashdriver
8th December 2007, 22:43
A) Are those settings also set in the VFW side? Not that I think it would do anything as DirectShowSource has nothing to do with that, but for completeness' sake.

B) When playing those clips regularly, is ffdshow the one doing the decoding, or is it the system codecs? You might have to raise ffdshow's priority to get it to do so, like I mentioned before. I seem to remember (somebody point out the thread if you know what I'm referring to) reading something around here about there being a change in how things like WMV are handled with the advent of WMP 11, and this might be the cause of the AviSynth troubles. Setting ffdshow to a higher priority would, as far as I can tell, eliminate the issue.

A)I don't quite understand what you're saying.

B)FFdshow is almost decoding everything on my system, including WMV/VC-1 formats. The merit is also set to be the highest, and there isn't much more that I think of, since I've been searching for the solutions for weeks now.

I guess it's probably a problem with WMP 11 :-(

qyot27
9th December 2007, 06:11
A) Make sure those formats are set to libavcodec in the Start->Programs->ffdshow->Video encoder configuration dialog. Then see if it works.

Alternately (and I hesitate here) you can try FFmpegSource (http://forum.doom9.org/showthread.php?t=127037) or a combination of VirtualDub 1.7.6 and the WMV plugin (http://fcchandler.home.comcast.net/~fcchandler/Plugins/WMV/index.html) for it. I know for a fact that the VDub combo will open the Robotica clip, but I don't know if the issue about frames and audio sync that it had were fully corrected. You'll just have to test it and see.

If FFmpegSource works though, then you may just have to use ffmpeg itself to transcode to a different format, like Huffyuv. And then subsequently use that file to encode to H.264.

And one thing which hasn't been asked thus far, are you using XP or Vista? I'm not sure of the ramifications there since I've done barely any work with Vista, but maybe someone else has and can figure it out.

Splashdriver
9th December 2007, 15:19
The previously mentioned formats are all set to 'livavcodec', but a simple .avs scripts still outputs an error in Vdub (1.7.6) and VdubMod (1.5.10.2). Something like 'No video stream found' and there it stops.

The wmv plugin does allow vdub to open up wmv files and I can select ffdshow video codec, convert it to HuffYUV (The filesize is really big though, almost 10x bigger:eek:) and recompress that file to h264.

Thank you.

Ps. My OS is XP.