VideoHelp Forum
+ Reply to Thread
Results 1 to 20 of 20
Thread
  1. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Hi,

    I'm a newbie in encoding, I read this post because I also thought I could use a single CRF value for all my videos (with different sources & qualities), to convert them from (mainly) H264 to H265, but with the little I understood from the post, it doesn't work like that...

    So if I'd like to have "one" single way to encode (from B&W old movies, to HD ones, going through cartoons of the 50's), what should I do - if it possible ?
    choose the 2-pass encoding method, with a specific bitrate ? or the CRF= x method, with a minimum bitrate (if it's possible) ?
    I'm not looking for the "best" way to encode each video, I don't have time to adjust the parameters for each video, I'm looking for a solution which will quite guarantee me it will be ok in most of cases - even if I lose space (because I understand that going from 264 to 265 will save space in 95% of the time...)

    So, 1 - or 2 - way(s) to encode (I'm trying to use Hybrid which is complete - and "complex" for me...), and I'd be VERY happy !

    thank you very much in advance for your help !

    kind regards
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by weyb06 View Post
    all my videos (with different sources & qualities), to convert them from (mainly) H264 to H265
    Don't do that. We are already wasting enough energy. In addition, converting from one lossy compression further to another lossy compression will reduce the quality more than converting from the original.
    _

    But if you insist ... always the same thumb rule, which was already true for H.264 video (upper case H with dot) produced by the x264 encoder (lower case x without dot), and is still true for H.265 produced by x265: CRF is designed to keep the quality loss below a threshold – which will cause different file sizes for different movies, and 2-pass encoding is designed to fill media with a limited capacity – which may cause a different amount of quality loss for different movies.

    Brief: If you store them all on a harddisk, don't care about 2-pass, use CRF.
    Quote Quote  
  3. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    hello

    thank you for your reply !

    which value(s) should I use to encode old B&W movies, cartoons 480p & HD movies ?
    18, 20 and 23 ?

    regards
    Quote Quote  
  4. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    I think the conversion with one setting for all different quality videos you have is nonsense. Advantage of H.264 codec is it is more supported by standalone players and mobile (cell) phones. You can play it on almost anything. H.265 support isn't such wide.
    You mentioned Hybrid. It has main advantage supporting Avisynth and Vapoursynth filters. You can use them to somehow enhance quality for example of your cartoons movie. So it can be handy and help with compression to H.265, otherwise conversion will try to preserve artefact that is because of a) compression b) with movie bad quality itself. And spend bits on this to reproduce it. Probably with bigger compression such small thing (artifacts) can be not reproduced. But High quality videos will look not so good with bigger compression. Each content resolution and quality of source need its own settings to be worth of compression.

    So if you want one compression settings for all, there is not easy way. But using f.e. denoising filter deblocking and on animation some cartoon filter can have good result in final HEVC with smallest size because of codec used and better compressibility because you get rid of noise and other things.
    If I were you, I shouldn't reencode H.264 with x265. Just some xvid if you have, because compressin ratio here is very big. Or probably HQ movies with small CRF, but it will not pay off, because of lot of energy is needed and not improved quality as LigH.de pointed before.



    Bernix
    Quote Quote  
  5. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    good evening,

    in fact, my main purpose is to save disk space, as I have hundreds of GB of cartoons, movies, documentaries, etc.

    I used to use Handbrake (until someone on a french forum told me about Hybrid and so I'm doing some comparisons), using CRF=23 for almost everything, and it worked fine all the time, ie. for the H.265 movies I saw afterwards.
    I didn't check all the cartoons I converted, neither the Chaplin shorts, but from what I saw, it was with the same bad quality as the H.264 original ones...

    I'd like to save space as my NAS begins to fill up, & what I understood is that I could have the same quality with (nearly) half the size.

    OK, H.265 doesn't work on all devices, but I don't care, as I only watch my videos with Kodi on Minix which can read H.265 (and send the video to my TV or my VP).

    I agree with you that maybe I had luck with CRF=23 for everything (after what all I read & what you said all), but trying to do the same with Hybrid gave me very strange results in size !!!
    Indeed, I have bigger sizes with Hybrid than with Handbrake with CRF=23 (and much longer conversion times), so I was quite lost & started to look for answers...

    But the more I test Hybrid, the more I find that's it's a more complete tool ! So I think it's interesting to understand it...

    so I was thinking, maybe we could find some compromises, with different CRF for different cases, such as :
    - HD sources
    - bad B&W shorts
    - quite good cartoons
    - ...
    no ?

    sorry to insist or to bother you, don't hesitate to tell me if I'm all wrong

    regards
    Quote Quote  
  6. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    No, you are not wrong, it all depends on individual needs. Also there is difference watching on TV or watching on big monitor. There are another settings CRF XX meand nothing much about size. But it can't be big difference at same number. I found that preset very fast say CRF23 and medium CRF23 veryfast preset is faster but surprisingly also smaller filesize. But of course medium preset will give you better quality.

    Add to cartoon. It really can help to have more refference frames. But it also means longer encoding. But in cartoon you can really benefit from biger value of reference frames. Also using some filters will take longer time but smaller size here.
    B&W and color there is not difference really. If yes it is very small difference.
    Comparison of H.264 vs H.265 says that subjective quality with higher resolution H.265 efficiency is bigger. Over 60% for Full HD. Lower resolution still over 50% for say 480p.
    Maybe someone find something I said is misleading, so he will correct me. This is just quick answer. Who quick gives twice gives


    Bernix
    Last edited by Bernix; 6th Sep 2018 at 15:21. Reason: can to can't
    Quote Quote  
  7. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM

    Here is my own comparison of same CRF with encoding time and final filesize of 3min video track.
    Quote Quote  
  8. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Hi,

    Originally Posted by Bernix View Post
    ...
    Add to cartoon. It really can help to have more refference frames. But it also means longer encoding. But in cartoon you can really benefit from biger value of reference frames.
    --> How do you do that ?

    Also using some filters will take longer time but smaller size here.
    ...
    Bernix
    can you be more precise plese? which filters ?

    regards
    Quote Quote  
  9. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Different video filters to enhance the video content's appearance will use their own calculation time, in addition to the encoding, but will have some impact on the encoding efficiency.

    If you use an AviSynth based video converter, you will have a wide choice of filters, via plugins. Hybrid may use AviSynth scripts if you add this feature.
    Quote Quote  
  10. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Hi,

    AviSynth should already be installed in Hybrid as I can choose it to crop
    But I don't know nothing about filters & which one I should use/try, as Bernix suggested for cartoons (or did I misunderstand him ?)

    regards
    Quote Quote  
  11. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Yes, some filters can help optimizing especially cartoons to get encoded more efficiently. Real cartoons have an originally low frame rate (see "stop motion"), therefore you will have many duplicated frames to match the higher frame rates usual in modern videos. The more similar they are, the easier they can get compressed to a negligible size. Denoise filters with temporal effects will help making consecutive equal frames more similar. Furthermore, there are filters to enhance the typical attributes of real cartoons: sharp dark lines around areas with very smooth color ramps with least details. Well ... "optimizing Anime" is a topic discussed by generations already.

    And the "reference frames" are an attribute of the encoder session. Due to the majority of repetitive frames, really different frames are rather far apart, so it's recommendable to tell the encoder to look not only in a small range around the current frame, but a little further around for similar areas which can be used as "looks almost like that" reference, which is one of the most efficient ways to reduce the size. The x264 encoder has several tunings, including "animation"; the x265 encoder has less yet (the developers did not yet want to implement many), it may require more additional CLI parameters to tune it for specific unusual video content.
    Quote Quote  
  12. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    in Hybrid, there is advantage that you can use avisynth filters, but you needn't to know anything about scripting. It is thing of sliders or values inputed in field. Just one think. It supports Avisynth and Vapoursynth but you can't use both.
    Also flat color can seems to be one color, but it can be affected with compression, so there can be several colors in this part. So some filters can also help with this. Cartoon as LigH.de said is best for compression.
    But not sure you will use filters. Because you are more to encoder settings. With filters you have to experiment and i think you have not much time for this.


    Bernix
    Quote Quote  
  13. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Originally Posted by LigH.de View Post
    ...
    And the "reference frames" are an attribute of the encoder session.
    ...
    The x264 encoder has several tunings, including "animation"; the x265 encoder has less yet (the developers did not yet want to implement many), it may require more additional CLI parameters to tune it for specific unusual video content.
    so :
    - there is not a simple way in x265 encoder to select "animation" tuning like in x264 ?
    - neither to choose the "reference frames" ?

    Hmmm...
    So what I understand is that this whole subject is faaaaaaaar more complex than it seems, and as said bernix, I don't have much time to do more tests than I already did (i'll tell you later)
    After reading this article, I think that choosing CRF=23 in most the cases instead of default 28 for x265 should avoid me to make mistakes (compress too much & degrade quality)...

    regards
    Quote Quote  
  14. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    You can set reference frames under x265 codec. Probably it is called P frames here. I can't recheck haven't Hybrid now installed.
    CRF 28 x265 can be enough. Just try it on one HQ videos. If you find it watchable and do not want to watch others, you save plenty of space. On TV it wouldn't look as bad as on monitor. And everyone has different understanding of quality. In fact, you can also save some encoding time probably. Less bitrate, but it is probably more related to source bitrate.
    There isn't just 18 23 or 28. You can also try 25 etc.


    Bernix
    Quote Quote  
  15. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I see no reason to mourn that explicitly setting a maximum number of reference frames for x265 would be impossible in Hybrid.
    Image Attached Thumbnails Click image for larger version

Name:	Hybrid_Ref.png
Views:	407
Size:	29.2 KB
ID:	46687  

    Quote Quote  
  16. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Hi,
    I'm coming back here after many weeks to tell you what I think to have learned these past weeks, doing a lot of tests only with Hybrid.

    - there's no CRF with "NVEnc" encoder (with graphic card), so I used the cqp parameter (= 29)
    - Hybrid allows to set keyframes where you want (points are called "chapter points") during an encoding step, and then it's possible with this tool to cut this "chapterized" file according to the "chapter points" in a 2nd step without encoding

    this tool is very impressive because very complete, so... it has many tabs which can be quite full of parameters, so i was lost at first...

    kind regards
    Quote Quote  
  17. Originally Posted by weyb06 View Post
    Hi,

    I'm a newbie in encoding, I read this post because I also thought I could use a single CRF value for all my videos (with different sources & qualities), to convert them from (mainly) H264 to H265, but with the little I understood from the post, it doesn't work like that...

    So if I'd like to have "one" single way to encode (from B&W old movies, to HD ones, going through cartoons of the 50's), what should I do - if it possible ?
    choose the 2-pass encoding method, with a specific bitrate ? or the CRF= x method, with a minimum bitrate (if it's possible) ? Audacity Find My iPhone Origin
    I'm not looking for the "best" way to encode each video, I don't have time to adjust the parameters for each video, I'm looking for a solution which will quite guarantee me it will be ok in most of cases - even if I lose space (because I understand that going from 264 to 265 will save space in 95% of the time...)

    So, 1 - or 2 - way(s) to encode (I'm trying to use Hybrid which is complete - and "complex" for me...), and I'd be VERY happy !

    thank you very much in advance for your help !

    kind regards
    which will cause different file sizes for different movies, and 2-pass encoding is designed to fill media with a limited capacity – which may cause a different amount of quality loss for different movies.
    Last edited by arnaldpirotty; 1st Nov 2018 at 14:02.
    Quote Quote  
  18. It supports Avisynth and Vapoursynth but you can't use both.
    ... at the same time. (Especially since Hybrid uses 32 bit Avisynth and 64bit Vapoursynth.)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  19. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by weyb06 View Post
    - there's no CRF with "NVEnc" encoder
    Yes, the "Constant Rate Factor" method is quite specific to x264 and x265. And it has advantages over "Constant Quantization". Furthermore, on a powerful CPU, software encoders can outperform GPU encoders (with one of the faster presets) while still providing better efficiency.
    Quote Quote  
  20. Member
    Join Date
    Sep 2018
    Location
    France
    Search Comp PM
    Originally Posted by LigH.de View Post
    ...Furthermore, on a powerful CPU, software encoders can outperform GPU encoders (with one of the faster presets) while still providing better efficiency.
    that would mean to change my CPU
    Quote Quote  



Similar Threads

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