Jellyfin Forum
Several files erroring out when direct playing to nvidia shield pro - 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: Several files erroring out when direct playing to nvidia shield pro (/t-several-files-erroring-out-when-direct-playing-to-nvidia-shield-pro)

Pages: 1 2


Several files erroring out when direct playing to nvidia shield pro - YoAdrian - 2025-01-02


.txt   jflog.txt (Size: 22.23 KB / Downloads: 8)

Attached log. I have 4 movies that all fail. Here is a log of me trying to watch john wick 2 and the audio is stuttering and echo-y. Picture looks fine. Also I then tried to watch Ready Player One. At exactly 3:50 seconds it encounters errors, video buffers or pauses, it tries to restart, makes a little progress then says too many errors, giving up. This happens every time. Very repeatable. I have about 30 movies that all work, same format as these two. Client is nvidia shield pro hardwired to ethernet 200mbps down. JF server is a Dell OptiPlex Tower Intel i7 8th Gen 32GB RAM 2TB HD 512GB M.2 SSD latest version of ubuntu also hardwired to ethernet. Completely lost as to how to debug this. I have only been using JF for 2 months and this is the first issue I have run into.


RE: Several files erroring out when direct playing to nvidia shield pro - theguymadmax - 2025-01-03

Post the ffmpeg logs.


RE: Several files erroring out when direct playing to nvidia shield pro - YoAdrian - 2025-01-03

(2025-01-03, 12:19 AM)theguymadmax Wrote: Post the ffmpeg logs.
Attached I believe.


RE: Several files erroring out when direct playing to nvidia shield pro - YoAdrian - 2025-01-03

More info after playing around with it last night. It seems to be related to the shield. These same failed movies play fine on a gen2 chromecast. They also play fine on a phone and laptop. I am not sure what is going on.


RE: Several files erroring out when direct playing to nvidia shield pro - TheDreadPirate - 2025-01-03

The Gen 2 Chromecast is probably receiving transcoded video. The Shield is getting the original Dolby Vision profile 8 video.

Exoplayer has a bunch of issues regarding DV 8. Your options are to force transcoding on the Shield, by lowering the max bit rate during playback, or by converting the video to HDR10 (I have a guide for this in the walkthrough sub-forum).

Unless @theguymadmax has any other suggestions.


RE: Several files erroring out when direct playing to nvidia shield pro - theguymadmax - 2025-01-03

It seems that the file is initially attempted to play directly, but after a short time, an error occurs. This causes the system to fall back to transcoding the file, which then fails.

I experience the same issue when using ExoPlayer clients, such as the Jellyfin for ATV client, with 7.1 FLAC audio. I often see the following error in the debug logs:

Code:
Audio codec error
  androidx.media3.decoder.DecoderInputBuffer$InsufficientCapacityException: Buffer too small (32768 < 35493)
      at androidx.media3.decoder.DecoderInputBuffer.createReplacementByteBuffer(DecoderInputBuffer.java:244)
      at androidx.media3.decoder.DecoderInputBuffer.ensureSpaceForWrite(DecoderInputBuffer.java:195)
      at androidx.media3.exoplayer.source.SampleDataQueue.readSampleData(SampleDataQueue.java:292)
      at androidx.media3.exoplayer.source.SampleDataQueue.readToBuffer(SampleDataQueue.java:130)
      at androidx.media3.exoplayer.source.SampleQueue.read(SampleQueue.java:440)
      at androidx.media3.exoplayer.source.ProgressiveMediaPeriod.readData(ProgressiveMediaPeriod.java:539)
      at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$SampleStreamImpl.readData(ProgressiveMediaPeriod.java:1025)
      at androidx.media3.exoplayer.BaseRenderer.readSource(BaseRenderer.java:557)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1357)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:877)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1138)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:562)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:223)
      at android.os.HandlerThread.run(HandlerThread.java:67)
 
As a workaround, I have to enable "Prefer FFMpeg for audio playback" in the Developer options on the Android TV client.

Edit: I found the same issue here. Unfortunately, there was no solution provided, only the workaround I mentioned.


RE: Several files erroring out when direct playing to nvidia shield pro - YoAdrian - 2025-01-03

(2025-01-03, 03:21 PM)theguymadmax Wrote: It seems that the file is initially attempted to play directly, but after a short time, an error occurs. This causes the system to fall back to transcoding the file, which then fails.

I experience the same issue when using ExoPlayer clients, such as the Jellyfin for ATV client, with 7.1 FLAC audio. I often see the following error in the debug logs:
 
As a workaround, I have to enable "Prefer FFMpeg for audio playback" in the Developer options on the Android TV client.

Edit: I found the same issue here. Unfortunately, there was no solution provided, only the workaround I mentioned.

I can confirm changing that option in the developer options on the shield fixed the issue. All problem videos seem to play just fine. What are the downsides to this fix? I assume the sound track quality is worse and you lose features like surround sound?


RE: Several files erroring out when direct playing to nvidia shield pro - bitmap - 2025-01-03

Okay, so it's maybe not a workaround for everything, but I wonder why 7.1 audio just doesn't seem to work and won't transcode. When encoding, you can use the audio filter aformat to indicate a variety of channel layouts, which resolves issues with 7.1 audio causing errors.

Code:
-filter:a aformat=channel_layouts="7.1|5.1|stereo"

Is this a feasible solution to add into jellyfin-ffmpeg to resolve the issue as well? I'm not sure what the channel_layout indicator is for mono, but I would assume it's likely "mono" which should cover nearly all use cases.


RE: Several files erroring out when direct playing to nvidia shield pro - YoAdrian - 2025-01-06

Does anyone know if this is on the roadmap to be fixed? And can anyone explain the downside of checking off this feature? Trying to understand this stuff.


RE: Several files erroring out when direct playing to nvidia shield pro - theguymadmax - 2025-01-06

There’s no roadmap to this being fixed as there is no open issue. You can open up a new issue on the Jellyfin AndroidTV github here or comment on the original closed issue. However, I believe the problem lies upstream with AndroidX Media3 (ExoPlayer), which is the underlying player used by AndroidTV.

Using the FFmpeg renderer bypasses the Media3 codec implementation, which uses platform decoders. While FFmpeg can deliver surround sound, it gets converted to PCM. It’s best to use FFmpeg only for compatibility issues like this.

FLAC 7.1 is an uncommon audio format for movies, and I would recommend avoiding encoding your media to FLAC 7.1. Instead, consider converting your media to EAC3 or AAC.