0

I usually convert video from x264 to x265 with this ffmpeg command:

ffmpeg -i %arg1% -vcodec libx265 -crf 28 %arg2%

And although it takes some time (from 2 to 15 hours) it gets the job done nicely, reducing the file size to half or less. Recently I was trying to use my GPU to help make this conversion faster, but I can't seem to tune the options correctly.

If I use this command:

ffmpeg -c:v h264_cuvid -i %arg1% -c:v hevc_nvenc -b:v 2M -c:a copy -tag:v hvc1 %arg2%

the file size will increase to double, which is not good. And if I try to use "1M" instead of "2M" the image will start to look bad (pixelated, etc). There are no error messages, by the way.

Is there any command I can try that will get me the same result as the slow option (with no GPU usage) but using the computer's GPU?

Note: My GPU is the Nvidia GTX 1050 (laptop version)

3
  • 3
    The problem is that the GPU is optimised for speed, not quality or bandwidth.
    – Mokubai
    Commented Dec 20, 2023 at 17:21
  • 1
    Do you know that that first command is NOT using your GPU? What GPU do you have? Also this: stackoverflow.com/questions/44510765/… Commented Dec 20, 2023 at 17:21
  • @music2myear My GPU is the NVidia GTX 1050 (laptop). I'll update my question to include this info. I am trying those alternative commands from the link you mentioned right now :) Commented Dec 20, 2023 at 17:33

1 Answer 1

0

Ok, so from what information I could gather online and all the tests I did, there is no way to achieve what I was trying, which is to use the computer's GPU to accelerate the conversion from x264 to x265 while maintaining the same video quality AND getting a small file size.

The resulting file is indeed smaller than the original, but no way as smaller as when you just use the CPU to do the conversion.

But if I'm mistaken please comment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .