VideoHelp Forum


Try NordVPN to access Netflix or other streaming services from any country and also surf safely!
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. I discovered a strange thing when I encode videos with ffmpeg:
    When I use hardware acceleration for encoding whether it's AMF or NVIDEA for encoding in HEVC
    The output size is the same as the source size
    When I use criteria to reduce the size, clarity is affected
    And when I use encoding without hardware acceleration, the output is small and very acceptable
    But this makes the process take a long time
    How do I solve this problem for someone who knows about it??
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    You probably mean AMD and Nvidia.

    Hardware encoders are "shortsighted". They only compare a limited number of content blocks of the video, especially in temporal distance. To start with, they don't make efforts to load dozens of video frames from the working RAM to the Video RAM, only a few for GOPs with a rather simple hierarchy (most of all because the Video RAM size is more limited, and the transfer slows it all down, but also because the algorithms in the encoder chip are limited). In the best case, GPU encoders work similar to some of the fastest presets of x264/x265, even with more specific restrictions.
    Quote Quote  
  3. Originally Posted by LigH.de View Post
    You probably mean AMD and Nvidia.

    Hardware encoders are "shortsighted". They only compare a limited number of content blocks of the video, especially in temporal distance. To start with, they don't make efforts to load dozens of video frames from the working RAM to the Video RAM, only a few for GOPs with a rather simple hierarchy (most of all because the Video RAM size is more limited, and the transfer slows it all down, but also because the algorithms in the encoder chip are limited). In the best case, GPU encoders work similar to some of the fastest presets of x264/x265, even with more specific restrictions.
    amf : ( The (A) Advanced (M) Media(F) Framework SDK provides developers with optimal access to AMD GPUs for multimedia processing. )
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Ah, it is an application interface SDK by GPUOpen. Well, the actual ASIC encoder unit on the GPU chipset is called VCE (Video Code Engine) or VCN (Video Core Next) for AMD, as it is called NVEnc for Nvidia, or QuickSync for intel's integrated graphics.
    Quote Quote  
  5. Originally Posted by LigH.de View Post
    Ah, it is an application interface SDK by GPUOpen. Well, the actual ASIC encoder unit on the GPU chipset is called VCE (Video Code Engine) or VCN (Video Core Next) for AMD, as it is called NVEnc for Nvidia, or QuickSync for intel's integrated graphics.
    amf igpu AMD
    Now tell me how can I get the same results of the resulting process without hardware acceleration while I activate the acceleration
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I already told you: You cannot.

    Acceleration is fast because it is less rigorous, less attentive. Precision needs time. Don't expect miracles!
    Quote Quote  
  7. Originally Posted by LigH.de View Post
    I already told you: You cannot.

    Acceleration is fast because it is less rigorous, less attentive. Precision needs time. Don't expect miracles!
    So I want the lowest levels of acceleration but without any loss of clarity!
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    All or nothing. If you upload the video into the GPU to let it encode for you, you give up the majority of control and tuning. It is not possible to "accelerate a little bit in the GPU and then get back the quality in x265". You can't split the process.

    But there are chances to speed up the HEVC encoding in x265 only: Don't use insanely slow presets. Use a CPU with AVX2 support and a convenient number of cores. Run two encodes in parallel (with restricted NUMA pools). Or make a "render farm" in a LAN with RipBot264.
    Quote Quote  
  9. Originally Posted by LigH.de View Post
    All or nothing. If you upload the video into the GPU to let it encode for you, you give up the majority of control and tuning. It is not possible to "accelerate a little bit in the GPU and then get back the quality in x265". You can't split the process.

    But there are chances to speed up the HEVC encoding in x265 only: Don't use insanely slow presets. Use a CPU with AVX2 support and a convenient number of cores. Run two encodes in parallel (with restricted NUMA pools). Or make a "render farm" in a LAN with RipBot264.

    How can this be?
    Here's what you were talking about
    Quote Quote  
  10. Originally Posted by frpkingymd View Post
    Originally Posted by LigH.de View Post
    All or nothing. If you upload the video into the GPU to let it encode for you, you give up the majority of control and tuning. It is not possible to "accelerate a little bit in the GPU and then get back the quality in x265". You can't split the process.

    But there are chances to speed up the HEVC encoding in x265 only: Don't use insanely slow presets. Use a CPU with AVX2 support and a convenient number of cores. Run two encodes in parallel (with restricted NUMA pools). Or make a "render farm" in a LAN with RipBot264.

    How can this be?
    Here's what you were talking about
    How do I do these steps below when I use the HEVC encoding method:

    But there are chances to speed up the HEVC encoding in x265 only: Don't use insanely slow presets. Use a CPU with AVX2 support and a convenient number of cores. Run two encodes in parallel (with restricted NUMA pools). Or make a "render farm"
    Quote Quote  
  11. ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
    Quote Quote  
  12. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by frpkingymd View Post
    ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
    It speaks for itself. You check to see if your PC CPU supports the AVX2 instruction set.
    If not you can buy a new computer with such a CPU and it will speed up the encoding time.
    For example, my old AMD FX CPU does not have AVX2, HEVC encoding is slow.

    Use a faster preset in the encoder settings
    Image Attached Thumbnails Click image for larger version

Name:	preset.png
Views:	17
Size:	21.2 KB
ID:	59225  

    Click image for larger version

Name:	cpu.png
Views:	6
Size:	26.8 KB
ID:	59226  

    Quote Quote  
  13. Originally Posted by davexnet View Post
    Originally Posted by frpkingymd View Post
    ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
    It speaks for itself. You check to see if your PC CPU supports the AVX2 instruction set.
    If not you can buy a new computer with such a CPU and it will speed up the encoding time.
    For example, my old AMD FX CPU does not have AVX2, HEVC encoding is slow.

    Use a faster preset in the encoder settings
    Yes, it supports:
    AVX2
    Now give me the settings you mentioned using FFMPEG
    Quote Quote  
  14. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by frpkingymd View Post
    Originally Posted by davexnet View Post
    Originally Posted by frpkingymd View Post
    ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
    It speaks for itself. You check to see if your PC CPU supports the AVX2 instruction set.
    If not you can buy a new computer with such a CPU and it will speed up the encoding time.
    For example, my old AMD FX CPU does not have AVX2, HEVC encoding is slow.

    Use a faster preset in the encoder settings
    Yes, it supports:
    AVX2
    Now give me the settings you mentioned using FFMPEG
    https://trac.ffmpeg.org/wiki/Encode/H.265
    Quote Quote  
  15. Originally Posted by davexnet View Post
    Originally Posted by frpkingymd View Post
    Originally Posted by davexnet View Post
    Originally Posted by frpkingymd View Post
    ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟
    It speaks for itself. You check to see if your PC CPU supports the AVX2 instruction set.
    If not you can buy a new computer with such a CPU and it will speed up the encoding time.
    For example, my old AMD FX CPU does not have AVX2, HEVC encoding is slow.

    Use a faster preset in the encoder settings
    Yes, it supports:
    AVX2
    Now give me the settings you mentioned using FFMPEG
    https://trac.ffmpeg.org/wiki/Encode/H.265
    Does not exist
    Quote Quote  
  16. You mean the link does not open for you?
    Quote Quote  
  17. Originally Posted by emcodem View Post
    You mean the link does not open for you?
    I mean, I did not find the commands that you guided me to, and I am of course a beginner, which is why I asked for help! You create an order as you described it for me to use
    Quote Quote  
  18. ??????????????????????
    Quote Quote  
  19. You have an akward style for asking for help...
    There is no setting for x265 in ffmpeg for you, it will enable avx2 automatically if available.
    Everything Else has already been said, you can play with preset and aside from that you either go for bad qualiy or big file size and fast speed using your graphics Board ASIC or you go for good qualiy and small file size on CPU with x265.
    Newer graphics Generations have better size/qualiy ratio, nvidia might be better than AMD and Intel.
    U can try vp9 it your graphics card has an ASIC for that.
    Quote Quote  
  20. Something like:
    Code:
    ffmpeg -i input.mp4 -c:v libx265 -preset veryfast -crf 20 -c:a copy output.mp4
    Quote Quote  
  21. Ah ok, some basic command examples are completely missing, thanks @jagabo
    I believe for getting a small file size with x265, you would more use a value for crf like 28 (kind of "visually lossless") as a starting point and then go up in steps like +3 for getting smaller files with worse quality, or -3 for better quality. To mention here is that you can only use crf if you don't mind if the final product is streamable for e.g. mobile devices over the internet. So basically using crf instead of defining the bitrate is only used for "storing/archiving and home viewing".

    some more examples:
    ffmpeg -i input.mp4 -c:v libx265 -preset fast -crf 28 -c:a copy output.mp4
    ffmpeg -i input.mp4 -c:v libx265 -preset slow -crf 28 -c:a copy output.mp4
    ffmpeg -i input.mp4 -c:v libx265 -preset medium -crf 28 -c:a copy output.mp4

    But in the end you will always be encoding VERY slow when using x265 compared to nvenc/amf - but with VERY much more quality
    Quote Quote  
  22. you can only use crf if you don't mind if the final product is streamable for e.g. mobile devices over the internet.
    properly set profile, tier, level and vbv restrictions and streaming shouldn't be an issue,..
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads