h265ize icon indicating copy to clipboard operation
h265ize copied to clipboard

Performance

Open justinglock40 opened this issue 7 years ago • 5 comments
trafficstars

Any idea why the CPU and GPU are both getting blasted? I have hevc_nvenc enabled. All the work should be happening on the GPU?

justinglock40 avatar Feb 05 '18 15:02 justinglock40

screenshot at feb 05 09-32-25

justinglock40 avatar Feb 05 '18 15:02 justinglock40

Can you run h265ize with the --debug flag and provide the ffmpeg query?

Firstly, cpu will always have to do some work, it is still moving the video frames in and out of memory as well as writing them to disk. From my tests with a 6700hq, I get about 30% cpu and 100% gpu when encoding with intel quicksync.

Second you might be decoding with the cpu and encoding with the gpu, which is probably what is happening here. Maybe you would be able to do both encoding and decoding on the gpu. But even in that case you would still have to use the cpu to move frames: ram -> gpu (decode) -> ram -> gpu(decode) -> ram -> disk. I believe I've read of ways to do it without copying an extra time to ram but I don't think I've ever done it.

TL;DR Either way the cpu is gonna have to feed the gpu and use some cpu, so don't expect 3% cpu usage.

FallingSnow avatar Feb 06 '18 05:02 FallingSnow

What flags should be used to encode/decode on the GPU

Sent from my iPhone

On Feb 5, 2018, at 23:44, Ayrton Sparling [email protected] wrote:

Can you run h265ize with the --debug flag and provide the ffmpeg query?

Firstly, cpu will always have to do some work, it is still moving the video frames in and out of memory as well as writing them to disk. From my tests with a 6700hq, I get about 30% cpu and 100% gpu when encoding with intel quicksync.

Second you might be decoding with the cpu and encoding with the gpu, which is probably what is happening here. Maybe you would be able to do both encoding and decoding on the gpu. But even in that case you would still have to use the cpu to move frames: ram -> gpu (decode) -> ram -> gpu(decode) -> ram -> disk. I believe I've read of ways to do it without copying an extra time to ram but I don't think I've ever done it.

TL;DR Either way the cpu is gonna have to feed the gpu and use some gpu, so don't expect 3% cpu usage.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

justinglock40 avatar Feb 06 '18 12:02 justinglock40

This is outside the scope of h265ize since h265ize doesn't even support hw encoding but you would want to specify a hw decoder codec for the input and a hw encoder codec for the output. Ex. ffmpeg -v:c hevc_nvenc -i video.mkv -c:v hevc_nvenc output_video.mkv

FallingSnow avatar Feb 09 '18 01:02 FallingSnow

This is outside the scope of h265ize since h265ize doesn't even support hw encoding but you would want to specify a hw decoder codec for the input and a hw encoder codec for the output. Ex. ffmpeg -v:c hevc_nvenc -i video.mkv -c:v hevc_nvenc output_video.mkv

Could you add to this.... I am building an unraid pkg with Nvidia support. Here is my git. ... https://github.com/RCFilm/h265ize-nvidia-docker/ ... just having some trouble adding the (-v:c hevc_nvenc -i video.mkv -c:v hevc_nvenc output_video.mkv) for h265ize to use...

Any help would be great

AiRC-ai avatar Dec 23 '18 08:12 AiRC-ai