Windows Media: WMV 9 & WMA 9.2 etc

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Locked
meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Windows Media: WMV 9 & WMA 9.2 etc

Post by meRobs » Sat Oct 15, 2011 5:51 pm

[Updated 17 Nov 2012]

Windows Media formats (WMV and WMA) are proprietary (Microsoft). Although WMV is generally packed into the ASF container format, with the WMV extension, they can also be put into the MKV or AVI containers. One advantage of a WMV file is that there are more consumer devices that suit it, although, its proprietary nature fails it, it is not MPEG4 compatible and there are not many options available to tweak.

In principle at least, MediaCoder offers WMV7, WMV8 and WMV9 on the video tab. While Windows Media Video 7 and 8 codecs were comparable to MPEG-4 ASP in terms of visual quality, Windows Media Video 9 seems to be regarded as comparable to H.264 Main and High Profile. However, H.264 is more consistently able to yield better picture quality because it supports multiple reference frames and reference B-frames, etc. Also, H.264's quality advantage is typically more evident at low bitrates.

For audio, MediaCoder offers WMA7, WMA8 and WMA9, with the latter being version 9.2, by default. Like AAC and Ogg Vorbis, WMA was intended to address perceived deficiencies in the MP3 standard. Given their common design goals, it's not surprising that the three formats ended up making similar design choices. According to Wikipedia, one independent test conducted in May 2004 at 128 kbps showed that WMA was roughly equivalent to LAME MP3 yet inferior to AAC and Vorbis. In another, independent test, it was found that at very low bitrates (20 to 64 kbps), WMA 9 seems better than MP3 via LAME version 3.93. But as the bitrate increases, the difference shrinks, and at 128kbps the quality is similar.
It may be that Windows Media Player 11 needs to be installed for MediaCoder to convert to WMA 9.2!?

Contents
1. Tests in x86 builds to 5191
2. Tests in x64 builds to 5295
3. Conclusion

1. Tests in x86 builds to 5191

In 2009, ‘rhycos’ (viewtopic.php?f=17&t=7617&p=23310&hilit ... 399#p23310) pointed out that build 4399 was the latest version that encodes to WMV9 with WMA 9.2 (WMA9). In Oct 2011, this still seemed to be the case until build 5191. With this build I was able to encode to WMV9 with audio as WMA 9.2. The Properties window displays the video as WMV3 and the audio as WMA, which is confirmed in MediaInfo as WMV 9 with WMA 9.2 (see below).

Over the previous two years, I had checked the occasional build to see whether WMV9/WMA was possible. In my attempt in Oct 2011, I found success with build 5191 and decided to do a survey of older builds. To this end, I applied two Presets to builds 5002, 5100, 5135, 5140, 5175, 5185, 5190 and 5191.
Each Preset was constructed from a Starter Preset (see: viewtopic.php?f=17&t=8131), which has advantages over File > Revert All Settings.
Preset 1: for WMV9 with WMA 9.2
Video tab: Format/Encoder/Source = WMV9/WM Encoder/MEncoder
Audio tab: Format/Encoder/Source = WMA9/WM Encoder/Auto Select (encoder at defaults)
Preset 2: for WMV8 with PCM (~WAVE)
Video tab: Format/Encoder/Source = WMV8/FFmpeg/MEncoder (encoder at defaults)
Audio tab: Format/Encoder/Source = PCM/ FFmpeg /Auto Select
In both cases, Picture tab had Resize and Frame rate as ‘Original; the Container was ASF with the Multiplexer disabled; and the audio was set for 44.1 kHz.
Source File: the source file was a 100-sec VOB in NTSC (720x480 with AC3 audio).

Preset 1 for WMV9/WMA worked for build 5191 and failed in all other builds (above). In MediaInfo, the video was displayed as WMV3 Windows Media Video 9 and the audio as WMA version 2, Codec ID 161 and Windows Media Audio 9.2.

On the other hand, Preset 2 for WMV8 worked in all the above builds except 5190 (“missing rwresample-0.dll”) and was much quicker. In MediaInfo: video was WMV3 Windows Media Video 8 with audio as PCM.

Some Observations: in early builds, such as 5002, a click on the video Encoder tab, for example, opened a dedicated Windows Popup giving choice for WM Video and Audio. Later, MediaCoder made use of a Settings window that seemed to involve Internet Explorer without actually opening that browser. This window failed to open in builds 5100 to 5130, sometimes causing MediaCoder to crash with an apology. In builds 5135 to 5185, the window opened, but attempts to encode gave an error: “ Internet Explorer cannot download wmcfg …”. This bug was corrected in builds 5190 and 5191, yet the former failed to give WMV9/WMA9 due to an unspecified error.

By the way, in at least some of the above builds, but not 5191, it was possible to convert to WMV9 with audio as PCM (much the same as Wave)!

All the above tests were done in a PC with Windows XP SP3 and a dual-core CPU at 2.67 GHz with a 2 GB RAM.

Comments

After completing the above survey of builds, I tried Preset 1 (for WMV 9 & WMA 9.2) in build 5196 and it failed. I also tried FFmpeg and AviSynth as Source, instead of MEncoder, and they failed as well. So, I went back to some of the other builds and found that success or failure was not reproducible. On one occasion, build 5135, which failed previously, gave the correct WMV output, even though it took a long time, about 1140 sec for the 100-sec source file, 5 times slower than success in build 5191. On the other hand, build 5191 was not always successful; it failed twice in four attempts.

I then tried another short source file, a 60-sec VOB in PAL. In build 5191, it also failed twice in four attempts. Also, an FLV source file failed to convert on two attempts in 5191.

For each failed attempt, the CPU usage for both the decoder and encoder rapidly dropped to 0% shortly after the start of processing. And shortly thereafter an error message appeared, stating: “The decoder seems to be blocked …” and, then, after a countdown, a second message: “There is one or more errors in transcoding process …”. Obviously, if MediaCoder had not been monitored during processing, the first message would have been missed. Sometimes the first message refers to the encoding thread instead.

The exception was build 4399. Each of four attempts for WMV 9 with WMA 9.2 with the 100-sec VOB source file worked, taking about 220 sec to complete. Also, the second VOB source file and the FLV both converted successfully in this build.

2. Tests in x64 builds to 5295

As of build 5290, I changed to the use of x64 builds of MediaCoder because they are faster than the x86 builds in a Win7 PC and the Xvid/AVI Preset using the Xvidcore encoder works for large files – it doesn’t in the x86 builds. For this Guide, I examined the ability to create WMV files in builds 5130, 5200, 5230, 5290 and 5295 (all x64).
Preset 1, for WMV9 with WMV9.2, failed to output.
Preset 2, for WMV8 with PCM worked.

The use of ADPCM, WMA-7 and WMA-8

I also tried Preset 2 (defined in Section 1) with the audio changed to ADPCM, WMA-7 or WMA-8.
This worked in all x64 builds from 5130 to 5295 for all 3 formats.

Whereas, the setting of ADPCM as the audio format was accepted in builds up to 5290, its selection in builds 5292 and 5295 triggered the message “This format is unlikely to be supported by the encoder”. This message also appeared whenever WMA-7 or WMA-8 was set. Fortunately, the chosen audio encoder (FFmpeg) did support these formats, in all cases.

As a result, I changed the Preset for WMV, given in the Encoding Guide (viewtopic.php?f=17&t=9643) to WMV-8 video with WMA-8 audio.

3. Conclusion

Whereas, WMV8 with the audio as PCM. ADPCM, WMA-7 or WMA-8 is easily achieved in most builds of MediaCoder, WMV 9 with WMA 9.2 is possible in only some of builds and, even then, its success seems intermittent. In the above tests, occasional success occurred in builds 5135 and 5191.

As of build 5295, it looks as if the most reliable approach for conversions to WMV (ASF) is to set the video as WMV-8 video with WMA-8 audio.
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

meRobs
Expert
Expert
Posts: 3116
Joined: Tue Jun 23, 2009 2:45 pm
Location: Sydney, Australia

Re: Windows Media: WMV & WMA

Post by meRobs » Sat Oct 15, 2011 6:02 pm

This Topic has now been added to the Tips & Guides section in the hope that it will be if use to those users that want to encode to WMV.WMA.

To this end, please add a new Post to the Basic Discussions forum with any constructive comments or if you find fault with what is expressed.
Thanks.
Have you checked out the Tips & Guides for MediaCoder? Try: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Also, get older builds at: http://www.videohelp.com/tools/MediaCoder/old-versions#download

Locked