Jump to content

Emby hardware acceleration high CPU and GPU usage at the same time


Recommended Posts

Pops32
Posted

There is a Synology DS923+ with a connected NVIDIA T600 video card with driver 535.154.05 - this is not an official method, however, the video card is detected and works correctly.
Emby Server 4.8.10.0 is installed with Emby Premiere enabled from the official Emby website, the server works properly.
Here's a question: when playing H.264 (AVC) video with hardware acceleration disabled, the CPU load is about 90%; and with acceleration enabled, the CPU load is 70%, GPU - 80% - is this how it should be?
Or is hardware acceleration not working correctly?

Emby hardware acceleration off_on.png

Emby hardware acceleration advanced.png

Emby hardware acceleration.png

Synology NVidia T600.png

ffmpeg-transcode-hardware acceleration on.txt ffmpeg-transcode-hardware acceleration off.txt

Happy2Play
Posted (edited)

I will guess since decoding is still being done in software.

>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Automatic
Info    Checking: 'NVENC NVIDIA T600 - H.264 (AVC)'
Info    Check successful - selecting 'NVENC NVIDIA T600 - H.264 (AVC)'

>>>>>>  FindVideoDecoder - MediaType: mpeg4, UseHardwareCodecs: True, HWA-Mode: Automatic
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

 

Does this only happen with your avi files?

Also what options are shown if you change HWA from YES to ADVANCED?

Edited by Happy2Play
Carlo
Posted

Try transcoding an MP4 or MKV file.
Try files with both AVC and HEVC codecs for video.

Carlo

 

Pops32
Posted (edited)
On 3/10/2025 at 12:46 AM, Happy2Play said:

I will guess since decoding is still being done in software.

That's right. Can't use hardware decoder

On 3/10/2025 at 12:46 AM, Happy2Play said:

Does this only happen with your avi files?

Also what options are shown if you change HWA from YES to ADVANCED?

Same thing - CPU and GPU loading at the same time. Tried advanced default settings, tried enabling all options, tried different combinations - no use

Edited by Pops32
Pops32
Posted
On 3/10/2025 at 12:46 AM, Happy2Play said:

Does this only happen with your avi files?

 

On 3/10/2025 at 1:11 AM, Carlo said:

Try transcoding an MP4 or MKV file.
Try files with both AVC and HEVC codecs for video.

Carlo

 

It seems not only with avi, but with video resolution less than 1080p - the lower the resolution, the greater the load.
mkv 1080p H264 - no transcoding required, no load on CPU and GPU.
mkv 720p - software decoding occurs.
576i MPEG2 - the same problem as with avi.
480p MPEG4 - the same as with avi, only the CPU load is even higher (80%)

Carlo
Posted

Can you perform those tests for me again.
This time upload the server log and ffmpeg files.

Please don't edit or touch the log files.

Pops32
Posted
9 hours ago, Carlo said:

Can you perform those tests for me again.
This time upload the server log and ffmpeg files.

Tried it now.
mkv 1080p H264 and mkv 720p H264 - no transcoding required, no CPU and GPU load (ffmpeg log is not created);
480p MPEG4 - CPU and GPU load as before (log ffmpeg-transcode-63b59360-e91d-4d93-a373-d9b5b321bb08_1);
SD MPEG4 - CPU and GPU load (GPU at 100%), video does not play (log ffmpeg-transcode-d9f37a19-5138-42b4-b96a-38dc703f2aa4_1)

embyserver.txt ffmpeg-transcode-d9f37a19-5138-42b4-b96a-38dc703f2aa4_1.txt ffmpeg-transcode-63b59360-e91d-4d93-a373-d9b5b321bb08_1.txt

Carlo
Posted

These were AVI files.
What I was looking for is if you also have this problem with mp4 or mkv files.

Pops32
Posted (edited)
9 hours ago, Carlo said:

These were AVI files.
What I was looking for is if you also have this problem with mp4 or mkv files.

The "MPEG4" in the title is confusing, so I thought it was MP4.
Yes, it seems to be a problem with AVI, I just checked MP4 4K and MP4 1080p (codec tag avc1) from my phone - no CPU or GPU load.

 

There is also a problem with MKV 720p H264:
- first video (log ffmpeg-transcode-4f5cae67-6288-4753-95b8-118ebe33a43e_1) - CPU load 35%, GPU load 6%, i.e. there is simultaneous download (see screenshot 1);
- second video (log ffmpeg-remux-e6b0c663-1fab-4f34-99d6-a5404bfd5dba_1) - CPU load 49%, GPU load 0%, i.e. acceleration does not work (see screenshot 2)

Anna and the King_acceleration on.png

The Revenant_acceleration on.png

embyserver (1).txt ffmpeg-transcode-4f5cae67-6288-4753-95b8-118ebe33a43e_1.txt ffmpeg-remux-e6b0c663-1fab-4f34-99d6-a5404bfd5dba_1.txt

Edited by Pops32
Happy2Play
Posted

For ffmpeg-transcode-4f5cae67-6288-4753-95b8-118ebe33a43e_1 I am not sure as decoding and encoding are happening with GPU.

&TranscodeReasons=SecondaryAudioNotSupported,DirectPlayError

>>>>>>  Selected Codecs
Decoder NVDEC NVIDIA T600 - H.264 (AVC)
        Adapter #0: 'NVIDIA T600' ComputeCapability: 7.5
        Max Bitrate: 234 Mbit/s - Frame Sizes: 48x16...4096x4096 - Width Alignment: 2 - Height Alignment: 2
        Color Formats: NV12 - Bit Depths: 8
        Profiles: Constrained Baseline Profile (Level 6), Baseline Profile (Level 6), Main Profile (Level 6), High Profile (Level 6), Constrained High Profile (Level 6), Progressive High Profile (Level 6)

Encoder NVENC NVIDIA T600 - H.264 (AVC)
        Adapter #0: 'NVIDIA T600' ComputeCapability: 7.5
        Max Bitrate: 781 Mbit/s - Frame Sizes: max 4096x4096 - Width Alignment: 2 - Height Alignment: 2
        Color Formats: NV12, P010, P016 - Bit Depths: 8, 10, 12, 14, 16
        Profiles: Baseline Profile (Level 6.2), Main Profile (Level 6.2), High Profile (Level 6.2), High 4:4:4 Predictive Profile (Level 6.2)

11:31:37.667 Stream mapping:
11:31:37.667   Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
11:31:37.667   Stream #0:6 -> #0:1 (copy)

For ffmpeg-remux-e6b0c663-1fab-4f34-99d6-a5404bfd5dba_1 it will not use HWA as only audio is converted.  As you see video is copied.

&TranscodeReasons=AudioCodecNotSupported

11:35:28.086 Stream mapping:
11:35:28.086   Stream #0:0 -> #0:0 (copy)
11:35:28.086   Stream #0:1 -> #0:1 (dts (dca) -> mp3 (libmp3lame))
11:35:28.086   Stream #0:5 -> #1:0 (subrip (srt) -> webvtt (native))
11:35:28.086   Stream #0:6 -> #2:0 (subrip (srt) -> webvtt (native))
11:35:28.086   Stream #0:7 -> #3:0 (subrip (srt) -> webvtt (native))
11:35:28.086   Stream #0:8 -> #4:0 (subrip (srt) -> webvtt (native))
11:35:28.086   Stream #0:9 -> #5:0 (subrip (srt) -> webvtt (native))
11:35:28.086   Stream #0:10 -> #6:0 (subrip (srt) -> webvtt (native))

 

Pops32
Posted
On 3/15/2025 at 6:49 PM, Happy2Play said:

as decoding and encoding are happening with GPU.

It looks like you're right, it works in this case - I used Yandex browser (this is a chromium browser); and if you run the same video in Chrome (attached log ffmpeg-remux-fd000515-0472-4714-8003-56a8269743f4_1.txt) - it will look like the second case:

On 3/15/2025 at 6:49 PM, Happy2Play said:

For ffmpeg-remux-e6b0c663-1fab-4f34-99d6-a5404bfd5dba_1 it will not use HWA as only audio is converted

that is, it depends on the browser

ffmpeg-remux-fd000515-0472-4714-8003-56a8269743f4_1.txt embyserver (2).txt

  • Like 1
Posted
On 3/16/2025 at 3:32 PM, Pops32 said:

It looks like you're right, it works in this case - I used Yandex browser (this is a chromium browser); and if you run the same video in Chrome (attached log ffmpeg-remux-fd000515-0472-4714-8003-56a8269743f4_1.txt) - it will look like the second case:

that is, it depends on the browser

ffmpeg-remux-fd000515-0472-4714-8003-56a8269743f4_1.txt 100.15 kB · 0 downloads embyserver (2).txt 1.72 MB · 0 downloads

@Pops32again there is no video transcoding in this example, thus no use of the GPU required. Does that answer your question?

Pops32
Posted
On 3/17/2025 at 11:33 PM, Luke said:

@Pops32again there is no video transcoding in this example, thus no use of the GPU required. Does that answer your question?

I meant that the same video is played in one browser with hardware acceleration, and in another - without

Posted
40 minutes ago, Pops32 said:

I meant that the same video is played in one browser with hardware acceleration, and in another - without

Each browser has it's own set of supported media formats. In your Chrome example, the browser supports the video directly so we were able to avoid video transcoding altogether. This is a better result than a full video transcode with the GPU. 

Does this answer your question?

  • 2 weeks later...
Pops32
Posted
On 3/20/2025 at 10:04 PM, Luke said:

Each browser has it's own set of supported media formats. In your Chrome example, the browser supports the video directly so we were able to avoid video transcoding altogether. This is a better result than a full video transcode with the GPU. 

Does this answer your question?

That's understandable

  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...