Jump to content

Any way to block h265 decoding


SLMK

Recommended Posts

I have Emby theater on an older device that struggles with X265 playback. It can manage it, but only with very limited bitrate and resolution.

The problem is Emby thinks it can manage it and attempts direct play for most X265 content. Ive got a few shows that immediately lock up on trying to play, before I even have a chance to access the quality options.

Is there any way of telling this client not to attempt X265 and force transcode for all these files? At the moment this user is swapping back to the web client for the problematic files.

Edited by SLMK
Link to comment
Share on other sites

No not directly.  You could change the resolution/bitrate option from auto to something a bit lower than the media to force the server to transcode it.

 

Link to comment
Share on other sites

The problem with that is this is not high bitrate content, that method works fine for HD movies, but for some of the H265 episodes the files were chosen primarily for storage.

I would have to set an unreasonably low bitrate setting to force transcode on these, and in the case of one show in particular it just locks up as soon as playback is attempted, I would have to set the limit for the entire user causing all other content to look like trash (the user has 100Mbps internet and this box handles 1080P H264 just fine).

The partial H265 support in early Intel core generations seems to be really poor, a good work around to override this would be great.

I may need to try find a copy of the earlier outdated video drivers before decoding was added in.

Link to comment
Share on other sites

sooty234

It shouldn't lock up. If not supported, it should just kick you out. Have you tried playing them in other players? Can you describe locking up in more detail?

Link to comment
Share on other sites

42 minutes ago, sooty234 said:

It shouldn't lock up. If not supported, it should just kick you out. Have you tried playing them in other players? Can you describe locking up in more detail?

That's the problem I think. Certain older Intel chips do kind of support H265, they just support it really poorly. If the player didn't even attempt to direct play the videos they would transcode and the issue would be gone. The videos are fine on my other clients with more up to date hardware, and the files transcode to H264 and play perfectly through the web client on the problem PC. It just that it thinks it can handle them when it really shouldn't.

With Most H265 on this box playback starts, it just lags really badly and I can at least change the quality to force a transcode, but some of it is proving more difficult.

Edited by SLMK
Link to comment
Share on other sites

17 minutes ago, Luke said:

We can look into adding an option for this.

That would be great, I figure its probably a pretty niche requirement so a simple config file or something would do the trick, but a tickbox to always transcode H265 would work great.

Link to comment
Share on other sites

sooty234

If you would humor me. I'm attaching a preconfigured mpv. Unzip the folder anywhere you want. In the folder there is a file called mpv.exe. Double click on it, and then drag and drop your video onto it? It should play automatically. A text file called mpv.txt will be written in the same folder as the mpv.exe. Can you attach that?

mpv test.zip

Link to comment
Share on other sites

1 hour ago, sooty234 said:

If you would humor me. I'm attaching a preconfigured mpv. Unzip the folder anywhere you want. In the folder there is a file called mpv.exe. Double click on it, and then drag and drop your video onto it? It should play automatically. A text file called mpv.txt will be written in the same folder as the mpv.exe. Can you attach that?

mpv test.zip 42.15 MB · 2 downloads

I can do this on one of my own machines that does not have the issue if you just want info on the problem file? I wont be able to get back onsite to the machine with the problems for a while.

Link to comment
Share on other sites

On 8/14/2020 at 2:32 PM, sooty234 said:

If you would humor me. I'm attaching a preconfigured mpv. Unzip the folder anywhere you want. In the folder there is a file called mpv.exe. Double click on it, and then drag and drop your video onto it? It should play automatically. A text file called mpv.txt will be written in the same folder as the mpv.exe. Can you attach that?

mpv test.zip 42.15 MB · 2 downloads

OK, so looks like my theory was complete bullshit. The file plays fine (with occasional minor lagging) directly in mpv, it just locks up in emby theater. I should also mention Ive found it does actually play direct through emby if you give it enough time, it just locks up for a good minute before playback starts. No issues transcoding and playing through web client.

Specs of the server are: ryzen 2700x, 16gb ram, 10 pro 2004, gt1050ti. Media is stored on a separate NAS, internet is 1000/500.

Playback device with the issues is: i3-4050T, 8gb ram, 10 pro 2004. Internet is 100/20.

File is attached, hopefully this helps.

mpv.txt

Link to comment
Share on other sites

sooty234

Not necessarily. I can't look at the log until later, but the first thing that needs to be verified is that hardware acceleration is actually being used and isn't falling back to software. But what I suspect is that it's a cache/demuxer issue. In Theater the stream is being fed through a pipe. Since the last release of Theater, there has development in how the pipe is handled, the demuxers and the cache. So that maybe be helping, here. There may also be some glitches in your file muxing. So two things you can experiment with are, replace the mpv.exe in the Theater installation with the one I gave you, and try remuxing one of your problem videos. I'll try looking at your log later this evening.

Link to comment
Share on other sites

sooty234

Well, your hardware does support it:

[   7.133][v][decode_wrapper/vd] Trying hardware decoding via hevc-d3d11va.
[   7.133][v][decode_wrapper/vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[   7.133][v][vf] User filter list:
[   7.133][v][vf]   (empty)
[   7.134][v][decode_wrapper/ad] Codec list:
[   7.134][v][decode_wrapper/ad]     aac - AAC (Advanced Audio Coding)
[   7.134][v][decode_wrapper/ad]     aac_fixed (aac) - AAC (Advanced Audio Coding)
[   7.134][v][decode_wrapper/ad] Opening decoder aac
[   7.134][v][decode_wrapper/ad] Requesting 1 threads for decoding.
[   7.136][v][decode_wrapper/ad] Selected codec: aac (AAC (Advanced Audio Coding))
[   7.136][v][af] User filter list:
[   7.136][v][af]   (empty)
[   7.136][v][cplayer] Starting playback...
[   7.136][d][osc] osc_init 
[   7.137][v][decode_wrapper/vd] Pixel formats supported by decoder: dxva2_vld d3d11va_vld d3d11 cuda yuv420p
[   7.137][v][decode_wrapper/vd] Codec profile: Main (0x1)
[   7.137][v][decode_wrapper/vd] Requesting pixfmt 'd3d11' from decoder.
[   7.137][d][ffmpeg/video] hevc: Decoder GUIDs reported as supported:
[   7.137][d][ffmpeg/video] hevc: {ee27417f-5e28-4e65-beea-1d26b508adc9} 103 106
[   7.137][d][ffmpeg/video] hevc: {bf22ad00-03ea-4690-8077-473346209b7e} 103 106
[   7.137][d][ffmpeg/video] hevc: {1b81bea4-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.137][d][ffmpeg/video] hevc: {e07ec519-e651-4cd6-ac84-1370cceec851} 103 106
[   7.137][d][ffmpeg/video] hevc: {bcc5db6d-a2b6-4af0-ace4-adb1f787bc89} 103 106
[   7.137][d][ffmpeg/video] hevc: {1b81be94-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {1b81bea2-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {1b81be68-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {d79be8da-0cf1-4c81-b82a-69a4e236f43d} 103 106
[   7.138][d][ffmpeg/video] hevc: {f9aaccbb-c2b6-4cfc-8779-5707b1760552} 103 106
[   7.138][d][ffmpeg/video] hevc: {705b9d82-76cf-49d6-b7e6-ac8872db013c} 103 106
[   7.138][d][ffmpeg/video] hevc: {91cd2d6e-897b-4fa1-b0d7-51dc88010e0a} 103 106 107
[   7.138][d][ffmpeg/video] hevc: {97688186-56a8-4094-b543-fc9daaa49f4b} 103 106
[   7.138][d][ffmpeg/video] hevc: {c346e8a3-cbed-4d27-87cc-a70eb4dc8c27} 103 106
[   7.138][d][ffmpeg/video] hevc: {ffc79924-5eaf-4666-a736-06190f281443} 103 106
[   7.138][d][ffmpeg/video] hevc: {f416f7bd-098a-4cf1-a11b-ce54959ca03d} 103 106
[   7.138][d][ffmpeg/video] hevc: {bf44dacd-217f-4370-a383-d573bc56707e} 100 103 106
[   7.138][d][ffmpeg/video] hevc: {2364d06a-f67f-4186-aed0-62b99e1784f1} 103 106
[   7.138][d][ffmpeg/video] hevc: {8c56eb1e-2b47-466f-8d33-7dbcd63f3df2} 103 106
[   7.138][d][ffmpeg/video] hevc: {5b11d51b-2f4c-4452-bcc3-09f2a1160cc0} 103 106
[   7.138][d][ffmpeg/video] hevc: {49761bec-4b63-4349-a5ff-87ffdf088466} 103 106
[   7.186][i][decode_wrapper/vd] Using hardware decoding (d3d11va).
[   7.186][v][decode_wrapper/vd] Decoder format: 1280x720 [0:1] d3d11[nv12] bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264
[   7.186][v][decode_wrapper/vd] Using container aspect ratio.
[   7.186][v][vf] [in] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[   7.187][v][vf] [userdeint] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264

 

And the 'occasional minor lagging' might be this:

[   7.260][v][cplayer] first video frame after restart shown
[   7.262][v][cplayer] audio sync: sync_to_video=1, offset=-0.115000
[   7.263][d][cplayer] starting video playback
[   7.263][d][cplayer] starting audio playback
[   7.263][d][ao/wasapi] Thread Resume
[   7.263][d][ao/wasapi] Thread Reset
[   7.263][v][cplayer] playback restart complete @ 0.115000, audio=playing, video=playing

 

Link to comment
Share on other sites

1 hour ago, sooty234 said:

Well, your hardware does support it:

 

Yea. My theory that support is poor was based on this: https://techreport.com/news/27677/new-intel-igp-drivers-add-h-265-vp9-hardware-decode-support/

To the best of my knowledge these chips did not originally have H265 hardware decode, but partial support was added by a driver update. From what I have gathered the H265 decode is not based on fixed function hardware decoders like H264 decoding, but is a hybrid software/hardware decoder using the GPU shaders. Part of the issue may simply be the i3-4050T is so slow (its in a little sub 1 litre SFF chassis) that the GPU isn't keeping up with the job. I really don't know, its just a theory as these files are no problem anywhere else.

I do think an option for a codec "safe mode" in theater that limits all direct play to h264 and transcodes the rest would be useful, and would solve my problem here nicely.

Link to comment
Share on other sites

sooty234

Oh hold on.... I missed that..... This is weird....

[   7.103][i][cplayer]  (+) Video --vid=1 (*) (hevc 1280x720 23.976fps)
[   7.103][i][cplayer]  (+) Audio --aid=1 (*) 'Stereo' (aac 2ch 44100Hz)
[   7.103][i][display-tags] File tags:
[   7.103][i][display-tags]  Title: a Y2J encode
[   7.104][v][decode_wrapper/vd] Container reported FPS: 23.976024
[   7.105][v][decode_wrapper/vd] Codec list:
[   7.105][v][decode_wrapper/vd]     hevc - HEVC (High Efficiency Video Coding)
[   7.105][v][decode_wrapper/vd]     hevc_qsv (hevc) - HEVC (Intel Quick Sync Video acceleration)
[   7.105][v][decode_wrapper/vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[   7.105][v][decode_wrapper/vd] Opening decoder hevc
[   7.106][v][decode_wrapper/vd] Looking at hwdec hevc-d3d11va...
[   7.106][v][vo/gpu] Loading hwdec driver 'd3d11-egl'
[   7.106][v][vo/gpu] Loading failed.
[   7.106][v][vo/gpu] Loading hwdec driver 'dxva2-egl'
[   7.106][v][vo/gpu] Loading failed.
[   7.106][v][vo/gpu] Loading hwdec driver 'd3d11va'
[   7.108][v][vo/gpu] Loading hwdec driver 'dxva2-dxgi'
[   7.132][v][vo/gpu] Loading hwdec driver 'dxva2-dxinterop'
[   7.132][v][vo/gpu] Loading failed.
[   7.132][v][vo/gpu] Loading hwdec driver 'cuda-nvdec'
[   7.133][v][vo/gpu/cuda-nvdec] Failed to load CUDA symbols
[   7.133][v][vo/gpu] Loading failed.
[   7.133][v][decode_wrapper/vd] Trying hardware decoding via hevc-d3d11va.
[   7.133][v][decode_wrapper/vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[   7.133][v][vf] User filter list:
[   7.133][v][vf]   (empty)
[   7.134][v][decode_wrapper/ad] Codec list:
[   7.134][v][decode_wrapper/ad]     aac - AAC (Advanced Audio Coding)
[   7.134][v][decode_wrapper/ad]     aac_fixed (aac) - AAC (Advanced Audio Coding)
[   7.134][v][decode_wrapper/ad] Opening decoder aac
[   7.134][v][decode_wrapper/ad] Requesting 1 threads for decoding.
[   7.136][v][decode_wrapper/ad] Selected codec: aac (AAC (Advanced Audio Coding))
[   7.136][v][af] User filter list:
[   7.136][v][af]   (empty)
[   7.136][v][cplayer] Starting playback...
[   7.136][d][osc] osc_init 
[   7.137][v][decode_wrapper/vd] Pixel formats supported by decoder: dxva2_vld d3d11va_vld d3d11 cuda yuv420p
[   7.137][v][decode_wrapper/vd] Codec profile: Main (0x1)
[   7.137][v][decode_wrapper/vd] Requesting pixfmt 'd3d11' from decoder.
[   7.137][d][ffmpeg/video] hevc: Decoder GUIDs reported as supported:
[   7.137][d][ffmpeg/video] hevc: {ee27417f-5e28-4e65-beea-1d26b508adc9} 103 106
[   7.137][d][ffmpeg/video] hevc: {bf22ad00-03ea-4690-8077-473346209b7e} 103 106
[   7.137][d][ffmpeg/video] hevc: {1b81bea4-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.137][d][ffmpeg/video] hevc: {e07ec519-e651-4cd6-ac84-1370cceec851} 103 106
[   7.137][d][ffmpeg/video] hevc: {bcc5db6d-a2b6-4af0-ace4-adb1f787bc89} 103 106
[   7.137][d][ffmpeg/video] hevc: {1b81be94-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {1b81bea2-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {1b81be68-a0c7-11d3-b984-00c04f2e73c5} 103 106
[   7.138][d][ffmpeg/video] hevc: {d79be8da-0cf1-4c81-b82a-69a4e236f43d} 103 106
[   7.138][d][ffmpeg/video] hevc: {f9aaccbb-c2b6-4cfc-8779-5707b1760552} 103 106
[   7.138][d][ffmpeg/video] hevc: {705b9d82-76cf-49d6-b7e6-ac8872db013c} 103 106
[   7.138][d][ffmpeg/video] hevc: {91cd2d6e-897b-4fa1-b0d7-51dc88010e0a} 103 106 107
[   7.138][d][ffmpeg/video] hevc: {97688186-56a8-4094-b543-fc9daaa49f4b} 103 106
[   7.138][d][ffmpeg/video] hevc: {c346e8a3-cbed-4d27-87cc-a70eb4dc8c27} 103 106
[   7.138][d][ffmpeg/video] hevc: {ffc79924-5eaf-4666-a736-06190f281443} 103 106
[   7.138][d][ffmpeg/video] hevc: {f416f7bd-098a-4cf1-a11b-ce54959ca03d} 103 106
[   7.138][d][ffmpeg/video] hevc: {bf44dacd-217f-4370-a383-d573bc56707e} 100 103 106
[   7.138][d][ffmpeg/video] hevc: {2364d06a-f67f-4186-aed0-62b99e1784f1} 103 106
[   7.138][d][ffmpeg/video] hevc: {8c56eb1e-2b47-466f-8d33-7dbcd63f3df2} 103 106
[   7.138][d][ffmpeg/video] hevc: {5b11d51b-2f4c-4452-bcc3-09f2a1160cc0} 103 106
[   7.138][d][ffmpeg/video] hevc: {49761bec-4b63-4349-a5ff-87ffdf088466} 103 106
[   7.186][i][decode_wrapper/vd] Using hardware decoding (d3d11va).
[   7.186][v][decode_wrapper/vd] Decoder format: 1280x720 [0:1] d3d11[nv12] bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264
[   7.186][v][decode_wrapper/vd] Using container aspect ratio.
[   7.186][v][vf] [in] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[   7.187][v][vf] [userdeint] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[   7.187][v][vf] [userdeint] (disabled)
[   7.187][v][vf] [autorotate] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[   7.187][v][vf] [autorotate] (disabled)
[   7.187][v][vf] [convert] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[   7.187][v][vf] [convert] (disabled)
[   7.187][v][vf] [out] 1280x720 d3d11[nv12] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264

It starts off as HEVC and outputs h264... 

I need to experiment....

Link to comment
Share on other sites

sooty234

Oh no, that's just the standard print out. I get the same when I play an HEVC video. Your GPU supports it in hybrid. I used to have one of those processors a long time ago. I don't recall any issues I had. You know what you could try, and it might smooth out the playback? Try a copy-mode. Try D3D copy back. But I do suggest replacing mpv with the version I gave you.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
mprasil

 

 On 14/08/2020 at 03:15, SLMK said:

That would be great, I figure its probably a pretty niche requirement so a simple config file or something would do the trick, but a tickbox to always transcode H265 would work great.

 

On 14/08/2020 at 02:57, Luke said:

We can look into adding an option for this.

This would be great feature to have. My Intel box only decodes H265 8bit in HW and it's too slow for SW decoding. So either some way to force transcoding for 10bit h265 or even for all h265 content would be great.

 

 

Edited by mprasil
submitted too early
Link to comment
Share on other sites

  • 5 months later...

Just a quick follow up, this issue has been resolved with server updates a month or two ago. Ive had no reports of it still happening.

Cheers.

Link to comment
Share on other sites

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