jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
442 stars 135 forks source link

Audio track selection doesn't play proper track #500

Closed jcdick1 closed 2 years ago

jcdick1 commented 2 years ago

Describe the bug Movies with multiple audio tracks play default track despite selecting alternate audio track

To Reproduce

  1. Select movie with multiple audio tracks
  2. Move highlight to "Audio" selector
  3. Select alternate track from list
  4. Press "back" button to get back to main item page
  5. Select "Play"
  6. Audio will be whatever is default, not what was chosen

Expected behavior Audio track played should be what was selected

Additional context I have several movies with three audio tracks. A 5.1 track, a stereo track, and a stereo track with "Rifftrax" mixed in. When I select the third track to have the Rifftrax jokes, I get the default 5.1 track.

I'm not sure if this is a result of the new 10.5 RokuOS update.

N0ami commented 2 years ago

Just want to tell that I have the exact same problem. I only have this problem with my Roku TV though. When I watch the movie on my PC via my media player or directly via the Jellyfin server I have no problem selecting the right audio track without issue. I even have a 2nd TV (with a Roku stick because this TV is old and not "smart") and it is working without problem. There is surely some problem in 5.1 VS 2.0 track on the same movie that the Roku app can't process correctly. I have several movies with this problem.

When I try to switch the audio before starting the movie, I can see the 3 audio track as stated by the OP but if I want to change the audio during playback via the * option, I only see 2 track instead of 3. One track is not processing correctly.

Using server version 10.7.7 and Roku Jelly app version 1.4.9

NovaCyntax commented 2 years ago

Installed Jellyfin for a friend tonight, and set him up with the Roku app on his TV. Can confirm that audio tracks will not change

Cubevoid commented 2 years ago

Can confirm, I have the same issue. I even tried changing the default audio language in Jellyfin web, and even though on the audio selection page the correct language was selected (Japanese), it still played English (default for the mkv file) whenever I tried playing the movie.

Using the latest Jellyfin beta at time of writing this comment.

neilsb commented 2 years ago

I've been unable to replicate this as yet. Either when transcoding or direct playing, audio track selected before starting playback is used.

If you've got this problem, could you start by letting me know what Roku device is being used? From a couple of the reports, it looks like Roku TV (TCL?) that is having the problem. Is anyone having the problem who is not using a Roku TV and is using a connected Roku device?

jcdick1 commented 2 years ago

If you've got this problem, could you start by letting me know what Roku device is being used? From a couple of the reports, it looks like Roku TV (TCL?) that is having the problem. Is anyone having the problem who is not using a Roku TV and is using a connected Roku device?

I'm using a Roku Ultra 4660X2. Using the desktop Jellyfin Media Player client, I get the third track just fine. If someone knows what to look for in the JF logs, I'll start a playback with my third audio track and submit logs that might show what's going on. The files can be direct played fine, so there's no ffmpeg logs to look at in my case.

N0ami commented 2 years ago

I've been unable to replicate this as yet. Either when transcoding or direct playing, audio track selected before starting playback is used.

If you've got this problem, could you start by letting me know what Roku device is being used? From a couple of the reports, it looks like Roku TV (TCL?) that is having the problem. Is anyone having the problem who is not using a Roku TV and is using a connected Roku device?

For me, I do have a 32'' TCL Roku TV... Am I fucked or is there something I can do?

neilsb commented 2 years ago

@N0ami Since it's confirmed on another device I don't think it's Roku TV specific. Either way, I'm sure we can find a fix for it.

@jcdick1 If possible, could you run ffprobe against one of the files that you have this problem with? The stream info for each of the streams (i.e. lines starting Stream # is what would be good, and I can try and craft a file to reproduce the problem.

Cubevoid commented 2 years ago

I have the same issue on a Hisense Roku TV (C235X) so it seems like it's not limited to TCL.

NovaCyntax commented 2 years ago

My friend says he's using a Roku stick, not the more powerful 4k version however. I don't know the exact model.

TKwSni commented 2 years ago

I think this happened after a jellyfin update, because it was working for me before...

AlimFreight commented 2 years ago

I think this happened after a jellyfin update, because it was working for me before...

The same here. Hisense Roku TV. Any progress on that issue?

neilsb commented 2 years ago

I'm still not able to replicate this locally. If someone could run ffprobe on one of the media files that you can reproduce this issue with then I can try and craft a file to test with.

jcdick1 commented 2 years ago

@neilsb Does the JF installation also install ffprobe to go with its ffmpeg? I'm hesitant to install the ffmpeg tools from the Ubuntu repo because the dependency list is astronomical, including installing GUI-related stuff, and my JF server is a headless VM. Or perhaps output from the mediainfo tool would work?

neilsb commented 2 years ago

@jcdick1 It should be installed as part of the jellyfin-ffmpeg, which is the only reason I suggested it (thought it would be easy)

Really just looking to get detailed information about the audio streams in use to I can construct a file with the similar streams to see if that allows replicating the problem.

jcdick1 commented 2 years ago

@neilsb

/usr/lib/jellyfin-ffmpeg/ffprobe ./harry_potter_and_the_philosopher\'s_stone_\(2001\).mkv
ffprobe version 4.3.1-Jellyfin Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-libfontconfig --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvenc --enable-nvdec --enable-ffnvcodec
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[matroska,webm @ 0x561a94ba8580] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from './harry_potter_and_the_philosopher's_stone_(2001).mkv':
  Metadata:
    CREATION_TIME   : 2018-04-01T16:38:55Z
    ENCODER         : Lavf57.7.2
  Duration: 02:32:21.70, start: 0.000000, bitrate: 7064 kb/s
    Chapter #0:0: start 0.000000, end 245.120000
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 245.120000, end 491.116000
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 491.116000, end 737.278000
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 737.278000, end 1105.146000
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 1105.146000, end 1303.594000
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 1303.594000, end 1481.647000
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 1481.647000, end 1729.394000
    Metadata:
      title           : Chapter 7
    Chapter #0:7: start 1729.394000, end 1864.946000
    Metadata:
      title           : Chapter 8
    Chapter #0:8: start 1864.946000, end 2045.502000
    Metadata:
      title           : Chapter 9
    Chapter #0:9: start 2045.502000, end 2269.559000
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 2269.559000, end 2489.404000
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 2489.404000, end 2773.187000
    Metadata:
      title           : Chapter 12
    Chapter #0:12: start 2773.187000, end 3029.026000
    Metadata:
      title           : Chapter 13
    Chapter #0:13: start 3029.026000, end 3303.967000
    Metadata:
      title           : Chapter 14
    Chapter #0:14: start 3303.967000, end 3655.569000
    Metadata:
      title           : Chapter 15
    Chapter #0:15: start 3655.569000, end 3823.737000
    Metadata:
      title           : Chapter 16
    Chapter #0:16: start 3823.737000, end 4067.981000
    Metadata:
      title           : Chapter 17
    Chapter #0:17: start 4067.981000, end 4429.091000
    Metadata:
      title           : Chapter 18
    Chapter #0:18: start 4429.091000, end 4817.980000
    Metadata:
      title           : Chapter 19
    Chapter #0:19: start 4817.980000, end 5034.446000
    Metadata:
      title           : Chapter 20
    Chapter #0:20: start 5034.446000, end 5312.390000
    Metadata:
      title           : Chapter 21
    Chapter #0:21: start 5312.390000, end 5502.163000
    Metadata:
      title           : Chapter 22
    Chapter #0:22: start 5502.163000, end 5802.588000
    Metadata:
      title           : Chapter 23
    Chapter #0:23: start 5802.588000, end 6154.732000
    Metadata:
      title           : Chapter 24
    Chapter #0:24: start 6154.732000, end 6544.788000
    Metadata:
      title           : Chapter 25
    Chapter #0:25: start 6544.788000, end 6801.378000
    Metadata:
      title           : Chapter 26
    Chapter #0:26: start 6801.378000, end 7089.499000
    Metadata:
      title           : Chapter 27
    Chapter #0:27: start 7089.499000, end 7424.709000
    Metadata:
      title           : Chapter 28
    Chapter #0:28: start 7424.709000, end 7616.067000
    Metadata:
      title           : Chapter 29
    Chapter #0:29: start 7616.067000, end 7855.139000
    Metadata:
      title           : Chapter 30
    Chapter #0:30: start 7855.139000, end 8058.717000
    Metadata:
      title           : Chapter 31
    Chapter #0:31: start 8058.717000, end 8249.533000
    Metadata:
      title           : Chapter 32
    Chapter #0:32: start 8249.533000, end 8504.621000
    Metadata:
      title           : Chapter 33
    Chapter #0:33: start 8504.621000, end 8650.475000
    Metadata:
      title           : Chapter 34
    Chapter #0:34: start 8650.475000, end 9141.633000
    Metadata:
      title           : Chapter 35
    Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x796 [SAR 1:1 DAR 480:199], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      BPS-eng         : 6122750
      DURATION-eng    : 02:32:21.675000000
      NUMBER_OF_FRAMES-eng: 219181
      NUMBER_OF_BYTES-eng: 6996524652
      _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-07 19:18:23
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      title           : Surround
      BPS-eng         : 384178
      DURATION-eng    : 02:32:21.674000000
      NUMBER_OF_FRAMES-eng: 428516
      NUMBER_OF_BYTES-eng: 439004758
      _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-07 19:18:23
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Metadata:
      title           : Stereo
      BPS-eng         : 160253
      DURATION-eng    : 02:32:21.674000000
      NUMBER_OF_FRAMES-eng: 428516
      NUMBER_OF_BYTES-eng: 183123078
      _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-07 19:18:23
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 384 kb/s
    Metadata:
      title           : RiffTrax
      BPS-eng         : 384000
      DURATION-eng    : 02:32:21.696000000
      NUMBER_OF_FRAMES-eng: 285678
      NUMBER_OF_BYTES-eng: 438801408
      _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-07 19:18:23
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 21872
      DURATION-eng    : 02:30:57.507000000
      NUMBER_OF_FRAMES-eng: 2454
      NUMBER_OF_BYTES-eng: 24763866
      _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-07 19:18:23
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
jcdick1 commented 2 years ago

Am I correct in assuming that under "options" during playback, and selecting "Accessibility & Captions" in the menu shows the audio track that's currently playing? If so, this isn't resolved for me with 1.4.11.

Here is my audio selection:

PXL_20220113_042004106

And here is what is subsequently displayed under "Options" during playback:

PXL_20220113_042128682

And I don't hear the expected audio, but rather the original soundtrack, minus the Rifftrax addition to the track.

Playing on browser, JMP or Android (Firestick) doesn't present the issue.

anthonylavado commented 2 years ago

If I'm not mistaken, the options menu listing "Default" is intended at this time. The server doesn't send a "playlist" of what's available, but rather the app requests the video and selected audio track from the server. That's why we get you to choose before playback, rather than when it starts. The web interface (which is also part of JMP) handles it differently, which is why they show the name of the track.

As far as not getting the right audio, is it the correct track but you're not hearing part of it, or is it the wrong track (e.g. you chose Rifftrax, but you are getting track 2 "Stereo")?

neilsb commented 2 years ago

If the media is Transcoding, then only the transcoded audio track is sent to the client, so the inbuilt Roku menu will only show a single track (Default, as in your screenshot).

If the title is Direct Playing, the server will list all compatible audio streams in the sidebar menu, and you can generally switch between them.

The Jellyfin Audio menu (which you get by pressing down during playback) should show all audio tracks, and selecting from that should change to the appropriate track.

I'll take another look at this one.

jcdick1 commented 2 years ago

@anthonylavado

As far as not getting the right audio, is it the correct track but you're not hearing part of it, or is it the wrong track (e.g. you chose Rifftrax, but you are getting track 2 "Stereo")?

It is direct playing the audio.

To get the track, I pulled the stereo track out, mixed in the "Rifftrax" audio in another tool, exported it from there as a stereo track again (with the movie and jokes together), then remuxed - I think that's the term - it as the third audio track. It seems to only play track 1 (or is it track 0?) - the surround track.

@neilsb

On my 1.4.11, pressing down during playback gives me the subtitle selection, nothing for audio.

It sure would help if the JF server logs could show what tracks in a file are being played when it logs the begin of playback of a title.

neilsb commented 2 years ago

On my 1.4.11, pressing down during playback gives me the subtitle selection, nothing for audio.

Sorry - too early in the morning. I meant the audio selection menu on the Movie Details screen, before playback.

jcdick1 commented 2 years ago

On my 1.4.11, pressing down during playback gives me the subtitle selection, nothing for audio.

Sorry - too early in the morning. I meant the audio selection menu on the Movie Details screen, before playback.

Yes, that's what I used to get that screenshot. All three audio tracks are listed. I selected the third track - indicated by the checkmark - then pressed the back button twice (once highlights the "Audio" at the top of the menu again, a second press exits the menu) to go back to the details screen and selected play. The wrong track plays. Pressing the back button during playback takes me back to the details page. Selecting the audio menu again, the third track is still checkmarked, but it isn't what plays.

TKwSni commented 2 years ago

You know whats weird.... I even tried to use mkvtoolnix to change the default audio from spanish to english, it says default on roku jellyfin, but it plays in spanish??? the only way is to remove the spanish audio from it, my roku ui language is set to english and the default audio track aswell.

I dont get any ffmpeg logs, it doesnt transcode.

I'm using Jellyfin 10.7.7 Roku Express 4k 3940RW

PD: It would be great to have audio selection also for TV Series