View Full Version : WMCmd.vbs WME9 script update released - 10/11/07
Cr4z33
26th October 2007, 15:53
OK I am trying since 1 month already to create my first WMV-VC1 conversion. :mad:
I have a x264 MKV with AC3 audio and when running the script I always get that annoying
Prepare to encode failed with error -1072886856 etc, etc...
Is there finally a fix for it?
Here is the command line I used:
cscript.exe WMCmd.vbs -input casino.avs -output casino.royale.dvd9.720p.bluray.VC1.ITA.wmv -v_codec WVC1 -v_mode 0 -v_bitrate 30846740 -v_bframedist 1 -v_dquantoption 3 -v_loopfilter 1 -v_lookahead 16 -v_mmatch 1 -v_mslevel 1 -v_msrange 0 -v_mvcost 1 -v_buffer 15000 -v_bdeltaqp 1 -v_performance 80 -a_codec WMAPRO -a_mode 0 -title "casino.royale.dvd9.720p.bluray.VC1.ITA" -a_setting 640_48_6_24
buzzqw
26th October 2007, 16:12
without knowing the script and the decoder used is very difficult to give any help
i suggest to reencode from original vobs to wmv and not pass for a x264/mkv file
BHH
Cr4z33
27th October 2007, 18:17
without knowing the script and the decoder used is very difficult to give any help
i suggest to reencode from original vobs to wmv and not pass for a x264/mkv file
BHH
Hmm and what if I get an already done English VC-1 movie and want to replace the audio track only? Would I still get all those errors?
I have the Italian AC3 track.
Oh and by the way I tried everything on a clean XP partition with only the needed stuff just to be sure I wouldn't have any problem, but that didn't help. :(
buzzqw
28th October 2007, 07:28
post the avs...
also try encoding the avs using windows media encoder
BHH
Cr4z33
28th October 2007, 09:01
Thanks for the help, but I give up.:thanks:
Beastie Boy
14th November 2007, 12:19
I'm looking to transfer some HD-DVDs onto my home network to play on an X-Box 360. Since I am saving to Hard Disk and not DVD, file size is not so important. Therefore I assume that 1-pass quality based VBR would be the best option.
What I am looking for is a command line that will give me good quality at 1080p, whilst still being compatible with the X-Box.
The settings I have so far are:
-v_codec WVC1 -v_mode 2 -v_peakbitrate 18000000
With those settings I get a speed of around 0.1x which I am happy with. Are there any settings I should use that would give either a quality increase or space saving without having a massive impact on speed?
Also, does -v_peakbitrate work with -v_mode 2 and is 18000000 the correct value for the X-Box?
Many thanks in anticipation.
Cheers, Beastie.
zambelli
21st November 2007, 03:04
I would recommend against using mode 2 (quality VBR). It's impossible to predict the bitrate peaks and buffer size with that mode.
Instead, use mode 4 (peak constrained VBR) or mode 0 (CBR). 15Mbps is probably a good starting goal. Check out the -v_preset option of WMCMd for quality/speed optimizations.
But before you re-encode, I would suggest looking into just re-muxing the elementary video stream into a WMV file. Most HD-DVDs are VC-1 encoded, so re-encoding them to VC-1 doesn't make much sense if you're not concerned about file size. Re-encoding the audio to WMA Pro and simply copying the video stream would make more sense.
Beastie Boy
21st November 2007, 08:11
Many thanks for your reply.
I like the idea of using the original video stream, but I just have 2 questions:
Are WMVs read from a HDD processed the same way as a HD-DVD read from the add-on drive? What I mean is, are there different restraints placed on the peak bit rate and buffer size, and if so, how can I tell if the original vc1 stream is compliant (other than trying it of course).
Secondly, how do I go about it? I have the video stream with a .vc1 extension. Is it simply a matter of renaming this to .wmv and using the MS stream editor to mux it with my WMA file? I will try this tonight and report back.
Thanks again.
Cheers, Beastie.
Edit: I found this post (http://forum.doom9.org/showthread.php?p=1044191#post1044191)which outlines a method to mux vc1 to wmv. I'll give it a go.
Meilo
21st December 2007, 06:34
I have a problem with -v_msrange using WMCmd.vbs.
When using 2 pass (vbr, peak+vbr and cbr) AND -v_msrange 0 i get garbage. All the other settings work ok (tried them all...). avs script is quite simple, source + 1 noise filter. 1 pass cbr/ quality vbr work ok.
Using WMV PowerToy + WMEncoder (same settings as with WMCmd) and same avisynth script works ok too.
this is the line that works :
-v_codec WVC1 -v_mode 4 -v_bitrate 2000000 -v_peakbitrate 12000000 -v_complexity 4 -v_loopfilter 1 -v_mmatch 0 -v_bframedist 1 -v_mslevel 2 -pixelratio 40 33 -videoonly
if I add -v_msrange 0 video is just garbage.
ACrowley
26th December 2007, 11:55
Strange
After a fresh Xp Install i cant encode WVC1 2pass VBR Peak!
Everytime the 1pass reaches only ~90% and then the 2pass starts. Sometimes 2pass is only up to ~90% too
So the output Video is corrupted .
I tried it with different Sources/wmcmd.vbs Versions, fresh WMenc install etc etc...the same Problem.
And its not a Avisynth/Plugin Problem..
CBR Mode works fine
Strange ??! I made dozens of 2pass VBR encodes wqith my currect Setup and i didnt changeg anything.
Maybe its a cmd.exe or cscript error ?
cscript.exe c:\windows\wmcmd.vbs -input g:\t.avs -output d:\t.wmv -v_codec WVC1 -videoonly -v_mode 4 -v_preset good -v_bitrate 9000000 -v_peakbitrate 12000000 -v_peakbuffer 10000 -log g:\log.txt
C:\Programme\Windows Media-Komponenten\Encoder>cmd /k cscript.exe c:\windows\w
md.vbs -input g:\t.avs -output d:\t.wmv -v_codec WVC1 -videoonly -v_mode 4 -v_
eset good -v_bitrate 9000000 -v_peakbitrate 12000000 -v_peakbuffer 10000 -log
\log.txt
Microsoft (R) Windows Script Host, Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. Alle Rechte vorbehalten.
Microsoft (R) Windows Media Encoder Command Line Script Utility
Copyright (C) Microsoft Corporation. All rights reserved.
Warning: Encoder failed to retrieve duration attribute from source plug-in.
Trying alternate method now......
Source duration retrieved: 33,408 seconds.
======== Begin Pass1 ========
Read: 33,3s (99,8%) Elapsed: 00:01:19 Left: 00:00:00 [0,42x]
======== Begin Pass2 ========
Encoded: 33,3s (99,6%) Elapsed: 00:06:20 Left: 00:00:01 [0,09x]
======== Encoding Completed ========
Video :
Codec: Windows Media Video 9 Advanced Profile
Expected bit rate: 9000000 bps
Average bit rate: 8928202 bps
Expected fps: 23,976
Dropped frame count: 0
Total coded frames: 801
Average sample rate: 23,975
Dropped bytes: 0 bytes
Total bytes: 37254957 bytes
Overall:
Encoding time: 471 seconds
Average bit rate: 8928202 bps
File size: 37365288 bytes
File duration: 33,4 seconds
C:\Programme\Windows Media-Komponenten\Encoder>
Rash
29th December 2007, 23:07
I am on Windows Vista and after some Updates (from Windows Update) I can't encode any 2-pass mode anymore. The script will quit when the second pass begins returning no error messages (like it has finished encoding properly).
So WMV encoding is completely broken for me. :(
Opuz Klass
2nd January 2008, 16:22
I have a problem with -v_msrange using WMCmd.vbs.
When using 2 pass (vbr, peak+vbr and cbr) AND -v_msrange 0 i get garbage. All the other settings work ok (tried them all...). avs script is quite simple, source + 1 noise filter. 1 pass cbr/ quality vbr work ok.
Using WMV PowerToy + WMEncoder (same settings as with WMCmd) and same avisynth script works ok too.
this is the line that works :
-v_codec WVC1 -v_mode 4 -v_bitrate 2000000 -v_peakbitrate 12000000 -v_complexity 4 -v_loopfilter 1 -v_mmatch 0 -v_bframedist 1 -v_mslevel 2 -pixelratio 40 33 -videoonly
if I add -v_msrange 0 video is just garbage.
I'm also having that same problem.
ANY 2-pass encodings (CBR and VBR) with WMCmd.vbs turns into garbage if I add -v_msrange (doesn't matter if I set it to 0, 1, 2, 3 or 4).
zambelli and benwaggoner can you help us? :)
M10
4th January 2008, 13:56
Zambelli,
I have enjoyed using the WMCmd scripts for many months now... I was wondering, will this tool support the new VC-1 professional SDK which was recently released? It sounds like this new SDK will incorporate improvements in the codec (particularly in the speed department) which would be nice to have!
Thanks.
buzzqw
4th January 2008, 15:09
the vc1 sdk , imho, replace wmvcmd.vbs
the only problems (with nic build) so far seems due to some options and the missing of audio facilities
for audio you must supply a profile and is missing (or broken) 5.1 ch support
BHH
M10
4th January 2008, 18:22
the vc1 sdk , imho, replace wmvcmd.vbs
the only problems (with nic build) so far seems due to some options and the missing of audio facilities
for audio you must supply a profile and is missing (or broken) 5.1 ch support
BHH
Interesting--from my very brief reading it seemed the VC-1 professional SDK to be primarily codec update, replacing the encoder in the previous encoding engine. Is there full scripting support included directly in the new SDK, replacing the wmcmd? I was under the impression that I might be able to use my wmdcmd scripts, but get the benefits of an improved underlying codec...
Anyway, maybe others can further enlighten me...as long as I get the better/faster encodes I'll be grateful...
bluesk1d
9th January 2008, 15:07
I'm also having that same problem.
ANY 2-pass encodings (CBR and VBR) with WMCmd.vbs turns into garbage if I add -v_msrange (doesn't matter if I set it to 0, 1, 2, 3 or 4).
zambelli and benwaggoner can you help us? :)
If you have any updated news on this can you post it in the dedicated thread I started? This is so annoying! http://forum.doom9.org/showthread.php?t=133587
Opuz Klass
9th January 2008, 17:59
bluesk1d,
I still have no news. Unfortunately zambelli is MIA... :)
benwaggoner
9th January 2008, 23:06
bluesk1d,
I still have no news. Unfortunately zambelli is MIA... :)
We're all just getting back from vacation, FYI.
Although it's an odd problem - I've encoded with that combination many times, and I've never seen that issue.
sbcale
30th March 2008, 01:05
I just reformatted my quad core and now my encodes are very slow. My dual core runs at about 0.07x and my quad core used to run at 0.14x but now it can only muster 0.05x?? Does anyone have any idea why it would be going so slow now? It is driving me crazy.
:thanks:
benwaggoner
31st March 2008, 03:25
What OS? What WMP version?
And are you doing multiple bitrate encoding? If so, install this Hotfix:
http://on10.net/blogs/benwagg/20600/
Schrade
31st March 2008, 06:56
What OS? What WMP version?
And are you doing multiple bitrate encoding? If so, install this Hotfix:
http://on10.net/blogs/benwagg/20600/
Hrm.. does that hotfix work on Server 2003?
sbcale
31st March 2008, 14:08
What OS? What WMP version?
And are you doing multiple bitrate encoding? If so, install this Hotfix:
http://on10.net/blogs/benwagg/20600/
OS is XP and WMP version is the latest 11. I am doing Quality VBR encoding.
That hotfix sounds about right. It seems like I am using only one of the four cores.
Update 1:
Well I tried the hotfix and no luck. My encode is still moving along at 0.04x. None of my cores are maxed out either, they are hovering between 50-85%. I thought that fix would be it. I can't think of any major difference between my dual core machine and quad core one and the dual core machine is spanking it.
Update 2:
Well, I just tried CBR encoding and my encode is better than with the QVBR. It started out slow at 0.07x then went up to 0.15x and now it is slowly moving back down to around 0.1x. All four cores were 90-100% when it was around 0.15x and now they are all over the place as the speed continues to drop, it is 0.09x now. I installed the hotfix and restarted the computer so I am not sure what is going on with my encodes, frustrating....
Thank you so much for the help, any other help or insight would be greatly appreciated!
benwaggoner
31st March 2008, 14:08
Hrm.. does that hotfix work on Server 2003?
It's a hotfix to the WMP 11 .dll, which doesn't install on Server 2003. It would work on 2008 though.
sbcale
1st April 2008, 12:00
What OS? What WMP version?
And are you doing multiple bitrate encoding? If so, install this Hotfix:
http://on10.net/blogs/benwagg/20600/
Is there a problem only with quad cores? My dual core machine is flying and both cores are 90-100% when encoding with Windows Media Encoder.
Update
Well my quad core is worthless for WMV encoding. I am using wmcmd.vbs and TMPGEnc Xpress and both are running like they are on a P3 on my quad core machine. It is taking me 20+ hours for a WMV VBR encode of a dvd on the quad core where it is taking 4ish hours or less on any one of the 3 dual core machines I have tried. I guess I will have to buy a new core 2 processor for my machine until the quad core works properly with wmv encoding... :(
benwaggoner
3rd April 2008, 23:10
Is there a problem only with quad cores? My dual core machine is flying and both cores are 90-100% when encoding with Windows Media Encoder.
Update
Well my quad core is worthless for WMV encoding. I am using wmcmd.vbs and TMPGEnc Xpress and both are running like they are on a P3 on my quad core machine. It is taking me 20+ hours for a WMV VBR encode of a dvd on the quad core where it is taking 4ish hours or less on any one of the 3 dual core machines I have tried. I guess I will have to buy a new core 2 processor for my machine until the quad core works properly with wmv encoding... :(
Quad core SHOULD be working just fine. I do quad-core all the time under both XP and Vista.
Given all those products use the WM Format SDK .dll files, I'd reinstall WMP or Format SDK and see if that changes anything.
kevo777
4th April 2008, 02:46
Okay. I'm getting a weird thing happen after having to re-install Windows XP.
I'm running SP2, AviSynth 2.57, and I've re-installed Windows Media Encoder 9 along with Zambelli's updated WMCmd.vbs file.
Whenever I invoke an AVS script I get a endless list of...
MPEG 1.0 layer II, 192 kbit/s, 48000 Hz Stereo
http://clip2net.com/clip/m6239/1207273228-wmcmd-49kb.png
I can't be certain, but I think this was happening before I re-installed XP. My reasons for the install were merely boredom and laziness. My system has always run very stable. I re-installed Windows Media Encoder 9 and AviSynth and did re-installs on both. I even tried the WMF11 Runtime. Has anyone ever seen this before?
Confused......
EDIT:
Oh...and all encodes are unsuccessful. I get...
Encoder Error: 0xC00D002E
Error occurred in transcoding: Error Code = 0xC00D002E
I am highly, highly confused and have no idea what to do next. I have uninstalled and reinstalled everything I can think of. :-(
UPDATE:
What's most annoying about this (besides the obvious) is that MPEG-I Layer 2 audio, 192 kbps, 48000 HZ has nothing to do with anything that I can see. I've set my audio parameters in a batch file to "-a_setting 64_44_2". I've uninstalled and reinstalled ffdshow. I've uninstalled and reinstalled WME9. I've uninstalled and reinstalled AviSynth. I've stood on one foot and balanced a bowl of fruit on my nose while juggling three bowling pins. Nothing.....has......worked!
I'm at a complete loss.
RESOLUTION:
Turns out WMCmd.vbs does not like "-a_setting 64_44_2" even though that is the default audio setting. I changed it to "a_setting 96_44_2" and all is well.
RESOLUTION UPDATE:
It's not WMCmd.vbs that doesn't like "-a_setting 64_44_2". Last night the problem came back out of thin air. I think...I think...WMCmd.vbs isn't getting along with the updated AviSynth plugin NicAudio 2.0. When I switched back to the previous NicAudio version the problem went away on the exact same script. Man...this problem has really beat me up. I'm surprised no one else has posted about it.
sbcale
4th April 2008, 16:58
Quad core SHOULD be working just fine. I do quad-core all the time under both XP and Vista.
Given all those products use the WM Format SDK .dll files, I'd reinstall WMP or Format SDK and see if that changes anything.
I tried removing wmp and the wm format SDK I had on it and putting them back on many times. I even removed wmp and just installed the wm format SDK and reinstalled XP from scratch. I am going to buy a new core 2 duo and swap it out for the core 2 quad and see if that does it. If it works with only the cpu change that should be telling. Thanks for the help.
sbcale
10th April 2008, 12:59
Quad core SHOULD be working just fine. I do quad-core all the time under both XP and Vista.
Given all those products use the WM Format SDK .dll files, I'd reinstall WMP or Format SDK and see if that changes anything.
Well I just popped in an Intel Core 2 Duo E8400 Wolfdale 3.0GHz and my WMV encodes are back up to the 0.14x area with both cores 99-100%. I had the hot fix installed and everything, the only thing that changed was the processor. It seems to me that there is still a problem with the quad core Q6600 and WME. Is anyone else seeing this?
benwaggoner
10th April 2008, 19:32
Huh. No idea what's going on there, but I'm glad it's resolved itself.
Have you tried the Expression Encoder 2 Beta? I'd like to confirm you're not seeing that issue with it.
the_fry
18th April 2008, 10:29
Maybe what I'm gonna post is just common knowledge, but I though I might share this with the community as my workaround is a bit of a dirty hack and I would like to hear your opinion on it.
Szenario:
I'm converting an Video-DVD to WMV using Avisynth and wmcmd.vbs.
I converted the AC3 5.1 track to 6 mono wavs and then used wavavimux to create a surround AVI. Then I used an AVS script as video (only) source and the surround AVI as an audio source for wmcmd.
A simplified version of my AVS (just to show that I'm not using any special AVS plugins that might cause the problem) LoadPlugin("DGDecode.dll")
MPEG2Source("mainfilm.d2v")
This technique works alright but has one major drawback: The length of the AVS isn't properly determined.
Warning: Encoder failed to retrieve duration attribute from source plug-in.
Trying alternate method now.
..
Source duration retrieved: 0 seconds.
wmcmd (or my guess: wmplayer) has a problem determing the playlength of the video only AVS. Although I can play the AVS in wmplayer! On the other hand the playlength of the surround AVI audio source is just plainly ignored.
The encoding works alright but I wont get those fancy percentage statistics displayed during encoding ;)
My workaround: I included the simple stereo downmix of the AC3 track in the AVS. This does the trick for length determination and gets ignored by wmcmd as I still explicitly specify the surround AVI as audio source for wmcmd.
It works alright but is just not making me entirely happy. Including two different audio sources just for proper length determination strikes me dirty :mad:
Any clues?
ACrowley
30th April 2008, 12:36
Warning: Encoder failed to retrieve duration attribute from source plug-in.Trying alternate method now.
This warning is totally normal and no Problem.
@sbcale
I ve the same Problem with Vista x64 Sp1 and my Q6600 Quad!
I cant get full usage of the 4 Cores with full Load...it takes more Time as my old DualCore ,Strange.
Same Settings, proper Codec/Software/Hotfix Setup etc etc. Same problem with all WM11 SDK Encoders like wmcmd.vbs ,TMPGEnc and ProCoder!
Only 50-60% CPU Usage...Dont know why ?!
However..I dont use (W)VC1 Codec anymore for my 1080p encodes ,only H264,and when i need VC1, i use Mainconcept Reference 1.11 with the VC1 Pro Codec from Mainconcept...works great in perfect Quality and faster Speed with 100% CPU Load.
Also you can save the VC1 Output to asf Container or to elementary and its fully Compliant for Bluray/HDDVD:)
When youre a lucky guy and you can use Mainconcepts encoder...give it a Try.
Or you can try VC1 Encoder SDK builds from Kurtnoise and Nic or the new Microsoft Expression Studio 2
Ytterbium
2nd May 2008, 09:09
I found my quad don't load up 4 core properly as well.
I did fine one thing wrong,
the Force NumThreads regkey was set to 1.
however I'm still only getting 70% ish
ACrowley
3rd May 2008, 08:22
I found my quad don't load up 4 core properly as well.
I did fine one thing wrong,
the Force NumThreads regkey was set to 1.
however I'm still only getting 70% ish
i tried it with NumThreads 4 ...same Result
Ah, i tried the MS Expression Studio 2 Encoder .. Full load on all Cores..mhh, but encoding takes a long Time for a few Hundred frames.
Theres no fps Display in Status Window so i dont know
However, when i need VC1 ,i will stick with Mainconcept Reference 1.11
xsictransitx
5th May 2008, 18:49
Hi,
I am hoping someone can help me with this, I am just learning this AVS / WMCMD / NicAudio etc stuff and I would like to work this way if possible, allow me to explain.
I am currently converting all my HD movies to WVC1 for streaming to the 360 and it works perfectly. What I was doing with movies with DTS was using Tranzcode to get 6 mono wavs, then use convert those to AC3 with BeSweet then use that in WMNicEnc to create a WMA Pro. I figured this must be a uselessly convoluted process and that I must be able to go straight from DTS to WMA somehow. Then I stumbled upon NicAudio, specifically, NicDTSSource. I made an AVS to take the DTS source in and ran it in WMNicEnc to get a WMA and it worked flawlessly. I then learned about WMCmd.vbs by Zambelli that supports AVS files. I would love to get this working because I can then batch job my entire process and be done with it.
The problem is, I am not entirely sure how to use WMCmd.vbs. My AVS file is as follows:
LoadPlugin("C:\..\NicAudio.dll")
NicDTSSource("C:\..\Casino.dts")
In WMNicEnc this works fine, however with WMCmd.vbs I am not sure how to call it exactly.
If I use cscript wmcmd.vbs -input casino.avs -loadprofile "C:\...\AudioOnly684Etc.prx" -output casinotest.wma It crashes completely
If I specify the audio settings manually, ie: wmapro, bitrate etc, then it will just say:
Prepare to encode failed with error -1072886856 The input media format is invalid.
Does WMCmd.vbs support this sort of operation? I only want to encode audio to WMA, for video I am using Expression Encoder 2. Any assistance would be great.
Thanks
ACrowley
6th May 2008, 12:20
Best is you use eac3to to decode dts/ace/dd+7THD/LPCM ETC
I will give you the optimum for decoding Quality and Settings
Then you have 6 mono waves.
1. Open up Windows Media Encoder.
2. Select “Custom Session”
3. Select “both device and file” as the source.
4. Select multichannel wave source as the audio source, click configure, and browse for the 6 wavs you got from eac3to
5. Encode it to WMA10pro 24Bit 48Khz 448-768Kbps
xsictransitx
6th May 2008, 12:37
Yeah that is more or less my current process, I was hoping to avoid using mono wavs. How would I pass 6 mono wavs into WMCmd.vbs? I want to command line the whole thing.
xsictransitx
6th May 2008, 17:31
Problem solved, I am just going to use tranzcode to wav then WAVAVIMUX to get a 6 channel avi for use in WMCmd.vbs. Thanks for all your help.
criticaldx
18th May 2008, 20:09
Does anyone have the 2006 versions of WMCMD script? I need these versions to configure with CP profile. (AP sometimes troubles viewers to download the codec or won't even play.)
CP is just what I need, but the links are no longer there; only 2007 versions are available.
If anyone has a 2006 script, please upload. Greatly appreciated
Ytterbium
8th August 2008, 16:08
I'm having problems encoding I just get garbage out. I have the following .avs script:
Colorbars(720,576).trim(0,18000)
I used the following batch file:
C:\Windows\SysWOW64\cscript.exe "WMCmd.vbs" -input "AVSTest.avs" -output "VTS_01_1t.wmv" -videoonly -v_codec WVC1 -v_mode 4 -v_bitrate 2616000 -v_peakbitrate 7848000 -v_peakbuffer 3000 -v_keydist 3 -v_preset fast
This gives garbage, however this one works fine?!
C:\Windows\SysWOW64\cscript.exe "WMCmd.vbs" -input "AVSTest.avs" -output "VTS_01_1.wmv" -loadprofile "C:\Program Files (x86)\Windows Media Components\Encoder\Settings\XBox360(NTSC).prx" -videoonly -v_preset fast
The prx file has the same settings as my manual version.
If I remove the -v_preset from my manual one it works fine.
When I add in the options as documented in the help file one by one it seems that -v_overlap 1 is causing the problems.
I have a similar problem with -v_msrange 0 as well.
If I change the mode to 0 then these settings are fine.
I have vista x64.
zambelli
19th August 2008, 06:50
Does anyone have the 2006 versions of WMCMD script? I need these versions to configure with CP profile. (AP sometimes troubles viewers to download the codec or won't even play.)
CP is just what I need, but the links are no longer there; only 2007 versions are available.
If anyone has a 2006 script, please upload. Greatly appreciated
Encoding with Complex Profile (CP) is a very bad idea because it's not compliant with VC-1 specifications. Use Main Profile instead if encoding progressive, or Advanced Profile if encoding interlaced.
FoxRacR17
23rd August 2008, 19:08
quick question. I have been using this script to encode my movies to wmv with surround sound wma audio for a while now. It has been working great but I have been hearing about Expression Encoder 2 and I was wondering if I should switch to using that to encode my wmv videos for my 360 now. Does it offer improved encoding compared to this script? These are the settings that I use for all my encodes
C:\Windows\SysWOW64\cscript.exe "C:\Program Files (x86)\Windows Media Components\Encoder\WMCmd.vbs" -input "D:\video.avs" -output "D:\final video.wmv" -v_codec WVC1 -videoonly -v_mode 0 -v_bitrate 8388608 -v_preset better -v_buffer 60000 -v_quality 100
Finally does Expression Encoder 2 support avs files?
ACrowley
27th August 2008, 12:57
quick question. I have been using this script to encode my movies to wmv with surround sound wma audio for a while now. It has been working great but I have been hearing about Expression Encoder 2 and I was wondering if I should switch to using that to encode my wmv videos for my 360 now. Does it offer improved encoding compared to this script? These are the settings that I use for all my encodes
Finally does Expression Encoder 2 support avs files?
yes it does support avs source
zambelli
30th August 2008, 01:42
quick question. I have been using this script to encode my movies to wmv with surround sound wma audio for a while now. It has been working great but I have been hearing about Expression Encoder 2 and I was wondering if I should switch to using that to encode my wmv videos for my 360 now. Does it offer improved encoding compared to this script? These are the settings that I use for all my encodes
Expression Encoder 2 is based on the VC-1 Encoder SDK, so yes, it should offer somewhat better quality and performance than WMF11 codecs.
ACrowley
3rd September 2008, 10:46
Expression Encoder 2 is based on the VC-1 Encoder SDK, so yes, it should offer somewhat better quality and performance than WMF11 codecs.
Perfomance seems to be bad on multicore Systems ( imho)
With WM11 and Expre.Enc2
very very slow compared with x264 or Mainconcept Refernce VC1pro
EDIT:
No...Expression Encoder2 Perfomance on Multicore works correct :) dont know why i had these Perfomance Problems in the Past. Now it works as it should work
elealbravo
4th November 2008, 15:45
Hello, Zambelli.
I'm quite interested on batch (a lot of input videos) encoding, which has moved me to WMCmd.vbs. I've have succeeded runing it on Windows XP (not my PC). The only problem here is that it tends to monopolize the CPU. Is there any way I can limit the CPU quota used?
However, on my own PC (Vista Prremium) I haven't succeeded. It's allways aborted (even running it only for help, no parameters) by the Data Execution Prevention (DEP) of Windows Vista, which doesn't let me inhibit this control for cscript.exe. As far I've tested, hotfix KB929182 doesn't fix this problem. Before trying to change boot configuration for DEP with bcdedit.exe (as last choice), I'd like to know if your latest version of WMCmd.vbs is DEP-compatible (Microsoft emphasizes using a DEP-compatible version of the software as the best solution).
Anyway, I'll move to your modified version of WMCmd.vbs, for its evident advantages.
Thank you so much!!! :thanks:
benwaggoner
5th November 2008, 18:14
I'm quite interested on batch (a lot of input videos) encoding, which has moved me to WMCmd.vbs. I've have succeeded runing it on Windows XP (not my PC). The only problem here is that it tends to monopolize the CPU. Is there any way I can limit the CPU quota used?
You can go into Task Manager as set the process priority to "Below Average" - that's what I do when I'm encoding in a hotel room while also trying to do email; all too common a scenario for me :).
Setting NumThreads to something below how many cores you have is a more brute-force way of ensuring some CPU for other tasks.
However, on my own PC (Vista Prremium) I haven't succeeded. It's allways aborted (even running it only for help, no parameters) by the Data Execution Prevention (DEP) of Windows Vista, which doesn't let me inhibit this control for cscript.exe. As far I've tested, hotfix KB929182 doesn't fix this problem. Before trying to change boot configuration for DEP with bcdedit.exe (as last choice), I'd like to know if your latest version of WMCmd.vbs is DEP-compatible (Microsoft emphasizes using a DEP-compatible version of the software as the best solution).
I've not heard of that, but I've only used Zambelli's version for years, including on Vista. No DEP issues for me.
You should also install this Hotfix if you're doing any MBR encoding.
http://on10.net/blogs/benwagg/20600/
ss3
12th November 2008, 20:01
I need to encode some bitstream with multiple slices and rangemap. I was wondering if these feature can be added to current implementation.
I found the support in wm9eutil with -v_slice but i was wondering if Zambelli or benwaggoner can update this script with requested features
smok3
14th November 2008, 11:26
i'am looking for a basic (max compatibility), decent bitrate preset (no resizing of input video material, no audio resampling), it must also progressively download, so far
cscript.exe t:\utility\wmv\WMCmd.vbs -input t:\file.avs -output g:\file.wmv -pixelratio 1 1 -v_bitrate 1250000 -v_codec WMV9 -v_mode 3 -a_mode 2
edit: audio got resampled?
edit: found that -v_mode must be 3
edit: in prog. download mode seeking won't work until the entire stream is downloaded, clues?
JayBird
5th January 2009, 02:42
I am running XP64 and can't get up and running. Both of the .avs scripts below play fine in WMP11. I'm using the GUI and when I put 'both file and device' and point to either .avs I get the same error. Under the 64bit encoder I get error 0x80040154 class not registered, and under 32bit I get codec unavailable. I'm sure it's something dumb, but can you steer me straight? Thanks.
DirectShowSource("E:\Hitman Rip\HitmanBR\HITMAN\BDMV\STREAM\00002.m2ts", fps=23.976024, audio=false)
#deinterlace
crop( 2, 128, 0, -130)
LanczosResize(1920,816) # Lanczos (Sharp)
#denoise
------------------------
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
AVCSource("E:\Hitman Rip\HitmanBR\HITMAN\BDMV\STREAM\00002.dga")
#deinterlace
crop( 2, 128, 0, -130)
LanczosResize(1920,816) # Lanczos (Sharp)
#denoise
Blimblim
21st January 2009, 22:51
Hi everyone.
I've been tinkering with this script and trying to get it to run with the new 8-way wmvencod.dll from Windows 7 public beta, and honestly I'm simply out of ideas.
Let's start with what worked.
- Use wmcmd.vbs and encode a .avs file to .wmv, using Windows XP as the OS. Of course it's with the regular WMF11 dll.
- On any setup, I can use wmcmd.vbs to transcode regular video files to wmv without any problem. Only AVS doesn't work.
Now about the out of the ordinary stuff: This is all running in a virtual machine, using Xen/Linux. It works nicely with anything from XP to W7, but (since it may be a factor?) there is *no* way to get any sound driver.
- On any setup, I can use wmnicenc to encode a WMV file from the test avs file.
So now here is what I've tried so far:
- Straight Windows 7 beta (x86). The WMCMD.vbs script just seems to hang doing nothing after the two banner lines. If I had a timeout delay to the script.exe command line, it quits nicely after that delay, so it doesn't seem to be a complete crash.
- Vista x86. Same result with both the bundled wmvencod.dll and the one from Windows 7 (yes, it works with vista and uses all 8 cores of my virtual machine). Same result.
- Vista 64bits on my current PC (not a virtual machine). Same result. That was my last test possible. And of course there is a sound output driver here.
As far as I can tell, this simply doesn't work with any Vista and following OS. And of course reading that topic, it looks like you guys manage to get it working normally. I of course applied the hotfix.
The .avs file is a simple directshowsource of a .wmv file, with convertfps=true and fps=29.97 just to be sure. It plays perfectly well with mpc on all OS (except I get an audio error on the virtual machines).
directshowsource("test.wmv",fps=29.97,convertfps=true)
The command line is simply this:
cscript.exe wmcmd.vbs -input test.avs -output test.wmv
I just want this to do something, so I didn't bother with other command line arguments.
One interesting thing is that if I just use the input argument without output, I get this:
File name: N:\test.avs
Total file length: 0.00 s
Video:
Width: 1280
Height: 544
Frame rate: 29.97
Format: Y??2
Bits per pixel: 12
Number of frames: 0
Audio:
Sampling rate (Hz): 44100
Number of channels: 2
Bits per sample: 16
Command-line parsing completed.
Using XP (IIRC, since I don't have a XP computer available here) it first says that it can't get the length of the video and uses an alternate method. It never goes this far with vista+.
So am I being my usual dumb self, or is something genuinely wrong with this script on my particular setup?
The goal here is to reencode automatically any type of video (using either directshowsource or ffmpegsource) to wmv, using all 2*4 cores of this sweet server to do the conversion as fast as possible. Using XP would limit me to 4 cores, since the new wmvencod.dll requires a vista+ based kernel.
Thanks in advance for any help/hint. And feel free to ask me any more questions.
Of course if you know any other way to encode a wmv9 (not vc1, since this has to work on any PC without having to download any codec) file using the command line, compatible with avisynth, let me know. I'm now starting to even think about converting wmnicenc (since it works on all these setups perfectly) to a command line application.
Blimblim
22nd January 2009, 15:04
I just did some more testing, and the wmcmd.vbs file actually works with vista. Only it works after EXACTLY a 6 minutes wait on the preparetoencode call. I added some debug code, and there it is:
Before PreparetoEncode 15:32:13
After PreparetoEncode 15:38:13
If I call the script again, I get the exact same 6 minutes delay.
function Transcode()
on error resume next
' Prepare to encode
OutputInfo "Before PreparetoEncode " & Time
g_objEncoder.PrepareToEncode( true )
OutputInfo "After PreparetoEncode " & Time
I tried following the initialization of the object, but I don't know enough VB Script to do anything about it.
I looked up some info on this function and it looks like it can get very slow when there are some DCOM issues. I looked in the event viewer and there wasn't any DCOM problem listed, unfortunately. I tried totally disabling the firewall in case there was some network activity somewhere, nothing.
The strange thing is that this call is done almost instantly using a standard video file, so it's definitely an interaction issue with avisynth with something timing out somewhere.
Blimblim
25th January 2009, 22:07
Alright, I ended up porting wmnienc to a command line application. It's an horrible job with basically everything but input and output hard coded, but it actually works. 8 core encoding is nice, I'll try doing some benchmarks.
cosmick
11th May 2009, 07:02
Hi all!
We're using this great script along with standalone WME application and facing some un-obvious results.
Our script is cupturing A/V stream from an Osprey 240e cards.
The cmd itself is:
cscript.exe wmcmd.vbs -adevice 1 -vdevice 1 -duration 36000 -broadcast 7865 -a_setting 96_44_2 -v_codec WVC1 -v_preproc 17 -v_bitrate 5000000 -pixelratio 12 11 -pixelformat YUY2 -v_framerate 25 -v_lookahead 16 -v_numthreads 4 -v_bframedist 0 -v_keydist 2
We disabled deinterlacing filter on Osprey in order to stream interlaced video to viewers.
We're monitoring the stream with the WMP11 via HTTP.
The question is about results we're getting.
In the very beginning of the coding process WMP shows 49,9 actual FPS, but during broadcast session the figures are floating near 47 FPS (no dropping frames, no lost or recovered packets, no any errors). Actual bit rate is near 5 Mbps most of the time but sometimes it decreases to 3,5-4 Mbps.
The script output is like:
Wait for 36000 seconds to stop encoder...
Duration time is reached. Stop encoder...
======== Encoding Completed ========
Audio :
Codec: Windows Media Audio 9.2
Expected bit rate: 96040 bps
Average bit rate: 96039 bps
Expected sample rate: 5383
Average sample rate: 5383
Dropped byte count: 0 bytes
Dropped sample rate: 0
Total bytes: 432185150 bytes
Video :
Codec: Windows Media Video 9 Advanced Profile
Expected bit rate: 5000000 bps
Average bit rate: 4811995 bps
Expected fps: 25
Dropped frame count: 0
Total coded frames: 899996
Average sample rate: 18,889
Dropped bytes: 0 bytes
Total bytes: 21653973041 bytes
Overall:
Encoding time: 36002 seconds
Average bit rate: 4908034 bps
HW is very capable (we believe) to deliver the full speed of coding (Q6600, 1024 MB RAM on Windows XP, Intel 3200 server board), WME uses approx. 40% of CPU during the sessions (approx. evenly on all four it's cores).
What is the possible cause for FPS floating?
What does mean the Average sample rate parameter in the Video section scrip output? This parameter is 25 sometimes (for short sessions only), 21 or even 18 as you can see in the log.
Thanks in advance
Small amendment: WMP is running on a dedicated dual-core Athlon machine with Nvidia GF 8200 chipset. During the viewing the CPU usage is approx. 30% (Overlays and DirectX are checkboxed)
kevo777
11th May 2009, 14:21
May I ask why you are pushing an interlaced stream? I'm afraid I can't answer the question that you pose. I was just curious about the need to interlace a stream.
cosmick
11th May 2009, 15:16
We stream the sport content. It's noticeable better interlaced in comparison the progressive streams because there are a lot of motions across the screen.
We'll greatly appreciate any suggestions:
Why constant bitrate stream deviates?
What does mean the Average sample rate and it's deviations?
Why FPS changes?
Thanks in advance
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.