jellyfin-archive / jellyfin-android-original

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
272 stars 65 forks source link

Add setting to tell Jellyfin Server that device is HEVC capable to receive transcoded streams in HEVC. #335

Open Spamm00r opened 4 years ago

Spamm00r commented 4 years ago

Code for HEVC Support has been forked into Jellyfin Server some time ago. See this issue for the relevant discussion:

https://github.com/jellyfin/jellyfin/issues/1432

It works fine if you catch the get request and change the VideoCodec=h264 to VideoCodec=h265 and Jellyfin Server will send a hevc transcoded stream.

For MPV Shim, @iwalton3 has now added support into the MVP Shim Client and the client now contains a setting that allows to tell the Jellyfin server to transcode to hevc. See His post here:

https://github.com/jellyfin/jellyfin/issues/3018

Next step is to also have HEVC capable client on Android.

It would be nice to be able to receive HEVC transcoded streams on an Android tablet.

Many Android tablets from the last few years for example with a Snapdragon chip are able to decode HEVC on a Hardware level. Unfortunately we lack a client application to make use of it as of now.

So all is missing is a capable client application on android to recieve HEVC Streams now.

I might add that Moonlight Gamestream client: https://github.com/moonlight-stream and more specifically https://github.com/moonlight-stream/moonlight-android

has an Android client that is able to receive HEVC Streams with ultra low latency.

On my Samsung Table with Snapdragon, the stream plays flawless with moonlight.

Please enable this feature also for the jellyfin android client and if possible also into the Web Client.

jeroenev commented 4 years ago

My issue is similar, so I thought i'd add it here as a comment instead of a new issue. The content on my server is already encoded with h265, and my android device is fully capable of playing h265 content (downloading and playing with VLC works perfectly fine) However since the app does not support playback of that content, it causes an incompatible format error.

(i've disabled transcoding on the server, since it's just too slow to transcode, so it just gives an incompatible format error instead of transcoding at 3fps)

Spamm00r commented 4 years ago

I think the main problem is that the client needs to support HEVC.

With MPV Shim it works, because the MPV does support playing HEVC. The same with VLC. All you need to do is tell the Jellyfin Server to send a hevs stream.

In MPV Shim this was easy and this feature was added yesterday and therefore now it supports asking the Jellyfin server for an hevc stream.

On VLC, you can ask for an hevc stream by editing the GET request and it will work as VLC does support hevc.

But on clients, that do not support HEVC just asking for an HEVC will produce the error that you mention. For example in Browsers like chrome or firefox.

Unfortunately, these browser do not support HEVC.

There was a version of Edge Chromium that supports hevc. I tested it with a local file and that browser does play HEVC, but unfortunately Jellyfin does not ask for HEVC for the browser. So it is worthwhile to add a setting to force the server to send hevc streams.

I linked to the moonlight app, as moonlight does have code that allows to playback hevc streams on android.

twdkeule commented 4 years ago

HEVC on Android works fine when using Directstream, when they original content is already HEVC.

Also, there are Chromium builds available that support HEVC playback. You can download one here: https://chromium.woolyss.com/#windows

Spamm00r commented 4 years ago

HEVC on Android works fine when using Directstream, when they original content is already HEVC.

Also, there are Chromium builds available that support HEVC playback. You can download one here: https://chromium.woolyss.com/#windows

The last time I checked, HEVC support had been dropped since verion 79. The website says:

Note about the H.265/HEVC video codec

Chromium does (and will) not natively support the H.265/HEVC codec. (official source) The licence of H.265/HEVC is non-free. It is currently mainly supported by Apple. (Support of H.265/HEVC in web browsers) The Chromium team prefers to focus on the open-source AV1 codec. This one is supported by major companies (Alliance for Open Media) like Google, Microsoft, Intel, Samsung... (Support of AV1 in web browsers).