Open nicostrebel opened 2 months ago
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Stream #0:1 -> #0:1 (dts (dca) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[libfdk_aac @ 0x5cee76c879c0] Note, the VBR setting is unsupported and only works with some parameter combinations
libva info: VA-API version 1.22.0
Device Audio decoding
Dolby® Digital/ Dolby® Digital Plus*, MPEG-1 layer1/2
All this information is saying that your device doesn't support DTS and has to transcode to AAC but there is an issue with libfdk_aac encoder. I could be wrong to think that this isn't an app error.
Im not sure if this is really the error as this seems to be just an info and not an error. This would also not explain why playback is possible in the browser version with the same device vor with any external player. There is only a issue with the internal player.
I have tested a bit more and saw that the workaround to use the 'downmix to stereo' setting is not working a 100%. It plays well initialy but as soon as i try to play Form the middle and not from the beginning of the movie the playback will stop. There is no error but it will stay with a black screen and paused. Changing audio channel does also not work then. The only thing to make it work again is to select subtitle, which will get burned in and then the playback works again and i can also freely choose audio channel again. Something is really weird.
After I posted that command, I forgot to take that part out. Burning the subtitles in with make the server transcode the video and in this case audio as well.
Doesn't downmix to stereo transcode? The issue is ether transcoding or playback. It's also hard to tell without logs from android via logcat.
It's always best to have an audio track with 2 channels as not all devices support 5.1.
ffmpeg -vaapi_device /dev/dri/renderD128 -i x.DTS.DL.1080p.BluRay.x264.mkv \
-map 0 \
-c:v h264_vaapi -vf 'format=nv12,hwupload' \
-c:a:0 aac -b:a:0 192k \
-c:a:1 copy \
-metadata:s:a:0 language=eng \
x.DTS.DL.1080p.BluRay.x264_1.mkv
This adds 2 channel AAC audio.
Will try to add stereo track with your example in future, thank you. However, for the large library of movies i dont really have the time to do it for every movie already uploaded to jellyfin. I somehow need a workaround/fix for the existing movies. Is there another way to get the logs from android as it doesnt get uploaded? Or is there a guide which helps finding a solution to make uploading logs to work? - Right now it seems like the internal player or the app has problems to communicate that it needs a transcode.
There is handbrake or you can use for f in
command to do that in bulk in on linux.
This guide may help with the logging part https://gist.github.com/nielsvanvelzen/96fd588194729d6845f2d5e414cffb8d
Also this could be part of https://github.com/jellyfin/jellyfin-androidtv/issues/3868
@VampiricAlien What's the point of using Jellyfin if one has to manually re-encode their whole media library?
Since this problem affects only the Android TV client, the solution should be to improve codec support detection in the app. Instead, to me it seems that what the Jellyfin app does now is adding DTS in the direct play profile without checking if that codec is supported by the device.
@rickysixx you have misunderstood this. No one has said to re-encode the media library, I added more information to my other answer. The suggestion to encode a 2 channel audio track since the device does not support DTS and will always transcode.
the solution should be to improve codec support detection in the app.
The app is undergoing a playback rewrite and this will end up happen unless you would like to add better codec detection to the app?
Your suggestion is indeed a good one. My point was that the Jellyfin app should not expect the user to have done this by themselves. It should automatically ask the server to transcode the audio if it finds that DTS is not supported by the device, like it did in 0.16.11.
The app is undergoing a playback rewrite and this will end up happen
Nice to hear that's being worked on. I assumed this was the expected behaviour, since in 0.17.x the preference to enable/disable DTS output was removed (I'm aware this was because that preference did nothing, but I expected it to be fixed to actually do something instead of being removed altogether).
Reading through this, I'm not sure I understand. I have the same issue and opened my own (incorrectly apparently) issue. Simply put I have DTS content, DTS shows as enabled format in my google TV settings, my amp supports DTS, and it all worked prior to the 17 update. Reading this makes it sounds like it doesn't work because it's not supported by the hardware. However I firmly believe a bug or regression was introduced in the 17 update somewhere. I don't have enough knowledge here to prove it, but would be glad to provide anything that might help bring back DTS support.
+1 on this. Playing DTS:X DTS-MA encoded file results in playback error rather than a transcode to a supported format.
Exactly the same issue for me here on Fire stick 4k's (1st & 2nd Gen). Originally worked on 0.16.x, but now crashes on 0.17.3 unless I set "Downmix to Stereo"
I found a workaround. It's not pretty but does restore the ability to utilize DTS if your equipment supports it. I won't go into details here, but using Kodi as an external player with pass-through enabled in Kodi I am now able to play DTS content without error and DTS is properly passed through to my AV receiver. Not idea but it works ok, I don't care for the Kodi player much.
This is more proof that DTS in the Jellyfin client is broken somehow as other apps are able to pass the audio through without issue. I still strongly believe that down mixing/transcoding is not the solution here.
Correct me if I'm wrong, but isn't it possible to decode to lossless PCM instead of transcoding to lossy AAC? I have nvidia shield -> LG TV -> eARC -> receiver, but the LG TV doesn't support DTS. So usually I try to get the shield to pass through PCM if I'm playing DTS content. (In shield settings I manually uncheck DTS formats, and also disable dolby audio processing.)
Describe the bug
Every movie which comes with DTS audio fails to play. As soon as i want to play the movie, the player will exit and a notification informing me of a player error and re-trying is popping up. The notification will pop up twice and then another notification informing me of too many errors. I only have movies with surround (at least 5.1) so i could not test it with stereo.
When i go to my admin dashboard there is no error log uploaded. This bug is only on the android tv version. The android app for phones works without any issue. Opening the browser on the same tv device and using the jellyfin web version also works without any issues. That indicates there must be an error with the android tv version for jellyfin itself.
I also tried on other tv devices on different andorid boxes with some friends and all encounter the same bug. If i use external player (mx player pro) there is no error and playback is working perfectly. If i disable audio direct stream and change to downmix to stereo this bug does not appear anymore and plackback is working perfectly.
In prior version of this app i just changed player to libvlc to not have this problem. This is no longer possible as libvlc got removed.
Logs
No response
FFmpeg logs
Media info of the file
Application version
0.17.3
Device information
Strong LEAP-S1
Android version
Android 12
Jellyfin server version
10.9.9