Jump to content

Recommended Posts

Posted (edited)

Hello there! I have had issues with stutters and movies not starting (actually caused by movies waiting fully for the transcode to finish) when using hardware transcoding. So i decided to do some investigation.

Setup

Server

  • CPU: Ryzen 5, 5600G
  • GPU: Nvidia RTX 3060 (12GB)
    • Drivers: 576.88
  • OS: Windows 11 Pro (24H2, 26100.4652)
  • Emby: 4.8.11.0

Client

  • Streamer (chromecasting to our chromecast): Server PC, (Chrome 138.0.7204.184)
  • Device: Chromecast gen3
  • Receiver: JVC RX-5052 (AC3, does NOT support EAC3)
  • Display: BenQ Projector (1080p, non-HDR)

Investigation

I tried 3 different videos with different formats. I change the HW encoder and decoder settings, and then play the video to see if it works. I have an active Emby Premier subscription.

 

Video 1: 4K Dolby Vision HEVC, TRUEHD 7.1

Codecs

  • Stream: MKV (79mbps)
  • Video: 4K Dolby Vision HEVC
    • Transcode (H264)
    • Tone Mapping (Hable)
  • Audio: TRUEHD 7.1 (Default)
    • Transcode (AC3 384 kbps)

Results

BTW none of these use Hardware accelerated tone mapping!!!!

Decoder Encoder Status Utilization
Disabled Disabled 🟩 Works (around 90% CPU)
Disabled NVENC(Default) 🟨 Waits until transcode is complete  
Disabled NVENC(Baseline) 🟧 Stutters  
Disabled NVENC(Main) 🟨 Waits until transcode is complete  
Disabled NVENC(High) 🟨 Waits until transcode is complete  
HVDEC Disabled 🟧 Stutters, but much more rarely.  
HVDEC NVENC(Default) 🟨 Waits until transcode is complete  
HVDEC NVENC(Baseline) 🟧 Stutters  
HVDEC NVENC(Main) 🟨 Waits until transcode is complete  
HVDEC NVENC(High) 🟨 Waits until transcode is complete  
DX11VA Disabled 🟩 Works (around 30% CPU, 40% GPU)
DX11VA* NVENC(Default) 🟨 Waits until transcode is complete  
DX11VA* NVENC(Baseline) 🟧 Stutters (Actually crashed once, not reproducable)  
DX11VA* NVENC(Main) 🟨 Waits until transcode is complete  
DX11VA* NVENC(High) 🟨 Waits until transcode is complete  
CUVID Disabled 🟩 Works (around 40% CPU, 40% GPU)
CUVID NVENC(Default) 🟨 Waits until transcode is complete  
CUVID NVENC(Baseline) 🟧 Stutters  
CUVID NVENC(Main) 🟨 Waits until transcode is complete  
CUVID NVENC(High) 🟨 Waits until transcode is complete

* Strikethrough means that it does not get reported being used in the Now Playing view in Admin, which means that it probably got disabled for some reason.

 

 

Video 2: 4K HDR 10 HEVC, DTS-HD MA 5.1

Codecs

  • Stream: MKV (15mbps)
  • Video: 4K HDR 10 HEVC
    • Transcode (H264)
    • Tone Mapping (Hable)
  • Audio: DTS-HD MA 5.1(Default)
    • Transcode (AC3 384 kbps)

Results

With HDR10 HEVC, we no longer have issues with it waiting for the entire transcoding to complete. But we just have stutters where we instead would have non-streaming with Dolby Vision.

BTW none of these use Hardware accelerated tone mapping!!!! (again)

Decoder Encoder Status
Disabled Disabled 🟩 Works
Disabled NVENC(Default) 🟧 Stutters
DX11VA Disabled 🟩 Works
DX11VA* NVENC(Default) 🟧 Stutters
CUVID Disabled 🟩 Works
CUVID NVENC(Default) 🟧 Stutters
CUVID NVENC(Baseline) 🟧 Stutters
CUVID NVENC(Main) 🟧 Stutters
NVDEC Disabled 🟩 Works
NVDEC NVENC(Default) 🟧 Stutters
NVDEC NVENC(Baseline) 🟧 Stutters
NVDEC NVENC(Main) 🟧 Stutters

* Strikethrough means that it does not get reported being used in the Now Playing view in Admin, which means that it probably got disabled for some reason.

 

 

Video 3: 4K HEVC, AAC 5.1

Codecs

  • Stream: MKV (6mbps)
  • Video: 4K HEVC
    • Transcode (H264)
  • Audio: AAC 5.1 (Default)
    • Transcode (AC3 320 kbps)

Results

First time where we can get HW-encoding to sortof work. No HDR here.

Decoder Encoder Status
Disabled Disabled 🟩 Works
Disabled NVENC(Default) 🟩 Works, stutters at start
Disabled NVENC(Baseline) 🟩 Works, stutters at start
NVDEC Disabled 🟩 Works
NVDEC NVENC(Default) 🟧 Stutters
NVDEC NVENC(Baseline) 🟧 Stutters
CUVID Disabled 🟩 Works
CUVID NVENC(Default) 🟧 Stutters
CUVID NVENC(Baseline) 🟧 Stutters
DX11VA Disabled 🟩 Works
DX11VA* NVENC(Default) 🟩 Works
DX11VA* NVENC(Baseline) 🟩 Works

* Strikethrough means that it does not get reported being used in the Now Playing view in Admin, which means that it probably got disabled for some reason.

all-logs.zip embyserver.txt

Edited by notalpha
Added log files, small typo
Posted

Hello notalpha,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:


Thank you.

Emby Team

Neminem
Posted

Have you enabled this ?

image.png.23c95521d6c4c1d3c7a2fc82e579b8e3.png

In my experience the wording is wrong, it also includes GPU.

Meaning it will transcode in bursts, instead of the whole file at once.

Posted

No, throttling is not enabled. I could try with it on, but this is not a utilization problem as my GPU/CPU is never quite maxed (except if we don't use any HW-accel at all). It would be interesting to see if it fixes the streaming problem with the Dolby Vision video though.

Neminem
Posted (edited)

Well I would strip out PGS subs they are really bad when streaming.

Also you have Stream #0:39(hin) in total in that media file, remove the once you do not need.

I only have official, English, in there as audio and all subs are also stripped.

I get my subs as .srt files if I can't move the embedded into .srt ( Text based that all clients work with ).

Further more you are using webui to stream, that huge file 79.307 bitrate.

This is what i get out of this log

ffmpeg-remux-a8506053-9b55-4a74-bdca-eaa7ba8ab26b_1.txt

Edited by Neminem
Posted

Oops. I accidentally included logs from when i accidentally started streaming in my browser, instead of the chromecast (all remux logs).

 


 ---


About the browser, this is really interesting. Transcoding with HVDEC and HVENC (Default) works without issues (On firefox), and causes it to blink black every 5 seconds on Chrome. Note, it is transcoding to HLS on the browser, instead of MKV (chromecast).

 

Firefox:

Works without issues

Stream

 

MKV (79 mbps)
-> HLS (119 mbps 84 fps)
Converting to compatible container
Recovering from playback error
 
Video
4K Dolby Vision HEVC (HW) Main 10 153 79 mbps 23.976 fps
-> Transcode (H264 119 mbps) (HW)
-> Tone Mapping (Hable)
Dropped Frames 0
 
Audio
English TRUEHD 7.1 (Default) 48000 Hz
-> Transcode (AAC 192 kbps)
 
 
 
 
Chrome:
Constantly freezes with a black screen, then resumes playing for 2 second. Repeat repeat.

Stream

MKV (79 mbps)
-> HLS (119 mbps 286 fps)
Converting audio to compatible codec
 
Video
4K Dolby Vision HEVC (HW) Main 10 153 79 mbps 23.976 fps
-> Direct Play
 
Audio
English TRUEHD 7.1 (Default) 48000 Hz
-> Transcode (MP3 192 kbps)
Neminem
Posted

Ok no worries 😉

I would guess Dev's need to answer.

But I would try with a lower bit rate version of file or with a copy with out all the PGS subs in it.

Just for the fun of it.

Posted

Hi, we are looking into it. Thanks.

Posted
17 hours ago, Luke said:

Hi, we are looking into it. Thanks.

Same issue for me when using a browser. It is fine through the apps but the browser blinks out and stalls every few seconds or just stops playing all together. I did some digging on my server and I noticed when it is playing through the browser ffmpeg is maxing out the HDD reads and that appears to be what is freezing it. When I play through the apps/theater the HDD stays around 3-4% which is normal. This started within the last week from what I can tell. Hope this helps. 

Posted (edited)

Just did another few tests and I can get it working in Firefox without stalling or stuttering and it does not max the HDD activity out but it is running 100% on the GPU (3090 FTW3 Ultra). Went back and tested it from the Theater app and GPU usage sits at 1-3% and HDD usage is 3-5%. Whatever it is doing to serve up the files to browsers is definitely off.  

Has the ffmpeg package been updated recently? Just guessing at this point, but that could be the root cause. 

Edited by Fyn0X6F
Posted
5 hours ago, Fyn0X6F said:

 

Has the ffmpeg package been updated recently? Just guessing at this point, but that could be the root cause. 

Hi, no, but we will be updating the ffmpeg build on the server beta channel in the near future, so stay tuned for that.

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...