VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 42 of 42
Thread
  1. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Thanks again for taking time to respond, hello_hello. Now it seems we're getting there

    f you open MeGUI's x264 encoder configuration, load the defaults, select the Slow speed peset, Tune Film, a Target Quality of 18 (CRF18) and DXVA as the target playback device, you'll have the settings I use.
    - Thanks so much for the hint, but Tune Film is not the default configuration. Will it work "for everything", I mean, can I leave this way for every kind of video?

    BTW, I've mentioned CRF as Constant Ratefactor (on the Rate Control Guide) but in fact, the option to select Target Quality (as you have remarked it) seems to be found on the main guide. So I assume that if I choose for Encoding Mode Const. Quantizer, the option is that one on the right, for "Quantizer" (on the main guide). Is that what you mean? Thanks in advance

    I understand what you've said that not all videos look the same since "action" is very important. That means the more action you've got, the more bitrate you need, I guess. So I'd like to thank you for these statements that look more than clear:

    2 pass encoding: you choose the bitrate and the quality is unknown.
    CRF encoding: you choose the quality and the bitrate is unknown.
    On the contrary that would be same to state the Variable Bitrate should work to fit more in less room. But as you have put it, I think I'd better choose quality no matter the bitrate.

    ...I use CRF18 for 720p or lower and CRF20 for 1080p as they also give me file sizes I'm happy with, on average, but it's all personal preference.
    -Thanks for sharing this with us. I'll try this set of configurations now and post the results here as soon as possible. Thanks again for everything.

    Cheers,
    Mark
    Quote Quote  
  2. Originally Posted by Cunhambebe View Post
    - Thanks so much for the hint, but Tune Film is not the default configuration. Will it work "for everything", I mean, can I leave this way for every kind of video?
    You could, but for animation you'd probably pick Tune Animation and for really grainy stuff, Tune Grain. I find Tune Film tends to retain a little more fine detail than Tune "None" but there's no free lunch. If you used the same CRF value and x264 settings while encoding the same video twice, but the first time you used Tune None while the second time you used Tune Film, the second encode would invariably have a slightly higher bitrate (sometimes more than slightly). For encoding DVDs or standard definition video without much fine detail I sometimes use Tune None, but there's no rule. Use an appropriate tuning for your source video.

    All the Tuning option does is change a few x264 advanced parameters in a pre-configured way. If you change (for example) the Tuning from None to Film, it'll change the default x264 deblock settings to --deblock -1:-1 and psy to --psy-rd 1.0:0.15. That's all Tune Film does. If you switch to the appropriate tab in MeGUI's advanced x264 encoder configuration you'll see those settings change to their new defaults when you change the x264 tuning, but all you see in the commandline is --tune film or --tune grain etc.
    Changing x264's speed preset changes a few advanced parameters in a similar way.

    Originally Posted by Cunhambebe View Post
    BTW, I've mentioned CRF as Constant Ratefactor (on the Rate Control Guide) but in fact, the option to select Target Quality (as you have remarked it) seems to be found on the main guide. So I assume that if I choose for Encoding Mode Const. Quantizer, the option is that one on the right, for "Quantizer" (on the main guide). Is that what you mean? Thanks in advance
    If you don't have the "show advanced parameters" option checked in the x264 encoder configuration and choose "targeting quality" as the encoding method, the quality value is the CRF value. The default is 23. When you adjust it, you'll see --crf being added to the commandline.
    If you check "show advanced parameters" in the encoder configuration, the option for CRF encoding is "Const. Quality". It's the same thing. I don't know why MeGUI had to give it two different names.

    Constant Quantizer is not the same thing. CRF (constant ratefactor, ie constant quality) adjusts the quantizer in order to give you the same "perceived quality" you'd get when using Constant Quantizer, only using less bitrate.

    Originally Posted by Cunhambebe View Post
    On the contrary that would be same to state the Variable Bitrate should work to fit more in less room. But as you have put it, I think I'd better choose quality no matter the bitrate.
    All the encoding methods use a variable bitrate. CRF encoding encodes the video in the same way as 2 pass encoding, only the former lets you pick the quality while the latter lets you pick the bitrate. But it's the average bitrate you're selecting. It'll vary all over the place during the course of an encode to give you the same quality throughout, but in the end, the average bitrate will be the bitrate you specified. You can check the average, minimum and maximum bitrates using BitrateViewer.
    Last edited by hello_hello; 11th Apr 2014 at 03:42.
    Quote Quote  
  3. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Thanks for responding again hello_hello.

    I find Tune Film tends to retain a little more fine detail than Tune "None" ... Tune Film... would invariably have a slightly higher bitrate... Use an appropriate tuning for your source video.
    -Thank you very much for this.

    If you don't have the "show advanced parameters" option checked in the x264 encoder configuration and choose "targeting quality" as the encoding method, the quality value is the CRF value. The default is 23. When you adjust it, you'll see --crf being added to the commandline.
    If you check "show advanced parameters" in the encoder configuration, the option for CRF encoding is "Const. Quality". It's the same thing. I don't know why MeGUI had to give it two different names.
    Constant Quantizer is not the same thing. CRF (constant ratefactor, ie constant quality) adjusts the quantizer in order to give you the same "perceived quality" you'd get when using Constant Quantizer, only using less bitrate.
    -I understand the relation between Constant Quality and Targeting Quality since they change when the option "show advanced parameters" is checked or not. Ayway, --crf can be seen added to the command line (the CRF value) IF any other figure is chosen; other than the one of 23,0. That may happen because 23 is the default value. Interesting. Curious. Since I was leaving the default value (23) I wasn't seeing the --crf on the command line. Sorry and thanks for the explanation.

    All the encoding methods use a variable bitrate. CRF encoding encodes the video in the same way as 2 pass encoding, only the former lets you pick the quality while the latter lets you pick the bitrate. But it's the average bitrate you're selecting. It'll vary all over the place during the course of an encode to give you the same quality throughout, but in the end, the average bitrate will be the bitrate you specified. You can check the average, minimum and maximum bitrates using BitrateViewer.
    -Thanks for the hint on BitrateViewer (it could be a calculator too) and thanks again for the explanation. I have to keep in mind this: CFR=quality; 2pass=bitrate. I've encoded some segments here, choosing Constant Quality but I haven't chosen "Film". You know something? Being very sincere I didn't like the results that much but maybe because I've added some new filters to the script used in AviSynth (I've changed the previous script). This time I will use the previous script again and choose Film. I'll write back as soon as possible. BTW, that leads me to another question. Can you please tell me if I can also use Film for HD video (720p / 1080p)? Thanks in advance. Now I guess I'm understanding the whole thing.

    Cheers,
    Mark
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by Cunhambebe View Post
    Ayway, --crf can be seen added to the command line (the CRF value) IF any other figure is chosen; other than the one of 23,0. That may happen because 23 is the default value. Interesting. Curious. Since I was leaving the default value (23) I wasn't seeing the --crf on the command line.
    Exactly this is the reason. MeGUI strips default parameters from the generated command line.


    Originally Posted by Cunhambebe View Post
    Can you please tell me if I can also use Film for HD video (720p / 1080p)?
    Yes, you can. Tuning parameters are a subjective choice. Select one if you believe that it might help encoding a video that has specific characteristics.

    The tuning "film" is for slightly noisy/grainy material that looks like it could be digitized original photographic film. Resolution doesn't matter much here. Inloop filtering is slightly reduced to keep the grain, at the cost of some more bitrate than without; this can be countered by enabling the noise modelling feature (incorrectly called "noise reduction" in the parameter list; useful values can be hundreds or even thousands).

    Tuning "grain" is for movies with exaggerated, artistic, stylistic grain like in "300", where you have to throw in a lot of bitrate to avoid artefacts. It reduces the in-loop filtering to avoid washing out the grain, at the cost of a much higher bitrate.

    Tuning "animation" is the opposite, suitable for exceptionally little noise, like real manually drawn cartoons, maybe even computer generated video. Inloop filtering is raised, reducing quite certainly unwanted noise, flattening color ramps, increasing compressibility. You may reduce the CRF here even a bit if you get a surprisingly small result, to spend more bitrate in avoiding some banding in flat color ramp areas. The 10-bit-per-component variant of x264 will probably compress such material even better, but only few consumer players (besides a PC) are able to play this material correctly.
    Last edited by LigH.de; 12th Apr 2014 at 07:53.
    Quote Quote  
  5. Originally Posted by Cunhambebe View Post
    -I understand the relation between Constant Quality and Targeting Quality since they change when the option "show advanced parameters" is checked or not. Ayway, --crf can be seen added to the command line (the CRF value) IF any other figure is chosen; other than the one of 23,0. That may happen because 23 is the default value. Interesting. Curious. Since I was leaving the default value (23) I wasn't seeing the --crf on the command line. Sorry and thanks for the explanation.
    The same applies to all the other settings. They're not added to the commandline unless they're not the defaults.
    Keep in mind, the defaults can change. For example, when using Tune None, if you change the deblock settings to -1,-1, you'll see this in the commandline: --deblock -1:-1
    But when Tune Film is selected you'd need to change them to something other than -1,-1 before they'd appear in the commandline, because -1,-1 are already the defaults for Tune Film.

    Originally Posted by Cunhambebe View Post
    -Thanks for the hint on BitrateViewer (it could be a calculator too) and thanks again for the explanation. I have to keep in mind this: CFR=quality; 2pass=bitrate. I've encoded some segments here, choosing Constant Quality but I haven't chosen "Film". You know something? Being very sincere I didn't like the results that much but maybe because I've added some new filters to the script used in AviSynth (I've changed the previous script). This time I will use the previous script again and choose Film. I'll write back as soon as possible. BTW, that leads me to another question. Can you please tell me if I can also use Film for HD video (720p / 1080p)? Thanks in advance. Now I guess I'm understanding the whole thing.
    It won't be anything to do with using CRF encoding as such. CRF and 2 pass encode the video in exactly the same way if the bitrate is the same. Well, there's a slight difference.... even 2 pass encoding adjusts the bitrate (quality) a tiny bit as the encode progresses to ensure the target bitrate is achieved. CRF doesn't need to do anything like that. The difference is so small though the two encoding methods are effectively the same. If CRF encoding isn't giving you the quality you want, use a lower CRF value. What are you using now?
    It's no different to choosing a bitrate in that respect. If a certain bitrate doesn't give you the desired quality, you'd use a higher bitrate. Once you've settled on a CRF value though, you should be able to use the same one all the time.

    I pretty much always use Tune Film for HD encodes. Unless they're really grainy, in which case I'd either run a denoising filter, or use Tune Grain, or maybe both. The visual differences between tunings can be fairly subtle, especially at low CRF values where the bitrate already tends to be higher.
    Quote Quote  
  6. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Hi there. Thanks again to hello_hello and LigH.de for taking time to respond. I really appreciate your explanations. Thank "you" very much.

    hello_hello: If CRF encoding isn't giving you the quality you want, use a lower CRF value. What are you using now?
    -I was using crf 22 for 720p. I've read that if you use 18 (which is a lot lower than 22) you may not get a good quality. A little confusing here, isn't it? Do you have any idea why this happens?

    As a matter of fact, I encoded the whole thing yesterday BUT my AviSynth plugins were being used incorrectly (in terms of which one comes first and so on). So unfortunately the final result showed a lot of small blocks in dark scenes (despite the fact I saw a crystal clear video shown in VirtualDub and MEGUI). I hope this time it's not a problem with "me" (lolol) configuring x264 in MEGUI.

    Well, I'll encode the file once more and write back with the results.

    Thanks again you guys.
    Cheers,
    Mark
    Quote Quote  
  7. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    The smaller the CRF value is, the less quality will be lost. CRF 18 is already a quite convenient value for many average cases; CRF 22 will often have quite noticable loss, especially in dark and (maybe slowly moving) low-detail areas (e.g. fog, smoke). The default of CRF 23 may be enough for web videos, but not for archival. I know people who prefer at most CRF 15 for their long term movie archives; but this leads to quite large results already.

    Finding your personal "threshold of acceptance" will cost you a bit of experimenting time, but it is worth the efforts. It is recommendable to try multiples of 3 for the coarse steps.
    Quote Quote  
  8. Looking for your personal CRF value of yours, you can encode only particular scene, not the whole movie. Into avisynth script (yours or generated by Megui) include line for trimming video, you put it to the end of Avisynth script temporarily,
    trim (startframe, endframe), where startframe = seconds in the video x 24 (if your video is 24 frames per second) , so you can get something like this for scene that starts in 100th second and lasts 10 seconds:

    trim(2400,2640)
    Quote Quote  
  9. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Thanks again Ligh.de. This is what our friend hello_hello said a while ago at post #30 :

    I prefer the quality based method while letting the file sizes be whatever they need to be. As a general rule I use CRF18 for 720p or lower and CRF20 for 1080p as they also give me file sizes I'm happy with, on average, but it's all personal preference.
    I've stopped the encoding and I'll try 16. Let's see what I get. Thanks for the explanation (the smaller the CRF value, less quality wil be lost).

    Thanks a bunch.
    Cheers,
    Mark
    Quote Quote  
  10. Originally Posted by Cunhambebe View Post
    -I was using crf 22 for 720p. I've read that if you use 18 (which is a lot lower than 22) you may not get a good quality. A little confusing here, isn't it? Do you have any idea why this happens?
    It doesn't. The CRF value works opposite to what you might expect. Lower values = higher quality.
    Use the same settings and run a couple of encodes of the same video..... CRF22 for one and CRF18 for the other. The bitrate of the CRF18 encode will always be higher. Wherever you read CRF18 gives lower quality than CRF22, it's just plain wrong.

    Originally Posted by Cunhambebe View Post
    As a matter of fact, I encoded the whole thing yesterday BUT my AviSynth plugins were being used incorrectly (in terms of which one comes first and so on). So unfortunately the final result showed a lot of small blocks in dark scenes (despite the fact I saw a crystal clear video shown in VirtualDub and MEGUI). I hope this time it's not a problem with "me" (lolol) configuring x264 in MEGUI.
    It "could" be the CRF value. The encoder probably tends to compress areas more where it's harder to see compression artefacts, so blockiness might show up in dark areas first if you go looking for it. Noise removal can also cause blockiness and/or banding. http://en.wikipedia.org/wiki/Colour_banding Or sometimes it happens without it.
    If you use noise removal and you think it's causing blockiness or banding, the dither plugin can help to stop it from happening, or at least reduce it.
    The simplest way to use it is to put this at the end of a script.

    GradFun3()
    Quote Quote  
  11. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Hi and thanks to all who took time to respond

    LigH'de: The default of CRF 23 may be enough for web videos, but not for archival. I know people who prefer at most CRF 15 for their long term movie archives; but this leads to quite large results already.
    -LigH.de, thank you very much for this remark.

    _Al_: you can encode only particular scene, not the whole movie. Into avisynth script (yours or generated by Megui) include line for trimming video, you put it to the end of Avisynth script temporarily,...
    -Hi _Al_, thanks so much for you help buddy. That was exactly what I was doing I'd like to thank you again for your effort to help me.

    hello_hello: The CRF value works opposite to what you might expect. Lower values = higher quality. (...) If you use noise removal and you think it's causing blockiness or banding, the dither plugin can help to stop it from happening, or at least reduce it.
    The simplest way to use it is to put this at the end of a script.
    GradFun3()
    -Hi hello_hello, thank you very much, boy. I'll make a personal guide out of this discussion. In fact I'm using gradfun2dbmod such as follows:

    gradfun2dbmod(thr=1.2,thrC=1.8,str=2.6,strC=2.6) # I've raised the last two values because if wasn't dithering enough to cover up some banding on dark scenes.

    BTW, I wasn't aware of GradFun3 that replaces the "previous" grandfun2db(mod). Thanks so much for the hint. Anyway, I encoded some sections of the video file yesterday (using --crf16 for 720p) and the results looked great (much better than using --crf22 or 23). I'll try the new GradFun3() and check out if it works better than the previous version. I'd like to thank you for your personal effort to help me with x264. Count on me, man!

    Cheers, and please keep in touch!
    Mark
    Last edited by Cunhambebe; 18th Apr 2014 at 21:33.
    Quote Quote  
  12. Member Cunhambebe's Avatar
    Join Date
    Mar 2004
    Location
    São Paulo - Brazil
    Search Comp PM
    Hi there. Finally I've encoded the whole file at --crf16. The quality is stunning, but the original 600 MB file now is 3.2 GB. Anyway is great. I would like to thank again everyone who helped. I made a guide out of this topic ans I'm sure it'll be very helpful. Happy Easter!
    Cheers!
    Mark
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!