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??
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 22 of 22
Thread
-
-
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. -
-
-
I already told you: You cannot.
Acceleration is fast because it is less rigorous, less attentive. Precision needs time. Don't expect miracles! -
-
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 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" -
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 -
-
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. -
Something like:
Code:ffmpeg -i input.mp4 -c:v libx265 -preset veryfast -crf 20 -c:a copy output.mp4
-
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 -
you can only use crf if you don't mind if the final product is streamable for e.g. mobile devices over the internet.users currently on my ignore list: deadrats, Stears555
Similar Threads
-
Hardware Acceleration on Youtube Stopped Working in Firefox
By MiuraSV in forum Software PlayingReplies: 4Last Post: 25th Sep 2018, 00:34 -
change font size in srt
By flannob in forum SubtitleReplies: 3Last Post: 30th Apr 2018, 12:32 -
How to pass from .Sub + change size and font to .Sup ?
By kalemvar1 in forum SubtitleReplies: 3Last Post: 24th Feb 2018, 14:59 -
My youtube video look too bright!, Hardware Acceleration, Video Codec
By itti in forum Software PlayingReplies: 1Last Post: 19th Dec 2017, 06:49 -
Potplayer: Can't flip or mirror video when DXVA hardware acceleration is on
By PleaseSendHelp in forum Newbie / General discussionsReplies: 0Last Post: 28th Jul 2017, 15:35