jellyfin / jellyfin-androidtv

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

Issues w/ image-based subtitles and/or audio downmixing #4193

Open kmescher opened 3 days ago

kmescher commented 3 days ago

Describe the bug

If these are duplicate issues, please point me in that direction; I haven't found anything (current) that matches what I'm seeing.

To start off with, all my video files are rips directly off my physical media. I do very little (or no) conversion. So with audio tracks, they are the same as on the media (format & number of channels). Same with subtitle tracks.

This means that for an average DVD Rip, I will have either an AC3 or a DTS audio track, and a VOBSUB subtitle track. For a Blu-Ray rip, audio tracks are far more varied (add TrueHD, DTSHD-MA, etc), and PGS subtitle tracks.

I store everything in MKV (most versatile).

I see no need to transcode at this point; I believe the player should be able to handle this (somewhat basic) set of tracks. And as my server is running on a Pi, transcoding is a bit troublesome anyway.

When I attempt to play a DVD rip, I receive an reason of "SubtitleCodec not supported in the log" when trying to direct play. The actual playback just sits at a black screen (no error popups).

The profile says that dvdsub is supported. Is there something I need to do to indicate that the VOBSUB's are actually dvdsubs, or is the player lying about its capabilities? Does Exoplayer even support vobsub's?

When I attempt to play a BluRay rip, I don't receive any errors or reasons why it can't DirectPlay, but the playback (just as above) just sits at a black screen.

I've seen various posts over the past few years stating that image-based subtitle formats aren't supported, then are supported, but there's no clear documentation (like on the Jellyfin web site) if they truly a) are supported by the AndroidTV ExoPlayer, and b) are reasonably expected to work correctly. Some clarity would be helpful here for people who just want to archive their own media libraries.

Now to an audio question:

I select "downmix to stereo" as I don't have a surround setup at the moment. I would have expected that option to instruct the player to do the downmixing. Evidently, that option seems to force the player to only allow 2 channels streams to directplay; anything with more channels (like all of my library) refuse to directplay. Not surprisingly, I get an error of AudioCodecNotSupported, and because the number of channels is greater than 2.

My question is this: Does ExoPlayer support a stereo downmix locally, or does it rely on the server to accomplish this? If it relies on the server, it would probably be a good idea to change the option text to reflect this (Like "Request server downmix to stereo"). The current text implies (to me) that the player will be doing it on its own (which would then mean that it doesn't care what codec it's sent, and should be able to directPlay).

I read that the libVLC option was removed a few versions ago (the reasons given weren't very descriptive). I was a bit dismayed, as this worked beautifully (aside from some sync timings which I was able to correct easily enough). I would have assumed it would have stayed an option until ExoPlayer could at least match its capabilities. This does not seem to be the case. I now have to use VLC as an external player, as it works very well (aside from saved subtitle language, no resume support, and it constantly asking if I should mark the video as watched). While VLC is a terrific player, using it seems like an unfortunate hack, and wouldn't you want to support & present the most capable player as the default? ExoPlayer seems unusually limited for even the most straightforward case (playing physical media rips), and there's not a lot of official documentation on how to actually support this. It's a good thing I explore the options.

Logs

For a DVD Rip using ExoPlayer w/ downmix option turned on:

[DBG] DirectPlay Result for Profile: "AndroidTV-ExoPlayer", Path: "/media/movies/movies/The_Abyss/The_Abyss.mkv", PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: 2, Reasons: AudioCodecNotSupported, SubtitleCodecNotSupported

For a DVD Rip using ExoPlayer w/ downmix option turned off:

[DBG] DirectPlay Result for Profile: "AndroidTV-ExoPlayer", Path: "/media/movies/movies/The_Abyss/The_Abyss.mkv", PlayMethod: null, AudioStreamIndex: 1, SubtitleStreamIndex: 2, Reasons: SubtitleCodecNotSupported

For a BluRay rip using ExoPlayer w/ downmix option turned off:

[DBG] DirectPlay Result for Profile: "AndroidTV-ExoPlayer", Path: "/media/movies/movies/Apollo 13/Apollo 13.mkv", PlayMethod: DirectPlay, AudioStreamIndex: 1, SubtitleStreamIndex: 4, Reasons: 0

FFmpeg logs

Media info of the file

Application version

0.17.9

Device information

Tivo Steam 4K

Android version

Android 10 (I think)

Jellyfin server version

10.10

nielsvanvelzen commented 3 days ago

Did you try with the 0.18 beta?

rickysixx commented 2 days ago

ExoPlayer should be able to play surround audio tracks also on non-surround audio hardware without the need of audio transcoding on the server. You should not need to turn on "Downmix to stereo". If your TV does not support DTS/Dolby True HD, you can try to update the app to 0.18 beta and enable "Prefer FFmpeg for audio decoding" option under Developer settings.

If you are direct playing the media and your TV supports PGS subtitles, they should work fine with ExoPlayer. If instead you have "Downmix to stereo" enabled, and therefore transcoding audio, they will not be shown unless you also transcode the video to burn them in. I don't know about VOBSUB subtitles, but I think they need to be burned-in too (if unsupported by the device) since they also are picture-based.

If your TV does not support PGS/VOBSUB subtitles and you want to avoid video transcoding to burn them in (which can be very hardware-demanding for blu-ray/4K rips and will cause quality loss), you may consider using SubtitleEdit (or similar tools) to convert your PGS/VOBSUB subtitle track to SRT format.