jellyfin-roku icon indicating copy to clipboard operation
jellyfin-roku copied to clipboard

[10.8.0-1.4.13 Regression] Alternative audio tracks no longer played

Open jcdick1 opened this issue 2 years ago • 10 comments

Describe the bug Using "Options" on a movie title with multiple audio tracks, selecting a non-default audio track isn't acknowledged. The default is played.

To Reproduce

  1. Select a movie title with multiple audio tracks
  2. Navigate to and select "Options" then "Audio"
  3. Select an audio track other than the default
  4. Back out and play the movie
  5. The track played is still the default

Expected behavior The alternate audio track should play

Logs

JF log entry for attempting playback on a movie with two audio tracks, keeping the default audio track selected:

[2022-06-13 11:27:42.062 -05:00] [INF] StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/mnt/media/video/movies/fun_movie.mkv", AudioStreamIndex=2, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 )

JF log entry for attempting playback on the same movie, selecting the second track:

[2022-06-13 11:18:54.916 -05:00] [INF] StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/mnt/media/video/movies/fun_movie.mkv", AudioStreamIndex=3, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 )

Note that it is setting "AudioStreamIndex" as "2" for the default track, and "3" for the alternate track. There are only two tracks. Honestly, don't know if this is related, but it seems like it would be 0 and 1 or 1 and 2.

Additional context

Since 10.8.0 dropped fairly quickly after the Roku 1.4.13 release, I didn't have occasion to view any of my content containing alternative audio tracks between those two releases. I don't know if this is a 10.8.0 compatibility issue, or if it is something that changed with all of the additions to 1.4.13 itself.

Update: I have found some that do work. Those that do have their tracks identified as above, for AudioStreamIndex, as 1 or 2, depending on default or alternate audio. However, all files are encoded the same, with the same software. I can't figure out why it would now be identifying files as having audio stream 2 and 3. But its only on the Roku that I have an issue with playback.

jcdick1 avatar Jun 13 '22 16:06 jcdick1

I have tested this an cannot get the same issue. Is this still happening?

candry7731 avatar Jun 16 '22 15:06 candry7731

Yes, it definitely is still happening. Oddly, on my Firestick 4K, the logged "StreamBuilder" line in the log when playing back this same title and second audio track is:

[2022-06-16 10:54:49.160 -05:00] [INF] StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="/mnt/media/video/movies/fun_movie.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 )

Note the "AudioStreamIndex" being "Null" instead of "3".

jcdick1 avatar Jun 16 '22 15:06 jcdick1

hmm, I would assume this is a server issue and not a roku specific issue....

Does the firestick also not play the second audio track?

candry7731 avatar Jun 16 '22 20:06 candry7731

The Roku client is the only one that doesn't. Web, JMP, Android TV (Firestick) all play the second audio track.

jcdick1 avatar Jun 16 '22 20:06 jcdick1

How many other audio files do you have to choose from when it fails?

On Thu, Jun 16, 2022, 3:54 PM jcdick1 @.***> wrote:

The Roku client is the only one that doesn't. Web, JMP, Android TV (Firestick) all play the second audio track.

— Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-roku/issues/657#issuecomment-1158119464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT6PDRGKJ5DYZWCDCKO5J2DVPOH67ANCNFSM5YU2LG5A . You are receiving this because you commented.Message ID: @.***>

candry7731 avatar Jun 16 '22 21:06 candry7731

There's just the two audio tracks in each of these media files. They're movies that I've muxed in an audio track I mixed RiffTrax jokes into. So a 5.1 track (standard audio) and a 5.1+RiffTrax (alternate audio track). I can ffprobe one that works and one that doesn't, if you think that would help. The mediainfo output is exactly the same, though.

jcdick1 avatar Jun 16 '22 22:06 jcdick1

Hmm, I'm not sure.... We get the index of the audio file in the list and that's what we use to grab the file.... if the ffprobe fails on one track I would think there is a track problem but then you said you can play in all the other clients.... What is the file format for both audio files? Can you share the files with me?

On Thu, Jun 16, 2022 at 5:26 PM jcdick1 @.***> wrote:

There's just the two audio tracks in each of these media. They're movies that I've muxed in an audio track I mixed RiffTrax jokes into. I can ffprobe one that works and one that doesn't, if you think that would help. The mediainfo output is exactly the same, though.

— Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-roku/issues/657#issuecomment-1158190996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT6PDRE5KJZPAXAEC3VGDZDVPOSYDANCNFSM5YU2LG5A . You are receiving this because you commented.Message ID: @.***>

-- Chris Andry

462 Browning Loop Mandeville LA 70448 504-617-2924

candry7731 avatar Jun 16 '22 22:06 candry7731

They are VP9 video w/ 2 opus tracks ... the RiffTrax audio is mixed in Audacity and the output muxed with MKVToolNix after the main video and original audio are transcoded.

Here's ffprobe output from one of the problematic ones:

    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc
    Metadata:
      ENCODER         : Lavc58.54.100 libvpx-vp9
      BPS             : 2998114
      DURATION        : 01:44:20.296000000
      NUMBER_OF_FRAMES: 150097
      NUMBER_OF_BYTES : 2346135605
      SOURCE_ID       : 001011
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-06-13 19:39:06
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: opus, 48000 Hz, 5.1, fltp
    Metadata:
      title           : Surround 5.1
      ENCODER         : Lavc58.54.100 libopus
      BPS             : 258574
      DURATION        : 01:44:20.305000000
      NUMBER_OF_FRAMES: 313016
      NUMBER_OF_BYTES : 202344084
      SOURCE_ID       : 001100
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-06-13 19:39:06
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(eng): Audio: opus, 48000 Hz, 5.1, fltp
    Metadata:
      title           : RiffTrax
      ALBUM           : X-Men
      GENRE           : Vocal
      ENCODER         : Lavf55.33.100
      BPS             : 158861
      DURATION        : 01:44:20.306000000
      NUMBER_OF_FRAMES: 313016
      NUMBER_OF_BYTES : 124315246
      _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2022-06-13 19:39:06
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Here's ffprobe from one that isn't an issue:

Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc
  Metadata:
    ENCODER         : Lavc58.54.100 libvpx-vp9
    BPS             : 2999446
    DURATION        : 01:42:37.193000000
    NUMBER_OF_FRAMES: 147625
    NUMBER_OF_BYTES : 2308521585
    SOURCE_ID       : 001011
    _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2022-06-04 04:31:39
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp
  Metadata:
    title           : Mono
    ENCODER         : Lavc58.54.100 libopus
    BPS             : 191972
    DURATION        : 01:42:38.161000000
    NUMBER_OF_FRAMES: 307909
    NUMBER_OF_BYTES : 147774675
    SOURCE_ID       : 001100
    _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2022-06-04 04:31:39
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: opus, 48000 Hz, mono, fltp
  Metadata:
    title           : RiffTrax
    ALBUM           : Casablanca
    GENRE           : Vocal
    ENCODER         : Lavf55.33.100
    BPS             : 199473
    DURATION        : 01:43:01.696000000
    NUMBER_OF_FRAMES: 309085
    NUMBER_OF_BYTES : 154135256
    _STATISTICS_WRITING_APP: mkvmerge v66.0.0 ('Josie') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2022-06-04 04:31:39
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

To me, they look the same, but the StreamBuilder log entries shows the first one trying AudioStream=3, whereas the second one uses AudioStream=2, which would make sense.

It may well be something server side, as I added the problematic ones following the 10.8.0 upgrade, but I don't know what they may have changed in terms of how the server handles parsing tracks or building streams based on clients' profiles or whatever that would make it work for video files added prior to 10.8.0 but not after.

jcdick1 avatar Jun 16 '22 23:06 jcdick1

I have the exact same issue with my Firestik 4K and 10.8.1, I can't switch between audio languages, the first audio keeps playing

fsecond3bis avatar Jul 16 '22 09:07 fsecond3bis

I believe this is a server bug: https://github.com/jellyfin/jellyfin/issues/7896

jimdogx avatar Jul 17 '22 22:07 jimdogx

I can not recreate this issue using latest server and roku client versions. Closing for now, please open a new ticket and ref this on if issue remains.

1hitsong avatar Jan 13 '24 02:01 1hitsong