-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Dolby Vision playback on webOS #5553
Fix Dolby Vision playback on webOS #5553
Conversation
We might need additional workarounds for webOS. A lot of users reported that webOS has problem seeking with fMP4 container and webOS can playback hevc in TS container as well. My question now would be that does webOS playback dolby vision in hls with ts container as well? If that is the case we may override the default container to prefer ts on webOS and push hevc support for ts containers. |
@gnattu I can start playing around with that on my C3, see where it takes us. I will keep you posted. |
@gnattu I am starting to believe ffmpeg can't passthrough DoVi metadata when remuxing to ts. I might be mistaken, but I haven't been able to make a mpegts file that will playback properly. If you have any advice for how I am to do that, I will be happy to test. So far only mp4 has worked for me |
This PR aims at WebOS >=5, but my C9 (2019) running WebOS 4.9.7 seems to play DoVi profile 8 content just fine (using LG's internal media player). In mp4 that is, as with remuxing to TS using ffmpeg I'm hitting the same roadblock as @GeorgeH005. |
@854562 I didn't want to blindly include all past webOS TVs, as I can't test with all of them. I had info up until the 2020 lineup. I will commit a change to include the 2019 lineup. Just making sure, it doesn't currently work with jellyfin v10.9.2, correct? If anyone stumbles upon this pull request with an even older TV that has been tested and supports DoVi profile 8 but isn't working with the current jellyfin version, please drop a comment. |
That's correct. A remux is triggered for mkv files but the player falls back to HDR10 anyway. |
@gnattu Just occured to me, is it possible that the problematic models have an issue with |
@854562 Very well. Will push that now. Thanks! |
Cloudflare Pages deployment
|
Hi @GeorgeH005, some further info:
I also found some discussions on GitHub (mentioned also on jellyfin-web repo), about different DV8 profiles and LG OLEDs behaviour (C8, CX). Hope any of these helps. |
@lgndvd I will take a look at that discussion. My problem at the moment is the fact that I can't seem to get ffmpeg to remux an mkv containing Dolby Vision to mpegts without losing the DoVi metadata. If you remuxed those files yourself I would love to read how you did it. |
If you use jellyfin-ffmpeg you should not lose anything? |
@gnattu I was using ffmpeg6 from macports to make those files at the time. Although I did modify our existing code to allow DoVi only for ts container and had the same result. I will retry properly in a few hours. Also the linked discussion has some interesting testing about the differences of dvh1 and dvhe when it comes to seeking performance. I will play around with those as well, see if we gain anything by using one instead of the other. Although apple not recommending the latter might be a problem if we actually do gain something. Will be back in a few hours with the results. |
@GeorgeH005 yes, I do them with tsMuxerGUI nightly: shortly, I drag and drop my MKV DV sources, select video+audio tracks to be included, choose "TS muxing" as output and, usually in a couple of minutes, I get my working TS file. This output file direct plays flawlessly both locally and with Jellyfin 10.8.x. I do some additional work outside of tsMuxer only when muxing from multiple sources and/or dealing with DTS audio (not supported by CX). I also don't include subtitles, because afaik TS supports only bitmap, so I pass them as external SRTs. I also experimented with some mp4 workflows (using ffmpeg GUIs), and at some point had success...but the process was usually slower and generally more cumbersome when dealing with multiple tracks metadata...so I went back to my good old TS workflow (quicker, idiot-proof). |
@lgndvd The problem is that we need ffmpeg to be able to do that conversion, because that is what is being used to create the fragments comprising the stream. If that can't passthrough the DoVi metadata to the resulting mpegts fragments I don't believe there is much we can do on the jellyfin side of things. |
@gnattu Using jellyfin-ffmpeg I still can't get an mpegts file with DoVi metadata. Here is what I get using
Converting with the same exact arguments to mp4 gives me this:
If you have any suggestions as to which arguments I should use, I would be very happy to hear them. Didn't get a chance to play around with the codec tags by the way. Will try to see if safari can play back anything tagged hev1 or dvhe first and test at the Tv tomorrow. |
@GeorgeH005 Well you should not use a static file for testing because we applied the dolby vision data copy for hlsenc: https://github.com/jellyfin/jellyfin-ffmpeg/blob/jellyfin/debian/patches/0033-add-hevc-dovi-sidedata-to-hlsenc.patch Did you try jellyfin-ffmpeg on jellyfin with remuxing to ts? Did that work? |
@gnattu Tried to modify this line to jellyfin-web/src/scripts/browserDeviceProfile.js Line 1224 in ebfe6fe
To be honest, I haven't worked out yet how those conditions work, but I assumed that if I modified that, it would try to remux to ts. While it did remux seemingly to ts based on the logs, the metadata was not passed through and the colors were off. |
@GeorgeH005 when approaching ffmpeg, I learned that If I remember correctly, I used Tomorrow I could take a look to my past ffmpeg arguments, if needed (writing this from my phone). Please consider that my knowledge is very limited, just sharing what I learned with reading, trial and error during last year. |
@GeorgeH005 @lgndvd I looked back at the FFmpeg code and found that |
@GeorgeH005 Can you try this new jellyfin-ffmpeg? jellyfin/jellyfin-ffmpeg#393 |
@nyanmisaka Works beautifully!! And seeking with ts does indeed work much better. Will play around with the other mp4 codec tags now. |
Hi, just finished doing some additional testing: FFmpeg: unfortunately, can confirm that TS and M2TS containers do not retain Dolby Vision metadata when using FFmpeg. Tested using version tsMuxer: in addition to TS remuxing, I tested also M2TS. Dolby Vision metadata still gets injected (both Profile 5 and 8), but playback on LG CX had some weird behaviour. I remuxed three .m2ts files, one with DV5 metadata and two with DV8 metadata:
Recap and conclusions: LG CX supports DV playback natively via MP4 (confirmed), TS (confirmed), maybe also M2TS (mixed results, needs further testing)...but FFmpeg seems unable to remux into To sum it up, as ideal behaviour Jellyfin should be able to:
I don't know if any of these are viable, but I hope so. Keep up the good work! |
@lgndvd Two of our custom patches are not available in vanilla FFmpeg to support DOVI in MPEG-TS & HLS. You can try the latest test build here (https://github.com/jellyfin/jellyfin-ffmpeg/pull/393/checks -> Artifacts). |
Yes, but we will be checking if the profile is supported later, and we should be safe unless webOS lies about this fact and reports that it plays profile 5 when it does not.
Apple requires all HDR streams in HLS to have an SDR fallback and dolby vision contents should label its profile in the SUPPLEMENTAL-CODECS attribute. We already did the former but not doing the latter yet. I plan to add that in 10.10 some time so that the client will have a better fallback if it really implements the fallback. |
Reinstalling the app fixed it apparently. cc @RohanKrishna500 Not sure, why this was happening. It just seems weird. |
That's good to hear, but I still want to check if |
What I tried to say here was that if the check doesn't work and we resort to the already existing bypass according to the webOS version, I do not know what the content tagged as dvh1 will look like on a TV that doesn't really support Dolby Vision. It might look like Profile 5 on an unsupported display or normal, can't tell or test.
Nice! I will be following that! |
It does not seem to trigger reliably though. It seems sometimes it falls back to transcoding to SDR (saying the dynamic range is not supported), then trying to play the same file again triggers dolby vision correctly. |
Doesn't seem to work sadly. HDR triggers and the stream is tagged as hvc1. |
Tried |
Just keep the bypass checking for now instead of playing with the codec string. |
ah...i get it i thought it as seperate video streams. |
is this the webos app u meant?....also i have this issue where even profile 5 seems to not play in proper colors in the previous jellyfin build whereas other lg users reported it to be fine when remuxed. |
I have a strange issue even with 10.9.8 or 10.9.9: Am I alone with this issue ? |
@megosugit Try disabling fMP4 on the TV. In 10.9.8 (iirc), it was enabled for webOS by default, but it doesn't work well. In 10.9.9 (this PR), it has been disabled, but you need to disable it manually if you saved settings in 10.9.8. |
It is disabled, when enabled it stays black |
I raised a similar issue back in the day. I raised it in #5068. I don't believe there is a solution yet. |
hey are u able to play dolby vision correctly though? |
It triggers the Dolby Vision mode on my TV, but then it freezes randomly, so : no I'm not able play DV files correctly. It is a nightmare to watch a movie like this. I have to exit and resume several times the movie, it is bad |
From my experience: if you start to play the DV movie from scratch it works normally, but then if you try to skip forward then the screen goes black and it is not possible to move further or resume from where you were... you need to start it again from zero.. That's my experience. And when i looked at the server logs from my Jellyfin server it was trying to remux it but somehow it is not working. |
that's what I used to have too, but after a Jellyfin update, I was able to resume so I thought it was fixed. But when I really used it to watch a movie, and not only test a few seconds, I discovered it can resume and play for a few minutes but then it freezes. So in summary, I thought it was fixed but it is still broken. It is better than before though, but still useless to watch a movie without becoming mad. |
your tv model? |
LG 77 G3 |
ig kodi will work fine for you bro try it |
Do I need to go in developer mode to install it? Looks a bit dodgy. I had kodi running on a PC previously, I thought jellyfin would be a smarter choice. |
It didn't work for me but might work for,and yes its completely safe and easy to install,i would prefer jellyfin over kodi because my media are stored in cloud and I mount it to my jellyfin server,for kodi only offline files |
You need to go into developer mode, but it's pretty straightforward and it works well once it's installed. FYI I think that all of these solutions (Kodi nightlies with Dolby Vision compatibility mode, Jellyfin with the fixes discussed here) only work for a subset of all Dolby Vision content. Profile 7 FEL content (some UHD rips) requires special hardware to view the full enhancement layer. I ended up purchasing a Ugoos box and installing CoreElec (Kodi) onto it, and then connecting it to Jellyfin. |
Hi, checking if there has been any fix to this |
I think we have to make some compatibility trade of options if some models do not even play dolby vision in hls properly. We already tried both fmp4 and ts and some TV model does not like that either. For such TV models we might need an extra option so that let the user to agree to only play the fallback layer in the original mkv and give up on dolby vision, or the user needs to remux to mp4 himself. |
yeah but i dont get it why is it like for some models it doesn't work but I have seen some users who have C series can easily play dolby vision files like by a simple remuxing.I guess it might be due to the processor used in some tv models that restricts it or something. |
I created an issue on the 2nd of September in jellyfin-webos, with 0 comment ! :( I believe it is linked to this thread, can someone confirm if you have the same behavior ? LG webos + Dolby Vision =⛔ movie stutters then hangs when resuming or skipping ahead Thanks |
hi can someone tell me why dv p5 in mp4 are not direct played on jellyfin |
Force DoVi profile 8 support for LG TVs (CX etc.) that do support it but report otherwise.
Changes
browserDeviceProfile to force profile 8 support for TVs that support DoVi and run web0s version 5 and up.
Issues
Fixes
jellyfin/jellyfin#11705