jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.92k stars 495 forks source link

Firestick 4k max (files with hdr10+ and dolby vision profile 8.1) #2630

Open bobaoapae opened 1 year ago

bobaoapae commented 1 year ago

Describe the bug

When playing a file that has hdr10+ and also dolby vision profile 8.1 image get full black or duplicate(check here).

This issue occours on all others players too, but kodi appers to have found a solution (here). Whe using this version i go do options -> video -> uncheck hdr10+ and video play smoth using Dolby Vision, if keep hdr10+ and dolby vision same issue happens, appers to have some problem with firestick decode that can't play a file with theses two codecs enabled, need to explicit configure player to use one or other

I can play the same file using this kodi modded version without any issue, but using exoplayer/libvlc on jellyfind don't work

Logs

No response

FFmpeg logs

No response

Media info of the file

Vídeo
Título: 4K HEVC HDR
Codec: HEVC
Perfil: Main 10
Nível: 150
Resolução: 3832x1596
Proporção da tela: 2.40:1
Entrelaçado: No
Taxa de quadros: 23.976025
Bitrate: 25167 kbps
Profundidade de bits: 10 bit
Intervalo do vídeo: HDR
Video range type: HDR10
DV title: DV Profile 8.1 (HDR10)
DV version major: 1
DV version minor: 0
DV profile: 8
DV level: 6
DV rpu preset flag: 1
DV el preset flag: 0
DV bl preset flag: 1
DV bl signal compatibility id: 1
Espaço de cor: bt2020nc
Transferência de cor: smpte2084
Cores primárias: bt2020
Formato de pixel: yuv420p10le
Quadros de referência: 1

Application version

latest

Device information

Amazon Firestick 4k max

Android version

latest

Jellyfin server version

latest

nreis96 commented 10 months ago

Hi, I have created this issue for exoPlayer https://github.com/androidx/media/issues/957 which is currently one of the native players in Stremio and both firestick 4k max 1st and 2nd gen will cause issues (either black screen with audio only or split screen).

Considering a player as Vimu Media Player makes it work I was hoping a fix can be created within the player itself (exoPlayer in this case), if anyone has suggestions or comments please add them in there or here!

Thanks in advance.

nreis96 commented 10 months ago

@tonihei "If this issue is more permanent and can't be fixed by Dolby/Amazon, we could add a workaround in ExoPlayer to exclude this codec on these devices, but ideally we can just fix the underlying issue." Considering it's been half a year and this quite an annoying issue, could you please add a workaround in ExoPlayer itself? Even if not preferred solution? It's quite obvious by now that Amazon won't do anything, and DV team (@ybai001) has tried their best. Let users know please

tonihei commented 10 months ago

The issue that the workaround is not quite as simple as I thought. What I was seeing only fixes the issue on older FireTV Stick 4K Ultra HD devices, not the 2021 4K Max ones. The only known workaround for the new devices (as far as I understand) is to modify the actual bitstream to remove either HDR+ or DV metadata (see https://github.com/quietvoid/xbmc/commit/308135d42e04eca6c2e50af9d510a4b1c0daae4e). While this is possible in theory, it's quite invasive as bitstream rewriting isn't usually done when processing video bytes and there is no existing method we could simply hook into. If you are motivated to solve it, feel free to send a Media3 pull request that does that and we can see how it looks like. It could probably go somewhere in this method where you could try to modify the contents of inputBuffer.data.

nreis96 commented 10 months ago

There's no chance to edit it the way Kodi has it in advanced config settings to force HDR or DV?

massijay commented 10 months ago

I think one solution might be that the client (with a certain setting) asks to the server to strip out DoVi or HDR10+ metadata on the fly. In this way we can entirely workaround this problem

GreenDude120 commented 8 months ago

4k max user here; i can confirm that kodi's advanced option they added at some point in 21 omega solved the issue for me. I would love jellyfin to add one of the suggestions above whereby an advanced setting could make the server strip out the metadata on the fly. please & thanks!

nickshanks347 commented 6 months ago

Same here for Jellyfin on a 4k Max (just bought so guessing 2023 model)

mfizz1 commented 6 months ago

I too have the same issue. But whilst the team are working hard to fix it, is there a script or way to remove hdr10+ elements from the file so that only dolby vision remains which would seemingly fix the issue

mfizz1 commented 6 months ago

For anyone interested, by running the following command, you can get rid of the HDR10+ data which then means the file is playable again, for hevc files.

ffmpeg -i input.mkv -c copy -bsf:v "filter_units=remove_types=39" output.mkv

dfriday commented 6 months ago

For anyone interested, by running the following command, you can get rid of the HDR10+ data which then means the file is playable again, for hevc files.

ffmpeg -i input.mkv -c copy -bsf:v "filter_units=remove_types=39" output.mkv

Thanks, it worked. You should add -map 0 otherwise all secondary audio and subtitle tracks will be deleted! ffmpeg -i input.mkv -map 0 -c copy -bsf:v "filter_units=remove_types=39" output.mkv

mfizz1 commented 5 months ago

Does anyone know of a way that avoids remux which is inherent of ffmpeg. Something can modify the existing file?

Skyl3lazer commented 5 months ago

I'm still interested in this fix as well! It's frustrating that it's a bug on their end but a workaround would be nice.

nickshanks347 commented 5 months ago

I'm still interested in this fix as well! It's frustrating that it's a bug on their end but a workaround would be nice.

Workaround is using Kodi to strip either HDR10 or DV metadata on the fly

Skyl3lazer commented 5 months ago

That workaround would involve my non-technical users having to install third party media players and plugins, it's a nonstarter for me unfortunately.

On Mon, Jun 17, 2024, 10:22 AM Nick @.***> wrote:

I'm still interested in this fix as well! It's frustrating that it's a bug on their end but a workaround would be nice.

Workaround is using Kodi to strip either HDR10 or DV metadata on the fly

— Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-androidtv/issues/2630#issuecomment-2173559438, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQYWERKJFA2SJWJGMSC4R3ZH3WJLAVCNFSM6AAAAAAWPX2RDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGU2TSNBTHA . You are receiving this because you commented.Message ID: @.***>

dandud100 commented 3 months ago

I have the same issue.

laniakea789 commented 2 months ago

This also affects the new Google TV Streamer which uses the same SoC as Firestick 4k Max

Tresillo2017 commented 1 month ago

This also affects the new Google TV Streamer which uses the same SoC as Firestick 4k Max

Can confirm, I can play movies with the new av1 codec but other ones with hvenc and hdr10+ with dolby vision and atmos it will give a playback error or hang the app on a black screen without audio

mfizz1 commented 1 month ago

2 years since the original issue was reported. This seems to be a bug on all Android systems where they are connected to a TV, arguably one of the most used ways of consuming content, yet there seems to be no traction on this issue. Kodi have worked out a way to filter the hdr10 or dolby vision profile. Can we not do the same.

thornbill commented 1 month ago

Can we not do the same.

Sure! Feel free to open a PR to do so.

twinko commented 3 weeks ago

For anyone interested, by running the following command, you can get rid of the HDR10+ data which then means the file is playable again, for hevc files. ffmpeg -i input.mkv -c copy -bsf:v "filter_units=remove_types=39" output.mkv

Thanks, it worked. You should add -map 0 otherwise all secondary audio and subtitle tracks will be deleted! ffmpeg -i input.mkv -map 0 -c copy -bsf:v "filter_units=remove_types=39" output.mkv

HI @dfriday Where to put this code? I guess ich have to modifiy output/input.mkv right?