Log in

View Full Version : WMCmd.vbs WME9 script update released - 10/11/07


Pages : 1 2 3 4 [5] 6 7

Rash
2nd September 2007, 00:01
No, Fox, you are cropping the black bars that are "burned in" the video stream (that are encoded in the source video). So you are not losing effective pixels (or image pixels), you are simply losing black pictures. He advised you to do so in order to help the codec encode only the image itself, and no black bars with it.

Try creating an AVS script with a tool, such as MeGUI, that will help you crop the black bars properly.

Zambelli, thank you very much for you fast help. :) Here are what you asked me:

-a_mode 1 (bitrate OK)

PS D:\home\rash\Development\Eng test\wav> cscript "C:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -input e
ng_test.wav -output eng_test.wma -a_codec WMA9PRO -a_mode 1 -a_setting 384_48_6_24
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Windows Media Encoder Command Line Script Utility
Copyright (C) Microsoft Corporation. All rights reserved.


======== Begin Pass1 ========
Read: 201.5s (97.5%) Elapsed: 00:01:14 Left: 00:00:02 [2.72x]

======== Begin Pass2 ========
Encoded: 141.2s (68.3%) Elapsed: 00:00:04 Left: 00:00:02 [35.3x]

======== Encoding Completed ========

Audio :
Codec: Windows Media Audio 10 Professional
Expected bit rate: 384000 bps
Average bit rate: 384000 bps
Expected sample rate: 2929
Average sample rate: 2929
Dropped byte count: 0 bytes
Dropped sample rate: 0
Total bytes: 9994240 bytes

Overall:
Encoding time: 83 seconds
Average bit rate: 384000 bps
File size: 10018183 bytes
File duration: 206.955 seconds

-a_mode 4 (bitrate not OK)

PS D:\home\rash\Development\Eng test\wav> cscript "C:\Program Files\Windows Media Components\Encoder\WMCmd.vbs" -input e
ng_test.wav -output eng_test.wma -a_codec WMA9PRO -a_mode 4 -a_setting 384_48_6_24
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Windows Media Encoder Command Line Script Utility
Copyright (C) Microsoft Corporation. All rights reserved.


======== Begin Pass1 ========
Read: 203.8s (98.6%) Elapsed: 00:00:34 Left: 00:00:00 [5.99x]

======== Begin Pass2 ========
Encoded: 202s (97.7%) Elapsed: 00:01:20 Left: 00:00:02 [2.52x]

======== Encoding Completed ========

Audio :
Codec: Windows Media Audio 10 Professional
Expected bit rate: 384000 bps
Average bit rate: 565490 bps
Expected sample rate: 2929
Average sample rate: 4314
Dropped byte count: 0 bytes
Dropped sample rate: 0
Total bytes: 14630912 bytes

Overall:
Encoding time: 119 seconds
Average bit rate: 565490 bps
File size: 14664574 bytes
File duration: 207.093 seconds

I'm using Windows Media Encoder x64 on Windows Vista Ultimate x64.

This file of mine is part of an audio/video project. This is a 5.1 audio channel encoded from 6 mono wavs (in the test above they are in a wav_ext file, but encoding from a wme project for the 6 mono channels result the same). I was encoding audio (6 mono wavs) and video all from a wme project when I noticed this effect. If I set 128_48_6_24 I get an aproximate 386 kbps file. But Windows Media Player reports it as 128 VBR 6 channel, though the file properties states 386 kbps. Doing the math (well, the script does it for us), taking the filesize and duration we can see that the real bitrate is indeed 565kbps.

Now that I have encoded everything, I came about a new question. How do I set a delay for audio? My audio is -275ms delayed, so I have to delay the video -275 ms (but -v_buffer doesn't allow me to set negative numbers) or delay the audio 275 ms. Is it possible?

The resulting video quality is amazing! :D With just 2.8Mbps for a 720x480 video.

Thank you ver much for your help. ;)

FoxRacR17
2nd September 2007, 01:35
No, Fox, you are cropping the black bars that are "burned in" the video stream (that are encoded in the source video). So you are not losing effective pixels (or image pixels), you are simply losing black pictures. He advised you to do so in order to help the codec encode only the image itself, and no black bars with it.

Try creating an AVS script with a tool, such as MeGUI, that will help you crop the black bars properly.

Thanks for the reply Rash, i'll try out MeGUI when i get home later tonight to see how to crop out the black bars.

Can anyone tell me how to figure out what resolution i should use depending on what the aspect ratio of the source is? Is there some formula or something?

zambelli
2nd September 2007, 08:38
Can anyone tell me how to figure out what resolution i should use depending on what the aspect ratio of the source is? Is there some formula or something?
Well, yeah, the aspect ratio is the aspect ratio of width over height. If you know the aspect ratio of the movie (i.e. 2.35:1), take the target width and divide it by the AR, then round to nearest multiple of 16. So if you're targetting 1280 pixels wide, that's 1280 / 2.35 = 544.68. The nearest multiple of 16 is 544.

Most of the time you can just figure this out practically by loading the .avs in VirtualDub and using the Crop function of the Null transform filter to figure out how far the black bars go.

FoxRacR17
2nd September 2007, 16:09
Well, yeah, the aspect ratio is the aspect ratio of width over height. If you know the aspect ratio of the movie (i.e. 2.35:1), take the target width and divide it by the AR, then round to nearest multiple of 16. So if you're targetting 1280 pixels wide, that's 1280 / 2.35 = 544.68. The nearest multiple of 16 is 544.

Most of the time you can just figure this out practically by loading the .avs in VirtualDub and using the Crop function of the Null transform filter to figure out how far the black bars go.

Thanks zambelli, for all your help! I successfully cropped off the black bars on top and bottom using megui thanks to the hint that Rash gave me, and i resized the video to 1280x528 since the video is 2.40:1 according the case. Thanks guys, i'm getting so close i can taste it! lol.

However i still have a problem when i try to encode with 2 pass peak vbr. I have now tried it with two different video files and its the same result, video is stuttering or acting like it is two video files overlapped and playing off sync by like half a second.

sportcenter
3rd September 2007, 00:41
Thanks zambelli, for all your help! I successfully cropped off the black bars on top and bottom using megui thanks to the hint that Rash gave me, and i resized the video to 1280x528 since the video is 2.40:1 according the case. Thanks guys, i'm getting so close i can taste it! lol.

However i still have a problem when i try to encode with 2 pass peak vbr. I have now tried it with two different video files and its the same result, video is stuttering or acting like it is two video files overlapped and playing off sync by like half a second.

what kind of equipment are you encoding on?...b/c the 1-pass insane .vbs i have been using has given almost identical results to 2-pass "best" .vbs scripts i have done...

FoxRacR17
3rd September 2007, 03:46
what kind of equipment are you encoding on?...b/c the 1-pass insane .vbs i have been using has given almost identical results to 2-pass "best" .vbs scripts i have done...

I'm running an AMD Athlon X2 2.5Ghz with 3 Gigs of DDR400 memory. Doing a 1pass CBR with "best" setting it takes around 16-18 hours to encode.

sportcenter
3rd September 2007, 05:40
I'm running an AMD Athlon X2 2.5Ghz with 3 Gigs of DDR400 memory. Doing a 1pass CBR with "best" setting it takes around 16-18 hours to encode.

and do you get "stuttering" w/ 1 pass?

FoxRacR17
3rd September 2007, 08:46
no, its only when i try 2 pass peak VBR. I can do 1 and 2 pass CBR and it turns out great. I have uploaded a sample of what i'm talking about, it starts out fine, but then after around 10 seconds it starts to mess out, check it out:
http://www.megaupload.com/?d=XLJCU1W8

This is my .avs script:
DirectShowSource("E:\video.grf",fps=23.976,framecount=4315,seekzero=false,seek=true,audio=false)
crop( 0, 140, 0, -140)
Spline36Resize(1280,528)

and this is my command line:
cmd /k cscript.exe "C:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -input "E:\video.avs" -output "E:\final video.wmv" -v_codec WVC1 -videoonly -v_mode 4 -v_preset better -v_bitrate 8000000 -V_peakbitrate 12000000 -v_keydist 30 -v_buffer 60000 -v_peakbuffer 60000

sportcenter
3rd September 2007, 09:14
no, its only when i try 2 pass peak VBR. I can do 1 and 2 pass CBR and it turns out great. I have uploaded a sample of what i'm talking about, it starts out fine, but then after around 10 seconds it starts to mess out, check it out:
http://www.megaupload.com/?d=XLJCU1W8

This is my .avs script:
DirectShowSource("E:\video.grf",fps=23.976,framecount=4315,seekzero=false,seek=true,audio=false)
crop( 0, 140, 0, -140)
Spline36Resize(1280,528)

and this is my command line:
cmd /k cscript.exe "C:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -input "E:\video.avs" -output "E:\final video.wmv" -v_codec WVC1 -videoonly -v_mode 4 -v_preset better -v_bitrate 8000000 -v_peakbitrate 12000000 -v_peakbuffer 10000 -v_mmatch 0


try that script...

and here is a sample from my latest run...

http://www.megaupload.com/?d=16027WNY

sportcenter
3rd September 2007, 16:29
what about this...never had this problem...

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.
.

Warning: Encoder failed to retrieve source duration again.
Encode process might not continue or progress report may be inaccurate.

..................................................................................

and then closes...?....

Rash
3rd September 2007, 16:49
I'm glad it worked Fox. :)

Does anybody have any suggestions as how to delay the audio? Please? Look at my first post on this page. Thank you!

FoxRacR17
3rd September 2007, 17:16
I'm glad it worked Fox. :)

Does anybody have any suggestions as how to delay the audio? Please? Look at my first post on this page. Thank you!

Yeah, use delaycut (http://jsoto.posunplugged.com/audiotools.htm) on the individual wav files. I had to find this out kinda on my own with batman begins. When you open of the .evo for batman begins i noticed on the .ddp audio it said something like (+100ms), however on v for vendetta it didnt say anything. So i got delaycut and first tried it on the multichannel .wav but it was not working that way. So what i had to do was do each individual .wav one at a time.

So do the eac3to like normal, then do the tranzcode like normal to get the split up waves, then stop it before wavavimux makes the audio .avi file. Load the first .wav file in delaycut, and then click the little box for "delay" and put in a time (in ms), then repeat for the other five wavs. One you have that done you can continue with wavavimux and then encode to whatever you want.

I found out that when i used the 100ms that evodemux told me on the original .evo, the audio was FINALLY right on with the video for batman begins. That movie was driving me crazy trying to figure that out.

what about this...never had this problem...

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.
.

Warning: Encoder failed to retrieve source duration again.
Encode process might not continue or progress report may be inaccurate.

..................................................................................

and then closes...?....

I got that error once or twice, i dont know why, but all i did was restart the bat file and then it worked fine, so sorry i cant be of anymore help, and thanks for the command line, i'll try it out and see if it helps.

FoxRacR17
3rd September 2007, 18:14
Well i tried that command line sportcenter and it turned out exactly the same. It looks good but once it gets to that box thing it starts messing up.

sportcenter
4th September 2007, 06:50
Well i tried that command line sportcenter and it turned out exactly the same. It looks good but once it gets to that box thing it starts messing up.

are you doing anything else on your pc (hdd) when it is encoding?....

acribb
5th September 2007, 00:31
I too am having problems with a VBR peak bitrate encode. I have tried twice now with no luck. Once with a vpeakbuffer of 5000 and one try with a vpeakbuffer of 60000. No dice. I get what seem to be the same results as FoxRacr17.

Avs script for both:
Directshowsource("E:\WMV-HD Encoding\Video_Only.grf", fps=23.976, audio=false, seekzero=false, seek=true, framecount=188890)
spline36resize(1280,720)

1st try:
cscript.exe "D:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -input "E:\WMV-HD Encoding\Video_Only.avs"
-a_input "E:\WMV-HD Encoding\audio.avi" -output "E:\WMV-HD Encoding\output.wmv" -v_codec WVC1 -v_mode 4 -v_preset better
-v_keydist 30 -v_peakbuffer 5000 -v_bitrate 8000000 -v_peakbitrate 12500000 -v_quality 100
-a_codec wmapro -a_setting 640_48_6_24

.......
Source duration retrieved: 7878.3 seconds.

======== Begin Pass1 ========
Read: 7878.1s (100%) Elapsed: 09:55:52 Left: 00:00:01 [0.22x]

======== Begin Pass2 ========
Encoded: 7878.3s (100%) Elapsed: 35:11:39 Left: 00:00:01 [0.06x]

======== Encoding Completed ========

Audio :
Codec: Windows Media Audio 10 Professional
Expected bit rate: 640032 bps
Average bit rate: 640031 bps
Expected sample rate: 5859
Average sample rate: 5859
Dropped byte count: 0 bytes
Dropped sample rate: 0
Total bytes: 630295948 bytes

Video :
Codec: Windows Media Video 9 Advanced Profile
Expected bit rate: 8000000 bps
Average bit rate: 7937932 bps
Expected fps: 23.976
Dropped frame count: 0
Total coded frames: 188890
Average sample rate: 23.952
Dropped bytes: 0 bytes
Total bytes: 7817138838 bytes

Overall:
Encoding time: 162493 seconds
Average bit rate: 8577963 bps
File size: 8469844808 bytes
File duration: 7878.314 seconds

Audio in sync but video stutters consistently after about 5 minutes into the movie.

2nd try
cscript.exe "D:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -input "E:\WMV-HD Encoding\Video_Only.avs"
-a_input "E:\WMV-HD Encoding\audio.avi" -output "E:\WMV-HD Encoding\output.wmv" -v_codec WVC1 -v_mode 4 -v_preset better
-v_keydist 30 -v_peakbuffer 60000 -v_bitrate 8000000 -v_peakbitrate 12500000 -v_quality 100
-a_codec wmapro -a_setting 640_48_6_24

.....
Source duration retrieved: 7878.3 seconds.

======== Begin Pass1 ========
Read: 7877.9s (100%) Elapsed: 09:51:36 Left: 00:00:02 [0.22x]

======== Begin Pass2 ========
Encoded: 7878.3s (100%) Elapsed: 35:09:50 Left: 00:00:01 [0.06x]

Blew up with one second left! Incomplete file has out of sync audio from the start of the movie. Is this because the file failed to complete processing?
Video STILL stutters just like the first encode, about 5 minutes in. Stutters exactly as FoxRacr17 describes above.

It takes my old school P4 3 ghz HT about 48 hours per encode, so any help would be greatly appreciated.....

Thanks..

sportcenter
5th September 2007, 00:46
do only video encoding first....then audio...then mux together w/ windows media encoder

try this...

cmd /k cscript.exe c:\windows\wmcmd.vbs -input c:\encodes\hotfuzz.avs -output c:\encodes\hotfuzz.wmv -v_codec WVC1 -videoonly -v_width 1280 -v_height 544 -v_mode 4 -v_preset best -v_bitrate 8765000 -v_peakbitrate 12000000 -v_peakbuffer 10000 -v_mmatch 0

obviously you can take the v_width and v_height out if you have spline36resize in your avs and you can replace "best" w/ "better" if you like

also why are you guys not using

ConverttoYV12()
Asharp(1,3)

in your avs scripts? it will make your video look almost identical to the source

if the above script doesn't work, i hate to say it but it may be the equipment you guys are using - it may be too slow

2-pass "best"takes me around 16 hours on my pc

Q6600
4GB RAM
74GB Raptor

FoxRacR17
5th September 2007, 02:54
Whenever i add Asharp(1,3) my avs. file will not play and WME will not encode the movie. Any ideas why?

FoxRacR17
5th September 2007, 03:04
Whenever i add Asharp(1,3) my avs. file will not play and WME will not encode the movie. Any ideas why?

Nevermind, i downloaded the asharp.dll and put it in the plugins folder and now it works. Out of curiosity, what does those two filters do exactly?

sportcenter
5th September 2007, 03:20
Nevermind, i downloaded the asharp.dll and put it in the plugins folder and now it works. Out of curiosity, what does those two filters do exactly?

Motion Adaptive Edge Sharpening....it works wonders

*thanks Crowley :)

Rash
6th September 2007, 17:25
I encoded some videos here though I think my VC-1 encodes were too blurred. Here is my cmd

"C:\Windows\SysWOW64\cscript.exe" "C:\Program Files (x86)\Windows Media Components\Encoder\wmcmd.vbs" -input "ignoringu.avs" -output "video\ignoringu.wmv" -videoonly -v_codec WVC1 -v_mode 3 -v_preproc 0 -v_bitrate 2560000 -v_buffer 10000 -v_performance 100 -v_compopt 1 -v_dquantstrength 3 -v_percopt 3 -v_denoise 0 -v_median 0 -v_codedwidth 720 -v_codedheight 480 -pixelratio 40 33 -log ignoring.log

Maybe I should not use dquantstrength or percopt? I'm going to try Zambelli's "insane" preset today.

Oh, by the way Zambelli, WMA's 5.1 is still giving me some headaches.

D:\Home\Rash\Development\Pitty IgnorinU\audio>"C:\Windows\SysWOW64\cscript.exe"
"C:\Program Files (x86)\Windows Media Components\Encoder\wmcmd.vbs" -input "igno
ringu synced.wav" -output "ignoringu.wma" -a_codec WMA9PRO -a_mode 3 -a_setting
384_48_6_24
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Windows Media Encoder Command Line Script Utility
Copyright (C) Microsoft Corporation. All rights reserved.


======== Begin Pass1 ========
Read: 265.8s (96.7%) Elapsed: 00:00:40 Left: 00:00:01 [6.64x]

======== Begin Pass2 ========
Encoded: 260.5s (94.8%) Elapsed: 00:00:42 Left: 00:00:02 [6.2x]

======== Encoding Completed ========

Audio :
Codec: Windows Media Audio 10 Professional
Expected bit rate: 384000 bps
Average bit rate: 1030045 bps
Expected sample rate: 2929
Average sample rate: 7858
Dropped byte count: 0 bytes
Dropped sample rate: 0
Total bytes: 35389440 bytes

Overall:
Encoding time: 86 seconds
Average bit rate: 1030045 bps
File size: 35462651 bytes
File duration: 275.071 seconds

1Mbps is too much for audio. I'm sure WMA doesn't need all that to be transparent. The least I can achieve is 430 kbps for 128_48_6_24, but I think 430 is still too much. ;) (Windows Vista x64, WME9 32-bits, latest wmcmd.vbs).

Thank you all.

[EDIT] Oh, by the way, that program do you guys use to mux wmv and wma into a wmv file?. Thank you.

zambelli
7th September 2007, 02:49
-v_preproc 0 -v_denoise 0 -v_median 0
These are unnecessary because those are the default values anyway.
-v_mode 3 -v_buffer 10000
You don't need to specify a buffer for mode 3 - that's unconstrained 2-pass VBR. The buffer is determined by the encoder.
-v_performance 100 -v_compopt 1
Actually, the one thing you can't override in v_compopt 1 is the v_performance value. That gets locked into 60 when you set v_compopt 1. So your v_performance 100 is actually getting ignored here.

I generally would recommend taking all the settings that make up v_compopt 1 and setting those individually, rather than through v_compopt 1. It gives you greater control over them.

-v_dquantstrength 3 -v_percopt 3
If the picture is coming out too soft you could try removing v_percopt.

-v_codedwidth 720 -v_codedheight 480
If that's the resolution of your source, you don't need to set this. These settings are only for when you want the encoded resolution of the video to be different than the source and display resolution.

zambelli
7th September 2007, 03:09
1Mbps is too much for audio. I'm sure WMA doesn't need all that to be transparent. The least I can achieve is 430 kbps for 128_48_6_24, but I think 430 is still too much. ;) (Windows Vista x64, WME9 32-bits, latest wmcmd.vbs).
Unfortunately, I can't repro this with my sources. I tried both x86 and x64 codecs under Vista x64. Would it be possible for you to share your 6ch WAV source with me?

Rash
7th September 2007, 03:12
Well, sure there is a lot to be tweaked on my cmd, hehe. Thank you for the tips, Zambelli. ;) Most of the redundancies I already knew about, but since I was reusing my .bat from other encodes I simply changed what I was testing. My main concerns were really dquantstrength and percopt, I wasn't sure how to use them.

I just reencoded my videos using only -v_preset best (not insane at this time) and no other switch. So I'm not trying to override anything. I thought about setting -v_performance 100 because encoding time is no issue to me. I didn't know it couldn't be overridden. Thank you for the heads up.

I haven't seen the results yet because I'm still at work, hopefully they are not so soft at this time.

Thank you again. ;)

Sure I can send you my wavs. How do we do (6ch wav ~ 4 minutes is big :D)? I don't think lossless is a good idea, right? If the problem is in the wav or in the headers it would be useless. Well, just so you know I tried encoding from 6 mono wavs and I got the same result. So it could be an issue in my OS?

[UPDATE]
My videos turned out awesome! So -v_preset best is going to be my new standard encode right now (which is already quite slow, hehe, 3 hours for a 4 minute video at 720x480 ;)).

sportcenter
9th September 2007, 16:30
[EDIT] Oh, by the way, that program do you guys use to mux wmv and wma into a wmv file?. Thank you.


windows media encoder ----> stream editor

Rash
9th September 2007, 23:12
Yes, thank you Sportcenter but I had already figured that out myself. :)

Just a curiosity, is there a way to mux subtitles to the wmv file? I have some subs in the SAMI format (I've read they were necessary) but stream editor won't allow me to mux them. Thanks again.

zambelli
10th September 2007, 02:35
Sure I can send you my wavs. How do we do (6ch wav ~ 4 minutes is big :D)? I don't think lossless is a good idea, right? If the problem is in the wav or in the headers it would be useless. Well, just so you know I tried encoding from 6 mono wavs and I got the same result. So it could be an issue in my OS?
How big are the files? I could give you an FTP site to upload them to.

Do you have Ffdshow installed on your machine to decode PCM audio, by any chance?


My videos turned out awesome! So -v_preset best is going to be my new standard encode right now (which is already quite slow, hehe, 3 hours for a 4 minute video at 720x480 ;)).
Yikes. What CPU do you have?

Just a curiosity, is there a way to mux subtitles to the wmv file? I have some subs in the SAMI format (I've read they were necessary) but stream editor won't allow me to mux them.
You can't mux SAMI directly into ASF, but there is a way to add single-language subtitles to an ASF by using CAPTION script commands. The method is described here (http://msdn2.microsoft.com/en-us/library/aa391231.aspx), but I'm not aware of any tool that will do that automatically - though if anybody wanted to build it, they could use the WME9 SDK to do it.

tyee
10th September 2007, 22:47
Just a quick question. I want to start using this script and have spent a few days reading all the threads, but I believe to do the VC1 encoding I do not need a computer that can actually play HD-DVDs properly do I?
I only have a P4 2.8GHz machine but to rip/re-encode, to say an 8Mbps file, the computer just does it at it's own speed, right? All I need is the xbox hd-dvd player to get the info off the disk.

zambelli
10th September 2007, 23:10
Just a quick question. I want to start using this script and have spent a few days reading all the threads, but I believe to do the VC1 encoding I do not need a computer that can actually play HD-DVDs properly do I?
I only have a P4 2.8GHz machine but to rip/re-encode, to say an 8Mbps file, the computer just does it at it's own speed, right? All I need is the xbox hd-dvd player to get the info off the disk.
This is probably the wrong thread for HD-DVD ripping questions, but generally you're correct - you do not need an HD-DVD player to be able to encode to VC-1. Encoding and ripping are independent of each other.

sportcenter
11th September 2007, 03:49
Just a quick question. I want to start using this script and have spent a few days reading all the threads, but I believe to do the VC1 encoding I do not need a computer that can actually play HD-DVDs properly do I?
I only have a P4 2.8GHz machine but to rip/re-encode, to say an 8Mbps file, the computer just does it at it's own speed, right? All I need is the xbox hd-dvd player to get the info off the disk.

as Zambelli has mentioned....not the "ripping" thread....

but nonetheless, you are correct - your pc doesn't have to be able to play the discs, just retrieve the .evo's off the disc and begin encoding

sportcenter
11th September 2007, 03:52
[UPDATE]
My videos turned out awesome! So -v_preset best is going to be my new standard encode right now (which is already quite slow, hehe, 3 hours for a 4 minute video at 720x480 ;)).

my God....time for a Quad-Core...lol...

takes me ~ 19-22 hours for a 2-pass 2-hour movie @ 1280x544 w/ all the necessary filters and options

Rash
11th September 2007, 04:21
@ Zambelli,
The file is 135 MB (142,129,220 bytes). I do have ffdshow, but they are not set to decode PCM. Is it really necessary? Windows Media Player can play them fine.

Well, my CPU is an Athlon64 3000+ with 1GB RAM DDR400 and Windows Vista x64. Yes, I know what they say about Vista and 1GB RAM, specially Vista x64, but it does work for my needs. I can even play Guild Wars and Quake Wars fine. :)

When you say "single-language" subtitle you mean we can't have multiple languages to choose from, like in a DVD? That's probably what you meant, I just wanted to make sure. ;)

@ Sportcenter,
Indeed! My PC super upgrade project is coming next year. And it will be a Quad-Core CPU. :D

Thank you all for the help.

Jeremy Duncan
4th October 2007, 01:38
Hello, It's me Jeremy.

I tried to run this software from Zambelli today.
I got it to run now I want to try and tweak it for quality.

This is the avs code I want to run:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ColorMatrix.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Fluxsmooth.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll")

MPEG2Source("C:\Documents and Settings\Dell\Desktop\Kill Bill\Kill Bill.d2v")

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

Fluxsmootht(3)
MT("
FFT3DFILTER(sigma=0.6, ncpu=2, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)
",3,2)
ColorMatrix(Mode="Rec.601->Rec.709",clamp=false,threads=2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

I got this to run fine in Virtualdub using Windows Media Video 9 VCM codec, but now after reading about the fantastic "VC-1" codec I want to see if the quality is better.

Here's my script I use with wmcmd.vbs:
cscript wmcmd.vbs -input "C:\Documents and Settings\Dell\Desktop\GitS\Gits.avs" -output "C:\Documents and Settings\Dell.wmv" -v_codec WVC1 -videoonly -v_bitrate 8000000 -v_preset better -v_buffer 60000 -v_quality 100

I have two goals to use for this software, then I'll make more goals.
A.) To use the fantastic VC-1 codec.
B.) To get the best quality, at the "ideally it should be 8 Mbps." bitrate.

So I'm hoping somebody can recommend a setting to get these two goals. :)

Also, I get this error message before it encodes:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Dell>cscript wmcmd.vbs -input "C:\Documents an
d Settings\Dell\Desktop\GitS\Gits.avs" -output "C:\Documents and Setting
s\Office Admin.wmv" -v_codec WVC1 -videoonly -v_bitrate 8000000
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

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.......

Inventive Software
4th October 2007, 18:10
That message means that it has to use a WMP instance to get the duration, because it's an AVS file. That's a limitation of the WMV DMOs, so go bug MS about it, not necessarily Zambelli! ;)

Jeremy Duncan
4th October 2007, 22:14
Does that mean I can't use VC1 ?

Inventive Software
5th October 2007, 01:37
No, it just means it needs WMP9 minimum to run the script. Be patient with it and it'll eventually give you a progress bar, which means it's started encoding.

Jeremy Duncan
6th October 2007, 14:03
What I'm hoping to do is simple.
- Use vc1, get the fasted encode at 100 quality, using 8 Mbps bitrate.

After this I'll ask about muxing the dgindex ac3 sound into the wmv I made.

So, a recommendation for the first question: settings ? :script::thanks:

sportcenter
9th October 2007, 19:35
recently re-installed OS and now when i start my vbs script (same ones i have used before)it fails twice...and then just sits there

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.
.

Warning: Encoder failed to retrieve source duration again.
Encode process might not continue or progress report may be inaccurate.

it is very annoying...how can i fix this?

foxyshadis
10th October 2007, 03:13
Install haali's media filter, ffdshow, and possibly WMP11? If you can play it in WMP, you shouldn't get that message.

buzzqw
11th October 2007, 06:59
Zambelli said that for avs input, the current implementation of wmcmd.vbs , is unable to extract exact duration

and then just sits there
you don't see dots spawing while time elapse ?

BHH

zambelli
11th October 2007, 09:31
That message means that it has to use a WMP instance to get the duration, because it's an AVS file. That's a limitation of the WMV DMOs, so go bug MS about it, not necessarily Zambelli! ;)
Actually, it's a limitation of the WME9 SDK... And since WMCmd.vbs is a VBScript it can't use native APIs like DirectShow to work around the duration issue - it can only use ActiveX objects such as WME9 and WMP object models to do stuff.

@Jeremy:
The warning is, well, just a warning - not an error. If you eventually get a duration, it's all good.

@Sportcenter:
If you can play the .avs in WMP, you ought to be able to get a valid duration in WMCmd too. The only occasions it ever times out is if the Avisynth script takes too long to load (longer than 30 seconds).

zambelli
11th October 2007, 09:36
New version of WMCmd.vbs is now available!

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.

Barleyman
16th October 2007, 08:43
We've run some compression tests with automkv here (http://forum.doom9.org/showthread.php?p=1055890#post1055890) ..

Changing v_mslevel from 0 to 1 hits you with 40% performance penalty, I wonder how "significant" the "significant" image quality improvement is and if it's justified WRT using the same CPU time for higher v_performance for example?

April WMCmd.vbs update says the v_mslevel was changed but changes are not actually documented.. Is 1 still the fastest after 0?

ed: And alternatively, maybe it'd be better to drop v_performance a notch and use v_mslevel == 1? I would guess v_mslevel is less significant unless you're encoding ice hockey or something like that?

zambelli
17th October 2007, 00:58
If you're looking to make your encode go faster, you're probably better off staying at a higher complexity with just luma searching than going down to a lower complexity with chroma searching.

Yeah, -v_mslevel 1 is still the fastest after mslevel 0. The adaptive chroma search modes did not, unfortunately, make it into the v11 release as I had previously thought.

Barleyman
17th October 2007, 09:21
Pure speed-wise, complexity = 40 and mslevel = 1 is a lot faster than complexity = 60 and mslevel = 0 (http://forum.doom9.org/showthread.php?p=1056170#post1056170)

I wonder if the visual quality is better with either using complexity 40 with mslevel and dquant options or complexity 60 without? Yes, I can test it myself but I don't think I know what to look for exactly and I'd be victim of good old fashioned placebo-effect..

benwaggoner
17th October 2007, 19:28
Pure speed-wise, complexity = 40 and mslevel = 1 is a lot faster than complexity = 60 and mslevel = 0 (http://forum.doom9.org/showthread.php?p=1056170#post1056170)
I wonder if the visual quality is better with either using complexity 40 with mslevel and dquant options or complexity 60 without? Yes, I can test it myself but I don't think I know what to look for exactly and I'd be victim of good old fashioned placebo-effect..
MSLevel gives you chroma search, so you'd only expect to see a difference with content where chroma changes between frames but luma doesn't. This is most common with motion graphics, and sometimes with animation. The better luma search in higher complexities almost always pays off more.

Barleyman
17th October 2007, 20:17
The better luma search in higher complexities almost always pays off more.

On the other hand, complexity 60 takes about 60% more time than complexity 40, so..

benwaggoner
17th October 2007, 22:32
On the other hand, complexity 60 takes about 60% more time than complexity 40, so..
True, but the improvement in efficiency is way more than 1.5x of what you'd get out of chroma search with most content.

Barleyman
18th October 2007, 11:30
True, but the improvement in efficiency is way more than 1.5x of what you'd get out of chroma search with most content.

Might be summed up that chroma search is not worth it if you're trying to create a cpu-efficient profile with either 40 or 60 complexity.. I'm aiming for being able to compress one 42 minute 720p program during the time I'm at work so I have pretty well-defined compression speed target.

Jeremy Duncan
19th October 2007, 06:55
Hello, It's me Jeremy.

I tried to run this software from Zambelli today.
I got it to run now I want to try and tweak it for quality.

This is the avs code I want to run:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\ColorMatrix.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Fluxsmooth.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\decomb.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\aWarpSharp.dll")

MPEG2Source("C:\Documents and Settings\Dell\Desktop\Kill Bill\Kill Bill.d2v")

SetMemoryMax(1024)

AssumeTFF()
Telecide(chroma=false)
decimate()

Fluxsmootht(3)
MT("
FFT3DFILTER(sigma=0.6, ncpu=2, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)
",3,2)
ColorMatrix(Mode="Rec.601->Rec.709",clamp=false,threads=2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

I got this to run fine in Virtualdub using Windows Media Video 9 VCM codec, but now after reading about the fantastic "VC-1" codec I want to see if the quality is better.

Here's my script I use with wmcmd.vbs:
cscript wmcmd.vbs -input "C:\Documents and Settings\Dell\Desktop\GitS\Gits.avs" -output "C:\Documents and Settings\Dell.wmv" -v_codec WVC1 -videoonly -v_bitrate 8000000 -v_preset better -v_buffer 60000 -v_quality 100

I have two goals to use for this software, then I'll make more goals.
A.) To use the fantastic VC-1 codec.
B.) To get the best quality, at the "ideally it should be 8 Mbps." bitrate.

So I'm hoping somebody can recommend a setting to get these two goals. :)

Also, I get this error message before it encodes:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Dell>cscript wmcmd.vbs -input "C:\Documents an
d Settings\Dell\Desktop\GitS\Gits.avs" -output "C:\Documents and Setting
s\Office Admin.wmv" -v_codec WVC1 -videoonly -v_bitrate 8000000
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

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.......

I was actually hoping for some advice.
I don't know if the wmcmd.vbs script I posted meets these requirements.
"A.) To use the fantastic VC-1 codec.
B.) To get the best quality, at the "ideally it should be 8 Mbps." bitrate."
C.) A tip for speedy encoding would be nice too. :)

And I got that error while using wmp11 I think.

:script:

benwaggoner
24th October 2007, 21:46
Might be summed up that chroma search is not worth it if you're trying to create a cpu-efficient profile with either 40 or 60 complexity.. I'm aiming for being able to compress one 42 minute 720p program during the time I'm at work so I have pretty well-defined compression speed target.
That's reasonable. In general, I don't think I'd turn on chroma search until I hit Complexity 80 first with some headroom.