View Full Version : Quality trouble
Solon8
1st June 2015, 23:48
Hello everyone,
I'm using the x264's Slow preset with MeGUI, but I don't know... there's something bugging me.
In the video, the faces or objects that are close to the camera are detailed, clean, looking-good! But when it's in the background, like a person or whatever, then the quality isn't that great, almost grainy, it loses its detail. Beside increasing bitrate, is there a parameter I should try changing for that issue?
I don't know if it's because I'm getting used to the video quality I'm watching, but I did not have this problem a few years ago, with an actually faster preset. I don't get it.
:thanks:
hello_hello
2nd June 2015, 03:08
What bitrate/CRF value are you using?
Can you post a source vs encode screenshot as an example?
Solon8
2nd June 2015, 16:31
I bought the movie from an online french VOD service, and I'm trying to reencode it to the best size/quality ratio because I don't have a lot of space on my HD, so I'm using 950 kbps for the video.
Source: http://i.imgur.com/SKH9BB5.jpg
Reencoded: http://i.imgur.com/tagbnwk.jpg
Is it just a matter of bitrate, or should I play with... I don't know, the deblocking maybe or something like it?
Groucho2004
2nd June 2015, 16:57
I don't have a lot of space on my HD, so I'm using 950 kbps for the video.
...
Is it just a matter of bitrate, or should I play with... I don't know, the deblocking maybe or something like it?
The bitrate is very low for 1280x544. That's most likely the biggest problem.
Without knowing your entire x264 command line it's difficult to suggest something since I don't know into which command line "Slow preset with MeGUI" translates.
Some general hints:
Increase bitrate to at least 2Mbps
If the above results into a unacceptable file size, reduce frame size
Use a slower x264 preset
foxyshadis
3rd June 2015, 10:27
What are you playing back to? If you're using PC only for now, would you be willing to switch to x265 instead? It's much slower, but even on medium preset would look better than x264 at these low bitrates. Otherwise, you're right at the point where reducing the resolution is beneficial, as Groucho said. Chopping the edges off and making it 16:9 would also help without sacrificing too much, relative to the quality gain. Try a scene with a couple different methods to see what you can tolerate best.
hello_hello
3rd June 2015, 11:44
I assume the slow x264 preset with MeGUI is literally the default x264 settings with the slow x264 speed preset? If so, that should be fine.
If the video isn't being resized or filtered in any way then it can only be the bitrate if you're not using "odd" encoder settings (noise filtering can blur a little as well as reduce noise so use it if you think it's necessary as that'll help keep the bitrate down but don't apply heavy noise filtering if it's not required).
CRF encoding is a better idea because you pick the quality and after a while you'll find a CRF value that gives you an average file size you're happy with and hopefully a quality you can live with. The file sizes will vary quite a bit which is why I say "an average" file size.
Maybe start with the default CRF value of 23 (lower values = higher quality) and check the resulting bitrate. If you're happy with the quality that might give you an indication as to whether your current bitrate is realistic.
You can encode small sections of video for testing rather than encode it all (although still encode a decent amount) by adding Trim() to the end of a script. For example to encode frames 1000 to 2000 you could use this:
Trim(1000,2000)
And I assume you're using "automated 2 pass" or "targeting file size" encoding (same thing for MeGUI) and not ABR (average bitrate) encoding in order to specify a bitrate, because especially at low bitrates, 2 pass would probably do a much better job.
Solon8
3rd June 2015, 14:39
The bitrate is very low for 1280x544. That's most likely the biggest problem.
Without knowing your entire x264 command line it's difficult to suggest something since I don't know into which command line "Slow preset with MeGUI" translates.
Some general hints:
Increase bitrate to at least 2Mbps
If the above results into a unacceptable file size, reduce frame size
Use a slower x264 preset
I know the bitrate is quite low. But I heard about popular Internet groups that encode movies at such bitrate or even lower.
And like I said, I used to do it with my own videos and I was satisfied with it, but not anymore now I got new settings and lost the old ones.
What are you playing back to? If you're using PC only for now, would you be willing to switch to x265 instead? It's much slower, but even on medium preset would look better than x264 at these low bitrates. Otherwise, you're right at the point where reducing the resolution is beneficial, as Groucho said. Chopping the edges off and making it 16:9 would also help without sacrificing too much, relative to the quality gain. Try a scene with a couple different methods to see what you can tolerate best.
I've tried it but it's way too slow. The quality is good though (to my standards), but it's too slow and my TV can't even play it. So I'll stick to x264 for now.
I assume the slow x264 preset with MeGUI is literally the default x264 settings with the slow x264 speed preset? If so, that should be fine.
If the video isn't being resized or filtered in any way then it can only be the bitrate if you're not using "odd" encoder settings (noise filtering can blur a little as well as reduce noise so use it if you think it's necessary as that'll help keep the bitrate down but don't apply heavy noise filtering if it's not required).
CRF encoding is a better idea because you pick the quality and after a while you'll find a CRF value that gives you an average file size you're happy with and hopefully a quality you can live with. The file sizes will vary quite a bit which is why I say "an average" file size.
Maybe start with the default CRF value of 23 (lower values = higher quality) and check the resulting bitrate. If you're happy with the quality that might give you an indication as to whether your current bitrate is realistic.
You can encode small sections of video for testing rather than encode it all (although still encode a decent amount) by adding Trim() to the end of a script. For example to encode frames 1000 to 2000 you could use this:
Trim(1000,2000)
And I assume you're using "automated 2 pass" or "targeting file size" encoding (same thing for MeGUI) and not ABR (average bitrate) encoding in order to specify a bitrate, because especially at low bitrates, 2 pass would probably do a much better job.
Yep, I'm talking about the Slow x264 speed preset. But I even tried Slower and Very Slow but it doesn't solve my problem and, remember, a few years ago I was using the Medium preset, with even lower bitrate and it was fine (to my standards). Maybe my eyes got used to the quality and I'm more demanding? But you know, in MeGUI, what the presets don't change is: the deblocking values, the psy-rd, the qmin/qmax and the AQ strength (maybe some others that I haven't noticed). So if using slower presets doesn't help, the problem must come from these values, no? (and the bitrate)
Yes, I'm using 2-pass encoding but I think you're right, I think CRF encoding is a better choice than picking bitrate in my case. I just need to find the right value for me.
Thank you all for your replies!
foxyshadis
3rd June 2015, 14:52
If you're talking about YIFY, your encoding screenshot is what I would expect from them, in fact maybe a little better. I think you've just been spoiled (happens to us all!). A combination of a little crop & resize will help a little, but you can't expect a miracle when you're conserving space either.
hello_hello
3rd June 2015, 14:56
I know the bitrate is quite low. But I heard about popular Internet groups that encode movies at such bitrate or even lower.
And like I said, I used to do it with my own videos and I was satisfied with it, but not anymore now I got new settings and lost the old ones.
Personally I think most of the encodes you're referring to look pretty average. The more you encode, the more bad stuff you notice and the fussier you become, I find. Have you changed your TV or viewing conditions at all?
But you know, in MeGUI, what the presets don't change is: the deblocking values, the psy-rd, the qmin/qmax and the AQ strength (maybe some others that I haven't noticed). So if using slower presets doesn't help, the problem must come from these values, no? (and the bitrate)
MeGUI doesn't have any x264 presets as such. It used to, but if you're using the old encoder presets found in the drop down box in MeGUI's main window delete them as they'll be old an outdated, then create your own.
The encoder configuration lets you select an x264 speed preset. It simply adds something like --preset slow to the command line, but if you show the advanced settings you'll see the appropriate ones are changed accordingly.
The deblocking, psy and AQ strength settings are changed when you select an appropriate x264 tuning. For example when Tuning "None" is selected the deblock settings are zero and zero, select Tuning "Film" and they'll change to -1 and -1 under the advanced settings tab as they're the defaults for the film tuning, but you'll just see --tune film in the command line.
Solon8
3rd June 2015, 15:21
The encoder configuration lets you select an x264 speed preset. It simply adds something like --preset slow to the command line, but if you show the advanced settings you'll see the appropriate ones are changed accordingly.
Yes, yes, we're talking about the same thing.
The deblocking, psy and AQ strength settings are changed when you select an appropriate x264 tuning. For example when Tuning "None" is selected the deblock settings are zero and zero, select Tuning "Film" and they'll change to -1 and -1 under the advanced settings tab as they're the defaults for the film tuning, but you'll just see --tune film in the command line.
Ah, OK! So --tune changes these. I'll try with --tune film.
Also, since you mention the viewing, now I think about, could my player settings be the cause of this? I don't remember using specific settings before, just the K-Lite Codec Pack maybe, but now I'm on a new computer I may not have the same settings.
If I use MadRV or whatever (with MPC), could that make my film look better?
Edit:Quicky question: I remember a time where the default qmin was 10, now it's 0 and the default qmax was 51, now it's 69. Why has it change so much? And is 0/69/4 really better than 10/51/4 on all occasion?
foxyshadis
3rd June 2015, 15:38
69 is only for 10-bit x264. 8-bit will silently accept it, but change it back to 51.
Groucho2004
3rd June 2015, 16:46
But I heard about popular Internet groups that encode movies at such bitrate or even lower.
Excellent point of reference. :(
You have to realize that the required bitrate for the same perceived quality depends largely on the nature of the movie/video. For a Cartoon you probably won't need more than 1Mbps for 720p but for a movie like "300" or "Black Swan" which have artificially added noise you need easily 10Mbps.
I noticed that your re-encoded screen shot is not only from a different frame than the source, it's also very blurry. Did you add any filters?
Solon8
3rd June 2015, 16:52
69 is only for 10-bit x264. 8-bit will silently accept it, but change it back to 51.
Oh OK, thanks. What about qmin ? (from 10 to 0)
I noticed that your re-encoded screen shot is not only from a different frame than the source, it's also very blurry. Did you add any filters?
I noticed I saved the wrong frame afterwards too.
No filter at all, beside the resize one (Lanczos sharp).
This was my encoding settings:
"cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=20 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=950 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00"
See anything particularly wrong with it? Beside the low bitrate.
Groucho2004
3rd June 2015, 17:41
"cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=20 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass / mbtree=1 / bitrate=950 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00"
See anything particularly wrong with it? Beside the low bitrate.
This looks more like a medium/slow preset. If you have enough CPU power I would change the following to increase quality at the same bitrate (roughly equivalent to --preset veryslow):
--ref 16
--subme 10
--me_range 24
--trellis 2
--bframes 8
hello_hello
4th June 2015, 20:02
Also, since you mention the viewing, now I think about, could my player settings be the cause of this? I don't remember using specific settings before, just the K-Lite Codec Pack maybe, but now I'm on a new computer I may not have the same settings.
You might want to check your video card's settings and disable any video enhancing stuff. That's likely to make it look worse if it's enabled by default. Other than that there's nothing else I can think of likely to effect the "quality" as such.
I don't know if modern video cards have noise or deblocking filters. Mine doesn't, but both can cause blurring. My TV's media player has noise filters but I disable all the video enhancing crap in the TVs settings too.
benwaggoner
4th June 2015, 22:37
In the video, the faces or objects that are close to the camera are detailed, clean, looking-good! But when it's in the background, like a person or whatever, then the quality isn't that great, almost grainy, it loses its detail. Beside increasing bitrate, is there a parameter I should try changing for that issue?
Lots of good advice in the thread.
But for that specific effect, that's an Adaptive Quant issue where QPs are too high for those flat/smooth slow moving areas.
Using a slower preset, and --tune film are both good. But if you're still not getting there, you could try --aq-mode 2.
It'd be nice if you could copy the full command line from MeGUI's last Advanced pane here.
Solon8
5th June 2015, 01:19
This looks more like a medium/slow preset. If you have enough CPU power I would change the following to increase quality at the same bitrate (roughly equivalent to --preset veryslow):
--ref 16
--subme 10
--me_range 24
--trellis 2
--bframes 8
I've tried those settings but the difference was not much unfortunately.
You might want to check your video card's settings and disable any video enhancing stuff. That's likely to make it look worse if it's enabled by default. Other than that there's nothing else I can think of likely to effect the "quality" as such.
I don't know if modern video cards have noise or deblocking filters. Mine doesn't, but both can cause blurring. My TV's media player has noise filters but I disable all the video enhancing crap in the TVs settings too.
I just checked and it doesn't seem to have any enhancement.
Lots of good advice in the thread.
But for that specific effect, that's an Adaptive Quant issue where QPs are too high for those flat/smooth slow moving areas.
Using a slower preset, and --tune film are both good. But if you're still not getting there, you could try --aq-mode 2.
It'd be nice if you could copy the full command line from MeGUI's last Advanced pane here.
I just tried it but the difference was not much either. I guess I hoped for a miracle, but I'll need to use a bigger bitrate for this movie.
Should I always use aq-mode 2 for all my files from now on? And if not, in what occasion should I use it?
Also, I just encoded the movie with a CRF of 26 and I find the quality acceptable (to my standards). I'll keep playing with the value, but from what I see, I think I'll stick to a range of 24-26. It seems to be the kind of quality/size I want to have. Does anyone disagree?
Thank you all for your replies.
Groucho2004
5th June 2015, 12:08
Also, I just encoded the movie with a CRF of 26 and I find the quality acceptable (to my standards).
Wow, I usually encode with CRF16 ~ CRF18. Anyway, whatever floats your boat. :)
Solon8
5th June 2015, 12:37
Wow, I usually encode with CRF16 ~ CRF18. Anyway, whatever floats your boat. :)
Yes, but you don't encode at 950 kbps either. ;) We knew we would use different CRF right away. :)
Groucho2004
5th June 2015, 12:53
Yes, but you don't encode at 950 kbps either. ;)
Sure I do. I encoded a bunch of Simpsons and Family Guy DVDs even below that bitrate.
stax76
5th June 2015, 13:05
Yes, but you don't encode at 950 kbps either. ;) We knew we would use different CRF right away. :)
What kind of drive do you have? Buying a larger drive not a option? I use 1080p with crf 23-24, my movies are 120 GB with 6,5 GB being the largest movie.
benwaggoner
6th June 2015, 18:52
I've tried those settings but the difference was not much unfortunately.
Yep. Other than a big bitrate change, encoding is often a game of accruing enough incremental changes to make a real difference.
Should I always use aq-mode 2 for all my files from now on? And if not, in what occasion should I use it?
This has been a long-outstanding question! It's still labeled "experimental" and some folks suggest it creates quality regressions in some cases. I've not found any real good test cases. I'm personally more interested in --aq-mode 3 which is the same as 2 but shifts more bits in low luma, which can be a big help when dealing with noisy blacks in 8-bit Rec. 709. Before I started doing a lot of testing with the HDR PQ space I didn't really how perceptually uniform gamma ISN'T.
Also, I just encoded the movie with a CRF of 26 and I find the quality acceptable (to my standards). I'll keep playing with the value, but from what I see, I think I'll stick to a range of 24-26. It seems to be the kind of quality/size I want to have. Does anyone disagree?
If you've found what gives you want you want, I'd say you found what gives you what you want! It'd be nice to have an audience of one sometimes :).
Solon8
6th June 2015, 22:56
Sure I do. I encoded a bunch of Simpsons and Family Guy DVDs even below that bitrate.
Oh OK. And for those specific DVDs, would you still give them a CRF of 16-18?
What kind of drive do you have? Buying a larger drive not a option? I use 1080p with crf 23-24, my movies are 120 GB with 6,5 GB being the largest movie.
Sure I probably could. But the point was really to find a solution at the bitrate I used. :p
Yep. Other than a big bitrate change, encoding is often a game of accruing enough incremental changes to make a real difference.
This has been a long-outstanding question! It's still labeled "experimental" and some folks suggest it creates quality regressions in some cases. I've not found any real good test cases. I'm personally more interested in --aq-mode 3 which is the same as 2 but shifts more bits in low luma, which can be a big help when dealing with noisy blacks in 8-bit Rec. 709. Before I started doing a lot of testing with the HDR PQ space I didn't really how perceptually uniform gamma ISN'T.
If you've found what gives you want you want, I'd say you found what gives you what you want! It'd be nice to have an audience of one sometimes :).
You lost me after aq-mode 3, but I get your point.
Thanks again for your replies, folks.
Groucho2004
6th June 2015, 23:43
Oh OK. And for those specific DVDs, would you still give them a CRF of 16-18?
Here's an example with a randomly picked Simpsons episode:
Frame size: 720 x 404
x264 parameters: --crf 18 --preset veryslow --tune animation --sar 1:1
Resulting bitrate: 684 Kbps
Solon8
7th June 2015, 00:29
Ah, you're right Groucho. I forgot the bitrate will vary and can go down.
Do you use variable CRFs according to the movie type? I mean, do you use the same CRF wether the movie is animation, very old or recent stuff?
You say you choose a CRF between 16 and 18. How do you find the right value between the two for a movie? Just encode at one and adjust afterwards?
Groucho2004
7th June 2015, 09:09
Ah, you're right Groucho. I forgot the bitrate will vary and can go down.
Do you use variable CRFs according to the movie type? I mean, do you use the same CRF wether the movie is animation, very old or recent stuff?
You say you choose a CRF between 16 and 18. How do you find the right value between the two for a movie? Just encode at one and adjust afterwards?
I just want to avoid any artefacts caused by bitrate starvation. I know that for some material I could pick a higher CRF and I probably would not see a difference but I try to avoid the hassle to figure that out and use a CRF low enough to give me the result I want.
For a clean source from BD I'd use CRF16. For a DVD transfer almost always CRF18.
Of course, with a crappy display you may not notice the subtle differences. A good HD display nowadays is a bitch. :)
Solon8
7th June 2015, 19:25
I'm sorry for the bump, but today I tried to play one of my newly encoded movies with Constant Quality on my TV and it looks much better than on my computer!
I thought the quality would be worse on my TV, because it's low bitrate, because it's upscaled on a bigger screen, etc. But no, it looks better, cleaner. Why so?
And more important, how do I get the same quality on my computer? I guess the distance I am from the screen counts a lot, but maybe there are settings, filters, features my TV have that I could get on my computer too? (hoping for a miracle?) But I don't know what to look for.
My TV is a 5-years-old Samsung 40'' (UE40C6730) and my PC player is MPC with Enhanced Video Renderer and recently MadVR.
Any input on that? Thank you.
osgZach
8th June 2015, 11:41
Stuff if always gonna look better on a TV at a proper viewing distance, than on a monitor on, say, your desk. Its just the way things are imho.
You are closer to the image source with a PC, so it is much easier to spot the flaws in the picture.
It's like how some people go to the movie theater and don't like sitting in the front cause they think it looks like crap.
And yeah, I'm sure TV's have their own internal filters and stuff they run to try and help clean up images, but I don't know anything about that kind of stuff.
Try this though. step back from your monitor a good foot or two while playing something and see if the image improves for you.
foxyshadis
8th June 2015, 11:48
True, but most TVs do come with a lot of noise reduction these days, especially the 120fps ones. Check out all of your TV's advanced settings and turn all the cool stuff off; it'll probably start looking similar. To get PC playback looking like that, you need some set of spiffy shaders on the player. Jan and Shiandow make quite a few of them, if you use MPC or MPDN.
8-BaLL
10th June 2015, 15:18
I know the bitrate is quite low. But I heard about popular Internet groups that encode movies at such bitrate or even lower.
Groups encoding 720p stuff at <1 Mbit/sec? I hardly doubt that :) But even if someone is that delusional- whats the point of encoding at 720p then?
Even for SD stuff, 1 Mbit is usually too little bitrate, esp. if you dont resize but keep native 720x...
If you wanna encode stuff at ~ 1 Mbit, you might as well resize to SD resolution, because at the end it will have more detail when played back on the PC/media players, than 720p@ 1 Mbit.
To be honest though- its 2015 otside. I dont see how someone isnt willing to give 720p the bitrate it needs, esp. with x264, which is very efficient already.
If you cant afford a new HDD, Id rather burn stuff to DVDs and still encode with 3+ Mbit (and once a new HDD arrives, copy stuff over), than encode to 720p @ <1 mbit.
F J Walter
2nd July 2015, 03:37
Groups encoding 720p stuff at <1 Mbit/sec? I hardly doubt that :) But even if someone is that delusional- whats the point of encoding at 720p then?
For what it's worth, it's highly dependent on content, and to give you an example, my usual CRF settings that often result in ~3000kbit at 720p managed to encode The Social Network at 720p averaging around 900kbit. The end result was less than 1GB.
Probably more relevant than bitrate then is rate factor - because that 900kbit (average) encoding was NOT a "low quality".
Otherwise what you say about decreasing res when using such low quality is true.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.