View Full Version : WMV picture quality - how to improve?
Maciek
3rd July 2008, 14:17
I'm not sure if this is the right forum to ask this question so sorry if it isn't.
How can I improve the picture quality of my WMV files (when I play them?)? Do ffdshow's quality settings apply to WMV files?
I remember a few years ago I watched WMV files on someone else's computer with an nVidia card that seemed to have some special video improving feature. When I played the same files on my computer they looked much worse.
Now that I have a new computer with an nVidia card I wonder if I have this feature(?) turned off (and maybe that's the reason my WMV files play so bad - lots of artifacts, playback isn't smooth etc).
So once again: Is there any way of improving WMV playback quality? Is there a feature in nVidia cards (I think it was called PureVideo, or something) that improves the video quality? Do ffdshow's settings apply to WMV files?
JohnnyMalaria
3rd July 2008, 15:04
Have you tried different players? For WMV, WMP does a great job (IMHO!)
Sharktooth
3rd July 2008, 15:32
purevideo cant do miracles.
if your file looks like crap... it looks like crap.
if you made the file, next time use a better video encoder (h.264 for example), if you got the files from some web services, try avoiding those services using WMV and look for those which use better encoders.
benwaggoner
7th July 2008, 01:24
purevideo cant do miracles.
if your file looks like crap... it looks like crap.
if you made the file, next time use a better video encoder (h.264 for example), if you got the files from some web services, try avoiding those services using WMV and look for those which use better encoders.
Oh 'cmon. Really, how much video that actively looks bad would look good just with a codec switch? Most bad video that's really bad has either source/processings errors or bad settings applied.
Dark Shikari
7th July 2008, 01:47
Oh 'cmon. Really, how much video that actively looks bad would look good just with a codec switch? Most bad video that's really bad has either source/processings errors or bad settings applied.I have loads of gameplay videos that look awful at 2-3 megabit WMV but look great if you do the same encode with x264... even at half the bitrate. ;)
Its quite reasonable from my experience to say "use H.264, it will look better," especially given how utterly awful the old Windows Media Encoder is, which is still the main free option for WMV encoding.
benwaggoner
7th July 2008, 16:21
I have loads of gameplay videos that look awful at 2-3 megabit WMV but look great if you do the same encode with x264... even at half the bitrate. ;)
But what are you encoding with? You know more than anyone that implementations and settings matter more than codecs.
Would you like me to compare PEP to QuickTime's H.264 exporter :)?
Its quite reasonable from my experience to say "use H.264, it will look better," especially given how utterly awful the old Windows Media Encoder is, which is still the main free option for WMV encoding.
AVS2ASF? That's free and has the much better VC-1 Encoder SDK Pro. For stuff like game captures, chroma search is extremely useful, as are B-frames, neither of which would be on by default in WME unless you're using WMV9 PowerToy.
Also, WME is over five years old now, and has lousy preprocessing, so if you're doing any scaling or deinterlacing, quality issues may be more due to that than anything in the codec.
I'd be happy to help you craft some optimized VC-1 settings for game recordings. I've got some similar walkthroughs on my blog.
You can also try the 30-day trial of Expression Encoder 2 to see if you like it. Heck, you find it useful, I'm sure I can swing a free copy for you :).
Sharktooth
7th July 2008, 16:24
meh... just downloading the free trial.
let's try it... then we'll see.
Dark Shikari
7th July 2008, 16:29
AVS2ASF? That's free and has the much better VC-1 Encoder SDK Pro. For stuff like game captures, chroma search is extremely useful, as are B-frames, neither of which would be on by default in WME unless you're using WMV9 PowerToy.I've been using WMCMD.vbs with "Insane" for all my WMV needs, so at least I'm making the most of WME ;)
I'll try out the VC-1 SDK sometime; I hope it does a better job, though obviously it can't really make up for the weaknesses of WMV.
benwaggoner
7th July 2008, 16:47
I've been using WMCMD.vbs with "Insane" for all my WMV needs, so at least I'm making the most of WME ;)
That can certainly help, although it's a general tuning. For game footage, I'd definitely turn on adaptive deadzone and go to at least 2 B-Frames.
Still won't help with prerproc :).
I'll try out the VC-1 SDK sometime; I hope it does a better job, though obviously it can't really make up for the weaknesses of WMV.
It does. What are the weaknesses you're thinking about?
Dark Shikari
7th July 2008, 16:51
It does. What are the weaknesses you're thinking about?Don't make me go into this again ;). So-weak-as-to-be-useless deblocking filter, no CABAC, no multiref, no pyramidal B-frames, no spatial intra prediction, etc, etc, etc. Its sort of like an upgrade of MPEG-4 ASP rather than a competitor to H.264; I don't really see them in the same playing field nor as competitors.
benwaggoner
7th July 2008, 16:56
Don't make me go into this again ;). So-weak-as-to-be-useless deblocking filter, no CABAC, no multiref, no pyramidal B-frames, no spatial intra prediction, etc, etc, etc. Its sort of like an upgrade of MPEG-4 ASP rather than a competitor to H.264; I don't really see them in the same playing field nor as competitors.
It's a different feature set, with different strengths, certainly.
In practice, I'd say the in-loop deblocking filter is the main source of the different performance between H.264 and VC-1. CABAC and multiple reference frames and pyramid B sound great in theory, but it's rare I've seen them make that big of a practical difference in the kind of real-world content I do (clean animation source is probably the biggest area where they really help H.264, which I don't do a lot of). Judicoius use of BI frames in VC-1 fixes the "flash frame" triggering a new GOP problem MPEG-2 and ASP have with much lower encode/decode complexity.
VC-1 also has the assumption that an adaptive postprocessor is availble on decode.
Dark Shikari
7th July 2008, 17:00
CABAC and multiple reference frames and pyramid B sound great in theory , but it's rare I've seen them make that big of a practical difference in the kind of real-world content I do (clean animation source is probably the biggest area where they really help H.264, which I don't do a lot of)Oh really (http://akuvian.org/src/x264/entropy_mpegcif_avg.png)? I'd say those three features combined can give at least a 30-40% advantage on live content and a 100-150% advantage on animated/game footage if not more, from my experience. If you don't use an inter bias of some sort (e.g. Psy RDO or Mainconcept's FGO), spatial intra prediction gives an enormous benefit; if you do use an inter bias, multiref and B-pyramid gives a huge benefit, so something helps either way.
Anyways, its time to put AVS2ASF through my torture test (http://mirror05.x264.nl/Dark/x264vsElecard/) ;)
benwaggoner
7th July 2008, 17:04
Oh really (http://akuvian.org/src/x264/entropy_mpegcif_avg.png)? I'd say those three features combined can give at least a 30-40% advantage on live content and a 100-150% advantage on animated/game footage if not more, from my experience. If you don't use an inter bias of some sort (e.g. Psy RDO or Mainconcept's FGO), spatial intra prediction gives an enormous benefit; if you do use an inter bias, multiref and B-pyramid gives a huge benefit, so something helps either way.
Anyways, its time to put AVS2ASF through my torture test (http://mirror05.x264.nl/Dark/x264vsElecard/) ;)
Wow, I'd really love to hear what you find there!
I'd be happy to help recommend some tunings when you get some test clips out of that.
If you'd like me to try with some more advanced VC-1 implementations, I'd love to take a look at your source.
But yes, that's the kind of content where H.264 should do particularly well I'd think.
Sharktooth
7th July 2008, 17:16
ok... im going to compress the hancock trailer with x264 and with expression encoder 2.0 at a rate of 1000kbps
i will resize to SD. suggested settings for expression encoder?
Dark Shikari
7th July 2008, 17:39
Wow, I'd really love to hear what you find there!Any chance on some settings recommendations? I don't want to finish this to find that I used crappy settings or the like ;)
Some things are obvious, but I'm not sure what the "sane range" for dquant is, for example, and this is a clip that benefits loads from AQ.
Edit: if I use the following it sits and does nothing, if I use AVS input it fails with error code "-30":
$ ./AVS2ASF.exe -i "th07e 2008-03-25 12-32-06-18.avi" -o test.asf -rate 1459 -c
omplexity 5 -bframes 3 -ratecontrol 4 -inloop 1 -overlap 1 -motionsearchlevel 3
-deltamvrange 3 -mesearchmethod 1 -mbcost 1 -mvcost 1 -mvrange 3 -dquantoption
3 -adaptivequant 2 -adaptiveGOP -keyPop 1 -profiletype 2 -peakrate 20000 -vbv
20000 -maxkeydist 600 -framerate 59.94
It won't accept framerate 60 (the correct framerate) either.
Sharktooth
7th July 2008, 18:22
try this one: http://kurtnoise.free.fr/misc/AVS2ASF-0.3_20080312.zip
Dark Shikari
7th July 2008, 18:25
try this one: http://kurtnoise.free.fr/misc/AVS2ASF-0.3_20080312.zipStill terminates with error "-30".
Sharktooth
7th July 2008, 18:31
try using an .avs as input file. the nic modified version has support for avisynth.
Dark Shikari
7th July 2008, 18:39
try using an .avs as input file. the nic modified version has support for avisynth.As I said, I already am.
Sharktooth
7th July 2008, 18:42
sorry. then dunno why it's not working.
im actually using expression encoder 2 to do the job. it should be based on the same encoder as avs2asf, however it's only 30 day trial.
the interface is nice though. id's say it's quite a good piece of software... but it only supports VC-1.
if it had additional support for mpeg4 or even mpeg2 and some more output containers i'd buy it.
@ben: is there a WMA10 cli encoder too?
Dark Shikari
7th July 2008, 19:40
I made an encode using Expression Encoder trial on "Best" mode, in 2pass of course.
Unfortunately, the result was--to say the least--atrocious. The quality is overall slightly better than Xvid (not saying much, Xvid is absolutely awful in this case, with P-frame quants in the 20s), but there's a serious artifacting issue in the interface on the right side, most likely due to a combination of bad P-skip decision and bad P-skip MV prediction (no real knowledge of the VC-1 spec here, but I'm guessing that unlike in H.264, VC-1 doesn't say that if a neighboring MV is zero, the skip vector for the current MB is also zero).
The result of this artifacting is a massive visual distraction that just looks awful. Add in the complete blockiness, I-frame "popping," and just general low quality, and well... you can see what I mean when I say that WMV just isn't up to the task :p The ratecontrol is pretty bad too--the first GOP looks pretty decent and then it goes completely downhill from there (despite using 2pass mode).
If there's other options to adjust in Expression Encoder, I couldn't find them.
Reference links:
x264 (http://mirror05.x264.nl/Dark/Flash/x264_touhou_psyrdo.mp4)
Xvid (http://mirror05.x264.nl/Dark/Flash/Xvid_touhou.avi)
WMV (http://mirror05.x264.nl/Dark/Flash/VC1_touhou.wmv)
Sharktooth
7th July 2008, 19:48
in case you didnt notce (since you didnt wrote about the settings) in the right bar, just scroll down (after you selected the basic options for video) and unroll advanced codec settings (just under the presets group - you choosen best - ont the bottom edge, there's a down arrow... click it).
Dark Shikari
7th July 2008, 20:41
There isn't any such button in my Expression Encoder...
Edit: Seems the Microsoft website referred me to the old version... downloading the [much larger] new version now.
Sagittaire
7th July 2008, 21:12
dquant higher than 1 is buggy ... try that for maximum quality:
@REM Source file name (suffit de mettre la source ici)
set E_SRC=hjhjhhjjh.avs
@REM Set of bitrates (ici le bitrate)
set E_BR=12000
@REM Set of max bitrates (ici le bitrate max)
set MAX_BR=40000
@REM Set of Buffer (ici le buffer)
set BUF_BR=3750000
@REM Profil (ici le nom des fichiers de sortie)
AVS2ASF.exe -i %E_SRC% -o azerty.vc1 -rate %E_BR% -peakrate %MAX_BR% -vbv %BUF_BR% -framerate 23.976 -ratecontrol 3 -profiletype 2 -maxkeydist 240 -bframes 1 -adaptiveGOP -keyPop 1 -inloop 1 -overlap 1 -complexity 5 -motionsearchlevel 2 -mesearchmethod 1 -mbcost 1 -mvcost 1 -mvrange 4 -adaptivequant 1 -dquantoption 1
pause
Sharktooth
7th July 2008, 21:15
DQuant = 1 is for I frames only... isnt it?
Dark Shikari
7th July 2008, 21:34
I tried to download the enormous 210MB Expression Encoder 2, but both times it was corrupt (in the exact same location) despite using a download manager one time and not the other.
It would be nice if Microsoft offered versions of their products that actually worked ;)
Sharktooth
7th July 2008, 21:44
it worked for me...
Dark Shikari
7th July 2008, 21:47
Seems despite the corruption I was able to force it to install with a bit of creativity. Tests will follow.
Sharktooth
7th July 2008, 21:50
it's damn slow at encoding... at least at higher complexity modes.
when i mean slow... i mean REALLY slow.
Sagittaire
8th July 2008, 00:09
DQuant = 1 is for I frames only... isnt it?
yes other setting don't work. Anyway Dquant is not recommended setting at low bitrate.
Dark Shikari
8th July 2008, 02:14
I encoded with EE2 on slowest settings--it took over three hours (!). Unfortunately, its hardly any better (http://mirror05.x264.nl/Dark/Flash/VC1_touhou_EE2.wmv).
Sharktooth
8th July 2008, 03:16
did you find the other encoder options?
Dark Shikari
8th July 2008, 04:14
did you find the other encoder options?Yes, I basically maxed all the encoder settings (True Chroma, Hadamard only for motion search, etc).
Sharktooth
8th July 2008, 04:15
Not the best quality settings at all but... should be enough for a fast comparison
http://mirror05.x264.nl/Sharktooth/MeGUI/hancock2.mp4
encoded with MeGUI's HQ slowest profile @ 1000kbps (using fast first pass)
avs script:
DirectShowSource("hancock-tlr2r_1080p.mp4",fps=23.976,audio=false)
LanczosResize(720,400) # Lanczos (Sharp)
Source Apple's Hancock HD trailer 2 (http://www.apple.com/trailers/sony_pictures/hancock/hd/) (remuxed into mp4 for convenience)
let's see if anyone can produce a better looking VC-1 encode with the same avs (no preprocessing!) using the same bitrate
benwaggoner
8th July 2008, 08:46
Yes, I basically maxed all the encoder settings (True Chroma, Hadamard only for motion search, etc).
Can you give the specifics of what you tried? It's rarely a matter of "maxing out" - most of the advanced settings are somewhat context specific (the stuff there was always a right answer to, we did that way).
Among other things, it looks like you used DQuant on every frame, and 7 B-frames in a row! That many B-frames means you're getting more bits in non-reference frames than reference frames. Also, your motion search range is too high for the content, slowing your encode a ton and probably letting a few erroneous vectors sneak in where there's matches in different parts of the screen.
We can probably reduce the encoding time a bunch while improving quality.
It's definitely a weird clip, so I don't have an immediate confidence in the optimum settings. Without having the source to tweak, I'd probably start with something like:
Video:
Frame Rate: Source
Key frame interval: 10 seconds?
Profile: VC-1 Advanced Profile
Mode: VBR Peak Constrained
Bitrate: 1500
Peak bitrate: 3000? (whatever you're testing)
Peak buffer size: same as key frame interval
Width: 640
Height: 480
Pre-Processing
Deinterlacing: Off (just in case the source codec was flagged wrong)
Advanced Codec Settings:
Video Complexity: 5 (4 is normally just as good, but this is an odd clip...)
Adaptive Deadzone: Conservative (maybe try with off as well. Aggressive is almost never helpful, but might be an interesting experiment with this odd source)
DQuant: Off or I-frame only
In-Loop: On
Overlap: On
B-Frame Number: 2? (might try 1 as well)
Scene Change Detection: On
Adaptive GOP: On
Closed GOP: Off
Chroma Search: Full True Chroma
Match Method: Adaptive (sometimes works better than full Hadamard, and faster)
Search Range: Adaptive (I don't see any motion that's more than 64/32 with IBBP, but just in case, Adaptive would find it).
Dark Shikari
8th July 2008, 14:21
Among other things, it looks like you used DQuant on every frameSounds like a damn good idea given the results from x264--unless Dquant isn't what it should be (spatial complexity mask).
and 7 B-frames in a row!Wait, are you telling me EE2 doesn't have adaptive B-frame decision? :confused:
benwaggoner
8th July 2008, 15:55
Sounds like a damn good idea given the results from x264--unless Dquant isn't what it should be (spatial complexity mask).
The DQuant implementation used in the VC-1 Encoder SDK version included in Expression Encoder can to aggressively shift bits to smooth areas of the image, starving more complex areas of the image of bits and driving up their QP. It's really tuned more for Blu-ray bitrates.
We have a much better low bitrate tuned vesrion of DQuant in the current PEP release, but that hasn't migrated itself back into EE yet.
Wait, are you telling me EE2 doesn't have adaptive B-frame decision? :confused:
It's adaptive for special cases, like switching to P-frames for fades in order to use intensity compensation and to use BI frames for flashes. But the parameter isn't there to set maximum B-frame distance, but to set the target B-frame distance for when nothing unusual is going on.
Dark Shikari
8th July 2008, 16:06
The DQuant implementation used in the VC-1 Encoder SDK version included in Expression Encoder can to aggressively shift bits to smooth areas of the image, starving more complex areas of the image of bits and driving up their QP.Sounds exactly like x264's adaptive quantization. Either way, I'll drop it only to I-frames if that's what you think is reasonable.
It's adaptive for special cases, like switching to P-frames for fades in order to use intensity compensation and to use BI frames for flashes. But the parameter isn't there to set maximum B-frame distance, but to set the target B-frame distance for when nothing unusual is going on.Ah, that makes sense.
benwaggoner
8th July 2008, 16:12
Sounds exactly like x264's adaptive quantization. Either way, I'll drop it only to I-frames if that's what you think is reasonable.
You might want to try it with I-frame DQuant on and off. With this clip, it's kind of a tossup if there's low enough motion in the textured and smooth areas that it's worth shifting some bits to the I-frames to make it look better. I've had good results with I-frame DQuant for CGI and screen captures, which are something like this.
Is the source uncompressed straight from a frame buffer, or is there a little analog noise in it? If there's any noise, I-frame DQuant woudl be less helpful, and you might be better off letting those bits go somewhere else.
Dark Shikari
8th July 2008, 16:16
Is the source uncompressed straight from a frame buffer, or is there a little analog noise in it? If there's any noise, I-frame DQuant woudl be less helpful, and you might be better off letting those bits go somewhere else.Its lossless, straight from the framebuffer.
An encode with the following changed is going now:
Motion range -> Adaptive
Bframes -> 1
Deadzone -> Conservative
Dquant -> I-frames only
Match Method -> Adaptive
benwaggoner
8th July 2008, 16:29
Its lossless, straight from the framebuffer.
An encode with the following changed is going now:
Motion range -> Adaptive
Bframes -> 1
Deadzone -> Conservative
Dquant -> I-frames only
Match Method -> Adaptive
Sound good. Let me know how it goes.
I'm intrigued by that source; if you have any way to share it, I'd be happy to run it through the combinations and tell you what works best.
Dark Shikari
8th July 2008, 16:35
Sound good. Let me know how it goes.
I'm intrigued by that source; if you have any way to share it, I'd be happy to run it through the combinations and tell you what works best.Here is an H.264 lossless (http://mirror05.x264.nl/Dark/force.php?file=./LosslessTouhou.mkv) version of a shorter clip (from the same boss fight in the same game, but a different runthrough). Unfortunately it doesn't have much of the difficult blue-background section at the beginning, so its not as tough a source.
This particular clip is also being used by one of the GSOC students as a torture test for reference frame decision.
*.mp4 guy
8th July 2008, 16:42
Not the best quality settings at all but... should be enough for a fast comparison
http://mirror05.x264.nl/Sharktooth/MeGUI/hancock2.mp4
encoded with MeGUI's HQ slowest profile @ 1000kbps (using fast first pass)
avs script:
DirectShowSource("hancock-tlr2r_1080p.mp4",fps=23.976,audio=false)
LanczosResize(720,400) # Lanczos (Sharp)
Source Apple's Hancock HD trailer 2 (http://www.apple.com/trailers/sony_pictures/hancock/hd/) (remuxed into mp4 for convenience)
let's see if anyone can produce a better looking VC-1 encode with the same avs (no preprocessing!) using the same bitrate
I must have missed something, where is the wmv encoded trailer?
Sharktooth
8th July 2008, 16:43
im looking for someone that can make it, since i received no advice on VC-1 settings to use for that clip.
benwaggoner
8th July 2008, 17:06
im looking for someone that can make it, since i received no advice on VC-1 settings to use for that clip.
You can use this as a starting point:
http://on10.net/blogs/benwagg/21587/
Sharktooth
8th July 2008, 18:38
starting point? i've provided the source and i'd like some more info than a starting point since EE2 takes quite some time to encode and i use my PC for other tasks too.
ok... never mind... ill see what i can do.
just dont make me do 10000 test encodes...
benwaggoner
8th July 2008, 19:26
starting point? i've provided the source and i'd like some more info than a starting point since EE2 takes quite some time to encode and i use my PC for other tasks too.
ok... never mind... ill see what i can do.
just dont make me do 10000 test encodes...
Oh, I imagine those settings are going to be quite close once you fix the bitrate and such.
Sharktooth
8th July 2008, 20:20
so am i correct in assuming that if i use the settings in the linked "guide", the result will be pretty close to the hypotetical maximum quality?
benwaggoner
8th July 2008, 20:22
so am i correct in assuming that if i use the settings in the linked "guide", the result will be pretty close to the hypotetical maximum quality?
I hope so. I haven't had a chance to look at the source carefully, though.
If there's obvious compression noise, using the "Denoise" filter may help a bit.
Sharktooth
8th July 2008, 20:28
i dont think the pre-processing is part of the VC-1 standard, and even if it is, it's just a nonsense. so to be sure to make a fair comparison, all preprocessing is done in the .avs just to be sure to use the same pre-processing filters for both codec.
in this case the only filter used is LanczosResize() to downscake from 1080p to SD.
EDIT: i started the encoding with your suggested settings except the fact i set VBR unconstrained coz i didnt put any VBV limits for x264
Just a side note... x264 took less than 20 mins (both passes) to encode on my old trusty Athlon XP 3000+ box, EE2 first pass took about 17 mins, the second pass is going to take about 2 hours... arghhh... thanks M$ for not optimizing softwares!
EDIT2: i give up. i cant wait 2 hours for a 3 minutes trailer...
wtf even x264 at insane settings doesnt takes so much...
Partial encoding (probably seeking doesnt work): http://mirror05.x264.nl/Sharktooth/MeGUI/partial_hancock.wmv
draw your conclusions. to me the winner is... x264. faster and better... and i didnt even use max quality settings...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.