View Full Version : WMV profiles in AutoMKV - Optimizing?
DDogg
6th December 2006, 16:20
@zambelli, or other that know wmv params -
buzzqw added some experimental support for wmv in AutoMKV. My machine is an overclocked D930 at 4.5 GHz - fairly fast I think - still, I am seeing encode speeds of 0.25x - so 6 or 7 hours for a 90 minute source. No problem, but it seems excessive and I am wondering if some tweaking of these early command lines could help speed things up. Presently I am trying to use the 1_pass_quality. The cmd line is:<snip> -v_codec WVC1 -v_mode 2 -v_quality 90 -s_config "D:\temp\temp\wmv_crb" -v_bframedist 3
-v_dquantoption 2 -v_loopfilter 1 -v_lookahead 8 -v_mmatch 0 -v_mslevel 3 -v_msrange 0
-v_mvcost 1 -v_numthreads 2 -a_codec wmapro -a_mode 0 -a_setting 96_48_2Any suggestions for this profile or the others? I should add that while this profile is a 'quality' profile and could be expected to be slower, even the 'quick' profiles are not much faster which suggests some tweaking might be in order. To give a comparison, x264, which ain't exactly a speed demon encodes at around 20-22fps on this machine using the crf profile with most of the goodies. I would be surprised if wmv would be 3x slower after tweaking.
Btw, wanted to be clear I am not trying to start any discussion of wmv vs x264 - Simply mentioned the different speeds to give a quick baseline for discussion purposes.
travisbell
6th December 2006, 18:00
Hey DDog,
On my Athlon 2000 XP+ (ya, she's old) I get around 1.5fps for WMV, and 3.0fps for x264. In my case, the math is almost a perfect "half speed" for WMV. These are 720p encodes, btw.
Based on my math, you'd think you would get around 10fps on WMV...
On a related note, but not in spirit of answering your question, it does surprise me that WMV is so slow. Just an observation (no flame war here!) ;)
sjchmura
6th December 2006, 19:15
How do you get AutoMKV to do 5.1 WMA10Pro output??? I can only select stereo sound in the GUI??? (say take a VOB 5.1 file - only 5.1 is an option\ using 0.60 alpha)
travisbell
6th December 2006, 19:25
How do you get AutoMKV to do 5.1 WMA10Pro output??? I can only select stereo sound in the GUI??? (say take a VOB 5.1 file - only 5.1 is an option\ using 0.60 alpha)
buzzqw says he's working on a fix for this. I am guessing by the next WMV beta, we'll see this working.
Cheers,
DDogg
6th December 2006, 19:53
sjchmura, please remember it is a first alpha test of the wmv ability and is presently an incomplete work in progress - I am sure buzzqw would appreciate your patience as he works on this area for us.
DDogg
6th December 2006, 21:33
This profile is encoding at about .45x
-v_codec WMV9 -v_mode 2 -v_quality 90 -s_config "C:\work1\temp\wmv_crb" -v_bframedist 2
-v_loopfilter 0 -v_lookahead 0 -v_mmatch 0 -v_msrange 0 -v_mvcost 0 -v_numthreads 2 -a_codec WMASTD
-a_mode 0 -title qweqwe -a_setting 96_48_2
zambelli
6th December 2006, 21:54
-v_codec WVC1 -v_mode 2 -v_quality 90 -s_config "D:\temp\temp\wmv_crb" -v_bframedist 3 -v_dquantoption 2 -v_loopfilter 1 -v_lookahead 8 -v_mmatch 0 -v_mslevel 3 -v_msrange 0 -v_mvcost 1 -v_numthreads 2 -a_codec wmapro -a_mode 0 -a_setting 96_48_2
You don't need v_numthreads - the codec automatically will use up to 4 CPU cores. Also, v_lookahead only works in 1p CBR mode, so it's useless here.
Try this line:
-v_codec WMV9 -v_quality 90 -v_bframedist 1 -v_bdeltaqp 1 -v_dquantoption 2 -v_loopfilter 1 -v_mmatch 0 -v_mslevel 1 -v_msrange 0 -a_codec wmapro -a_setting 96_48_2_16
B-frame distance is most optimal at 1, and that ought to speed up things a little. You should also see a performance boost from switching to v_mslevel 1.
You can get even better quality with v_mmatch 2, but it will come at a noticeable performance cost.
Any suggestions for this profile or the others? I should add that while this profile is a 'quality' profile and could be expected to be slower, even the 'quick' profiles are not much faster which suggests some tweaking might be in order. To give a comparison, x264, which ain't exactly a speed demon encodes at around 20-22fps on this machine using the crf profile with most of the goodies. I would be surprised if wmv would be 3x slower after tweaking.
At this quality level, that'll be as fast as things will go. The only way to speed it up even further is to get a quadcore system.
On a separate note, I've already noticed several people using the wrong syntax for WMA Pro formats. The correct syntax is Bitrate_SampleRate_Channels_BitDepth. The wmcmd.vbs script has some code that tries to guess the codec (std or pro) based on this format, so if you don't specify it right - there's a chance the wrong codec will get used even if you specified the right one.
Sirber
6th December 2006, 22:15
For anime content, wouldn't 3 bf be more optimal than 1?
buzzqw
6th December 2006, 22:41
@zambelli
got all point. THANKS!
here the 1.1 version of wmv profiles
www.64k.it/andres/data/w/WMV-profiles_1.1.rar
anyone feel free to propose change (expecially Zambelli !)
thanks again
BHH
DDogg
6th December 2006, 22:51
You don't need v_numthreads - the codec automatically will use up to 4 CPU cores. Also, v_lookahead only works in 1p CBR mode, so it's useless here.
Try this line:
-v_codec WMV9 -v_quality 90 -v_bframedist 1 -v_bdeltaqp 1 -v_dquantoption 2 -v_loopfilter 1 -v_mmatch 0
-v_mslevel 1 -v_msrange 0 -a_codec wmapro -a_setting 96_48_2_16
B-frame distance is most optimal at 1, and that ought to speed up things a little. You should also see a performance boost from switching to v_mslevel 1.
You can get even better quality with v_mmatch 2, but it will come at a noticeable performance cost.
While the speed does increase to .80 ish, the quality is unusable (to me) and scenes with high motion become jerky and granulated - this is with the above line as well as changing to v_mmatch 2 where the speed decreased to 0.4x
On a separate note, I've already noticed several people using the wrong syntax for WMA Pro formats. The correct syntax is Bitrate_SampleRate_Channels_BitDepth. The wmcmd.vbs script has some code that tries to guess the codec (std or pro) based on this format, so if you don't specify it right - there's a chance the wrong codec will get used even if you specified the right one.Thanks for that info. I made this slight mod, per your instructions (if I got you right) to the 1_pass_cbr_quick and it seems to deliver a good quality at x.7 ish speed. Hard to quote the speed as I am simply looking at the cmdline, waiting for it to stabilize, while doing the encode. -v_codec WMV9 -v_mode 2 -v_quality 90 -s_config "C:\work1\temp\wmv_crb" -v_bframedist 1 -v_loopfilter 0
-v_lookahead 0 -v_mmatch 0 -v_msrange 0 -v_mvcost 0 -a_codec WMASTD -a_mode 0 -title qweqwe
-a_setting 96_48_2_16 I would think some of the arguments are not needed since they are 0? Can you suggest an abbreviated form?
zambelli
6th December 2006, 23:11
While the speed does increase to .80 ish, the quality is unusable (to me) and scenes with high motion become jerky and granulated - this is with the above line as well as changing to v_mmatch 2 where the speed decreased to 0.4x
Really? The only thing I changed significantly from your first encoding line was B-frame count. I guess you can try bumping it up to 2 or 3, but I would expect the quality to diminish with that, not improve.
Thanks for that info. I made this slight mod, per your instructions (if I got you right) to the 1_pass_cbr_quick and it seems to deliver a good quality at x.7 ish speed.
CBR? Are you trying to encode CBR? You're specifying VBR in your command line.
I would think some of the arguments are not needed since they are 0? Can you suggest an abbreviated form?
0 is not always default because some negative registry values are offset in the command-line version.
-v_codec WMV9 -v_mode 2 -v_quality 90 -s_config "C:\work1\temp\wmv_crb" -v_bframedist 1 -v_mmatch 0 -v_msrange 0 -a_codec WMAPRO -a_mode 0 -title qweqwe
-a_setting 96_48_2_16
This would the abbreviated form of your version. And once again, the a_setting did not match your audio codec. Run wmcmd.vbs with the a_formats parameter to see the list of supported audio formats.
buzzqw
6th December 2006, 23:12
@DDogg
i parsed even more settings in profile... and i use (write in cmd) only those different from default
BHH
zambelli
6th December 2006, 23:30
here the 1.1 version of wmv profiles
www.64k.it/andres/data/w/WMV-profiles_1.1.rar
anyone feel free to propose change (expecially Zambelli !)
The <NAME> parameter value is the same in all your profiles. You might want to change it. :)
For 1p CBR:
Increase v_buffer size. Try setting it to 10000 or 20000 msec.
Use v_lookahead 16.
For best quality profiles:
Use v_mslevel 4.
Use v_performance 80.
Use v_mmatch 2.
For quick profiles:
Use v_mslevel 1.
Use v_performance 60.
Use v_mmatch 0.
You can use dquant - it doesn't hurt performance.
For all:
Don't use v_percopt.
Use v_msrange 0.
Use v_mvcost 1.
Don't set v_numthreads. It's unnecessary and will hurt perf on multicore computers.
Try v_overlap 1. It might help out at 512kbps.
buzzqw
7th December 2006, 09:48
here is the update www.64k.it/andres/data/w/WMV-profiles_1.2.rar
some parameters are changed since i had add even wmv8
one more question please: on one pc
Microsoft (R) Windows Script Host Versione 5.6
Copyright (C) Microsoft Corporation 1996-2001. Tutti i diritti riservati.
Microsoft (R) Windows Media Encoder Command Line Script Utility
Copyright (C) Microsoft Corporation. All rights reserved.
Copyright: Done with AutoMKV!
Warning: Encoder failed to retrieve duration attribute from source plug-in.
Trying alternate method now.
Opening source.............
Source duration successfully retrieved: 12,416 seconds.
======== Begin Pass1 ========
Read: 10,1s (81,2%) Elapsed: 00:00:02 Left: 00:00:00 [5,04x]
======== Begin Pass2 ========
Encoded: 3,8s (30,2%) Elapsed: 00:00:00 Left: 00:00:00 [3750x]
the duration is determined correclty, on another pc (same setup i think, wvc1 sdk, wmse,wmp11) the duration isn't determined and so the final size of movie is slightly smaller.
What prerequisite allow to determine the Source duration ?
BHH
zambelli
8th December 2006, 00:50
the duration is determined correclty, on another pc (same setup i think, wvc1 sdk, wmse,wmp11) the duration isn't determined and so the final size of movie is slightly smaller.
What prerequisite allow to determine the Source duration ?
A valid WMP install and the ability to play .avs in Avisynth. Essentially, I couldn't get the Avisynth duration from the WME9 source filter, and VBScript not being capable of low-level VfW implementation, I had to rely on the WMP ActiveX object to retrieve the source duration. The script instantiates an invisible WMP OCX, load the .avs, plays it for a second or two, then closes and deletes the WMP object. It's not the most elegant of solutions, but it's the only one I could implement in VBScript.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.