jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
999 stars 79 forks source link

Max Bitrate #146

Closed Nazar78 closed 1 year ago

Nazar78 commented 2 years ago

Is there any chance default bitrate is being hardcoded?

I'm asking because despite not setting any bitrate limit, the TV (RU8000) is able to Direct Play HEVC 100mbps but not 150mbps, a video file from DJI Mini 3 Pro drone. The status info shows exceed max bitrate.

100mbps (Direct Play):

Video Title: 4K HEVC SDR Codec: HEVC Codec tag: hvc1 Profile: Main Level: 150 Resolution: 2688x1512 Aspect ratio: 16:9 Interlaced: No Framerate: 59.94006 Bitrate: 89920 kbps Video range: SDR Video range type: SDR Pixel format: yuv420p Ref frames: 1

150mbps (Transcoded):

Video Title: 4K HEVC SDR Codec: HEVC Codec tag: hvc1 Profile: Main 10 Level: 153 Resolution: 3840x2160 Aspect ratio: 16:9 Interlaced: No Framerate: 59.94006 Bitrate: 152424 kbps Bit depth: 10 bit Video range: SDR Video range type: SDR Pixel format: yuv420p10le Ref frames: 1

dmitrylyzo commented 2 years ago

Probably https://github.com/jellyfin/jellyfin-web/blob/d1bdbd7a168ca3c842ffff184f2524f4a3c883bc/src/scripts/browserDeviceProfile.js#L258-L260

Nazar78 commented 2 years ago

That's it. Thanks again @dmitrylyzo.

Any chance you would think we can request to increase this limit? Because there's already demand for it i.e. GoPro Hero 11 at 120mbps and the Mini 3 at 150mbps. If yes I could probably submit a PR maybe up it to 200?

dmitrylyzo commented 2 years ago

I think we can add maxBitrate to the options and pass it from the app depending on 4K/8K.

https://developer.samsung.com/smarttv/develop/specifications/media-specifications/2020-tv-video-specifications.html The bitrate of your video is almost twice the maximum specified bitrate. :thinking: Maybe they just specified guaranteed ones?

Nazar78 commented 2 years ago

I think we can add maxBitrate to the options and pass it from the app depending on 4K/8K.

That's beyond my capabilities for now. Anyway I just tested changing the getMaxBitrate to 200000000 then recompile everything again but it's still transcoding.

https://developer.samsung.com/smarttv/develop/specifications/media-specifications/2020-tv-video-specifications.html The bitrate of your video is almost twice the maximum specified bitrate. 🤔 Maybe they just specified guaranteed ones?

I guess you're right but I think the better approach is to auto switch to transcoding if Direct Play fails.

dmitrylyzo commented 2 years ago

If you enable the debug level on the server (/etc/jellyfin/logging.default.json), you can see DeviceProfile in the logs. There is also MaxStaticBitrate: 100000000.

I guess you're right but I think the better approach is to auto switch to transcoding if Direct Play fails.

It will, iirc.

EDIT: Found another place with maximum bitrate: https://github.com/jellyfin-archive/jellyfin-apiclient-javascript/blob/6e3ace3aac1228870fd85b1af41502c3bb688e6d/src/apiClient.js#L4091-L4117 It is hardcoded 140Mbps for LAN. :confused:

Nazar78 commented 2 years ago

EDIT: Found another place with maximum bitrate: https://github.com/jellyfin-archive/jellyfin-apiclient-javascript/blob/6e3ace3aac1228870fd85b1af41502c3bb688e6d/src/apiClient.js#L4091-L4117 It is hardcoded 140Mbps for LAN. 😕

Thank you very much for this! I'll test this out soon.

Anyway the 80/100Mbps maximum specified bitrate stated by Samsung probably because of their pathetic 100Mbps ethernet ports, with their Wi-fi 5G at least we can easily achieve above 100Mbps. I've seen the encoding done at 139Mbps above the spec and it's still playable on the TV.

Nazar78 commented 1 year ago

The latest 10.8.10 works great @ Direct Play HEVC 150mbps. Not sure what changed as I didn't noticed anything mentioned in the change log?