Jellyfin Forum
Android TV 0.17 (to many errors. giving up) - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Android TV 0.17 (to many errors. giving up) (/t-android-tv-0-17-to-many-errors-giving-up)

Pages: 1 2 3


RE: Android TV 0.17 (to many errors. giving up) - theguymadmax - 2024-08-29

Thanks, Pirate. I tried narrowing it down further and it looks like the issue is with MP2 audio codec in MP4 containers. I converted a standard Big Buck Bunny file to have MP2 audio stream and encountered the same error message.

If you want to keep your files in an MP4 container, you'll need to transcode the audio to a different codec—AAC, for example. Alternatively, as mentioned in my previous post, you can simply remux your files into an MKV container, where MP2 audio doesn’t cause any issues. In a mkv container, the file is playable because jellyfin correctly transcodes the file:
Code:
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac))

In the mp4 it just remuxes the file and fails:
Code:
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -i path/to/input.mp4 -map 0:v -c:v copy -map 0:a -c:a aac /path/to/output.mp4



RE: Android TV 0.17 (to many errors. giving up) - xaque - 2024-08-29

(2024-08-29, 12:08 AM)SethBacon Wrote: There have been a lot of posts like this, I as well have media that doesn't agree with exoplayer and now wont play on android boxes/firesticks. Ultimately the update to the AndroidTV app seems to have been one step forward two steps back. The common 'solution' offered to remux all your media is pretty ridiculous, especially when that media plays fine on the core app.

Pragmatically, your best option now would be to get a copy of the androidtv client from 10.8, (0.16.10 i believe, still works for me playing media from a 10.9 server), though i know firesticks are harder to load custom apks on these days...


Hit the nail on the head with this post.

The playback rewrite write does look promising, just wish we could have had the option of using libvlc until it was more in a ready state.


RE: Android TV 0.17 (to many errors. giving up) - NeoCortex - 2024-08-29

Thanks to everyone who had taken time to look into this. What a great community!

I will try to transcode the audio in the file with your command:
Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -i path/to/input.mp4 -map 0:v -c:v copy -map 0:a -c:a aac /path/to/output.mp4

Just as information for anyone stumbling upon this, how this file was created.
The Source is a DVD I have. With makemkv i ripped it to my pc and used vlc-mediaplayer to convert it to mp4.
In VLC I just simply used one of the presets that gave me mp4 video with mp3 audio.
I will try to use AAC audio next time.

To be honest I don't know much about codecs, the difference between a codec and a container etc...


RE: Android TV 0.17 (to many errors. giving up) - NeoCortex - 2024-08-29

So transcoding the Audio from mp3 to aac works. The Exoplayer now plays the file just fine on the chromecast with gtv.
But transcoding all of my dvd movies now? Yikes.


RE: Android TV 0.17 (to many errors. giving up) - NeoCortex - 2024-08-29

One more thing: just because I don't understand it.
The problem here is exoplayer not able to handle the used audio codec, right?

Why does it work on my android phone with the jellyfin app when I set the player to "integrated player" (exoplayer)?


RE: Android TV 0.17 (to many errors. giving up) - theguymadmax - 2024-08-29

The issue lies with the MP2 audio codec. Jellyfin relies on FFprobe to identify codecs, but FFprobe has a bug that prevents it from distinguishing between MP3 and MP2 in an MP4 container, which is the root cause of the issue. Since server and client can't make that distinction, this leads to error. MP2 is not a codec required by all devices, your TV might not support it, whereas your phone might.

The Android TV app and the Android app handle things differently. The Android app is essentially a wrapper for the web interface, while the Android TV app is a standalone application, which means their handling of codecs and other issues can differ.

In summary, there are problems with ExoPlayer, the Jellyfin TV app, the server, and ffprobe. I’ll file a bug report and provide a link to it here once it's submitted.

Edit: Issue submitted


RE: Android TV 0.17 (to many errors. giving up) - NeoCortex - 2024-08-29

Quote:ffmpeg never supported mp2 in mp4 container and if you really want those files to be played you need to ask the client to provide an option to remove mp3 support from mp4 container as a whole

I think my english is just not good enough to understand that answer.
ffmpeg never supported mp2 audio in a mp4 file? But like every video-converting-program ever lets me choose "mpeg layer 2 audio". Handbrake, vlc, ...


RE: Android TV 0.17 (to many errors. giving up) - TheDreadPirate - 2024-08-29

(2024-08-29, 07:34 PM)NeoCortex Wrote:
Quote:ffmpeg never supported mp2 in mp4 container and if you really want those files to be played you need to ask the client to provide an option to remove mp3 support from mp4 container as a whole

I think my english is just not good enough to understand that answer.
ffmpeg never supported mp2 audio in a mp4 file? But like every video-converting-program ever lets me choose "mpeg layer 2 audio". Handbrake, vlc, ...

Jellyfin server can't tell the different between MP2 and MP3 audio (ffprobe limitation) when they are in a MP4 container and puts "MP3" as the audio codec when it actuality it is MP2.  The client is told the audio is MP3, the client thinks it is compatible and doesn't ask for a transcode, but it ends up receiving MP2 audio that it can't play.


RE: Android TV 0.17 (to many errors. giving up) - NeoCortex - 2024-08-30

In that case there is still another problem, because im 99% sure that in the testfile I provided I choose mp3 as audio.


RE: Android TV 0.17 (to many errors. giving up) - theguymadmax - 2024-08-30

I'm 100% sure it has an mp2 audio track. You'll need to use another tool like MediaInfo to determine this. The method Jellyfin uses (ffprobe) will report mp3 and that's the root of the issue.