View Single Post
Old 23rd March 2007, 08:15   #1  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
WMCmd.vbs WME9 script update released - 10/11/07

I'm starting a new thread devoted to WMCmd.vbs script updates (as the old one was more about the WVC1 beta codec package).


WMCmd.vbs
Windows Media Encoder Command Line Script Utility

Disclaimer: Although I do work for Microsoft, please understand that this is not an official Microsoft update. WME9 is considered a legacy product so it's unlikely there will be any official WMCmd.vbs updates coming from Microsoft in the future.



The latest version was released on October 11, 2007. You can download it here:


What is it?
Windows Media Encoder 9 Series is best known as a standalone encoder application, but it actually shipped with an entire encoder SDK that allowed 3rd parties to develop their own WM encoder interfaces. A proof-of-concept command-line utility written in VBScript and based entirely on the encoder SDK was included with WME9. That is WMCmd.vbs. When run from the command-line with cscript.exe, this utility provides all the power and (most of the) features of WME9 to the advanced user who prefers the speed and robustness of a command-line encoder.

Why an update?
The original script was released with WME9 in 2002. No subsequent updates to WME9 (such as the x64 release) updated the script, but as updates to the codecs were released through new WMP and WM Format releases, it became obvious that changes to the old script were necessary to get the most out of the new codecs.

What's new?
The updated WMCmd.vbs added support for WVC1 (WMV9 Advanced Profile) encoding, WMA10 Professional encoding, advanced WMV9 settings, AviSynth input, better progress reporting, additional metadata support, revised documentation, video quality presets, etc. The full changelog is posted here and here.


Requirements:
  • Windows Media Encoder 9 Series or its SDK
  • Windows Vista users should also download and install hotfix KB929182 before using WMCmd.vbs.
  • Although WME9/WMCmd.vbs will work with both WM Format 9 (WMP9) and WM Format 9.5 (WMP10) codecs, it is recommended that you update to the latest WM Format 11 codecs, currently available for download in XP and included in Vista. Advanced video encoding settings will only work with v11 codecs.

Full command-line help: http://www.citizeninsomniac.com/WMV/WMCmd.txt (also available when you run "cscript.exe wmcmd.vbs" without any arguments)


Changelog:

10-11-2007:
-----------
  • Added -v_qp option as an alternative to -v_quality for 1-pass VBR encoding (which is in fact a fixed QP encoding mode). Whereas -v_quality uses an abstract 0 to 100 scale, -v_qp maps directly to quantizer parameter values in the 1.0 to 31.0 range (in 0.5 increments).
  • Encoder registry settings are now removed immediately after the encoder session is started because the codec only reads them once at the beginning of the encode so there's no reason for them to hang around until the end of the encoding session. This ought to improve parallel encoding jobs interoperability too.
  • The script no longer indiscriminately destroys existing encoder registry settings. At the beginning of each encoding session it saves the existing registry settings and then restores them at the end. This improves usability in cases where one set of advanced encoder settings is set externally (manually or via PowerToy) while another is used from the command-line.
  • Deprecated -v_percopt in favor of new -v_adz option because valid range for -v_percopt didn't make much sense. -v_percopt will continue to work as before but it is no longer documented. -v_adz value range now matches that of "Perceptual Option" (Adaptive Dead-Zone) in WMV9 PowerToy. If both -v_percopt and -v_adz are specified, -v_percopt values will override -v_adz values.
  • Redefined and fully documented -v_preset quality presets. They should now better reflect their speed and quality rankings.
  • Made -v_compopt 1 into an Advanced Profile exclusive option because some of its components were exclusive to Advanced Profile. It's best to be on the safe side.

5-21-2007:
----------
  • Added -log option for redirecting all text output to a file.
  • Updated some descriptions for advanced video settings.
  • Added a FAQ section to this release document.

4-14-2007:
----------
  • IMPORTANT CHANGE: Remapped -v_mslevel (Motion Search Level) values to correctly reflect the codec implementation. 0 is now the default luma search and 3 and 4 are adaptive chroma modes.
  • Added an -a_input option that allows specifying an alternative audio source to the one present in the main -input source. This makes it possible to use separate video and audio source files from the command-line, as it's always been possible in the WME9 GUI.
  • Updated the documentation, expanded sections on dquant and perceptual optimization options. Very useful options for preserving fine detail.
  • Fixed a bug where simultaneous encoding jobs would get simultaneously killed as soon as one encoding job finished.

3-22-2007:
----------
  • Added a -v_preset option that introduces 5 intuitive video quality presets:
    Fast, Good, Better, Best and Insane. Unlike the -v_compopt 1 preset that is defined within the codec, -v_preset values are defined in the script and can be easily changed and refined in future versions.
  • Added -v_complexity as an alias for -v_performance expressed on a 0-5 scale.
  • Fixed bug that sometimes caused the script to hang or overwrite certain parameters when an external configuration file (-config) was loaded.
  • Improved the unknown source duration workaround by having the script automatically add the new file extension (like Avisynth .avs) to the list of formats WMP is allowed to play. No more security dialogs on first launch!
  • Added profile compliance checking for advanced WMV9 settings - will not set certain registry keys if Simple or Main profiles are selected.
  • Added code to check if WMEncoder object is initialized correctly before proceeding with encode.
  • Removed the -help? option which launched WME9 CHM help file from cmd line.
  • Removed old Complex Profile (CP) support entirely - translates to AP now.
  • Changed Lookahead maximum value to 30.
  • Updated the documentation, corrected some vague and erroneous descriptions.
8-25-2006:
----------
  • Fixed a bug in configuration saving (-s_config) and loading (-config) functions that prevented command-line parameters containing quotation marks from being processed correctly.
  • Added code to check whether specified video profile (-v_profile) is supported by the video codec used (-v_codec). For example, can't use SP or MP with WVC1.
5-19-2006:
----------
  • Added support for WVC1 encoding (WMV9 Advanced Profile video codec).
  • Added support for WMA10 Professional low-bitrate encoding and changed WMA codec identifiers to be version-agnostic (i.e. WMASTD instead of WMA9STD)
  • Added command-line parameters for advanced video settings otherwise exposed only through the registry. For details, see: http://www.microsoft.com/windows/win...dsettings.aspx
  • Added support for Avisynth (.avs) script sources and worked around a related duration bug in the source plugin.
  • Rewrote the encoding progress screen so that it estimates encoding time, ETA and encoding speed.
  • Added command-line parameters for music centric metadata such as album, track number, release year, genre, etc.
  • Added metadata summary to the output screen.
  • Added documentation for the new advanced video settings to the inline help.
  • Reorganized inline help documentation and grouped settings in a more intuitive way.
  • Fixed bug where encoder script would sometimes hang at the end of encoding process.
  • Improved error handling for bad source files.

Last edited by zambelli; 11th October 2007 at 09:36.
zambelli is offline   Reply With Quote