Skip to content

Conversation

@kinke
Copy link
Contributor

@kinke kinke commented Nov 12, 2025

Enable direct-play of AC-4 audio streams if the player claims support for it.

I've tested this on a Tizen 9 TV:

  • An .mp4 (from https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/help_files/topics/kit_wrapper_MP4_multiplexed_streams.html) direct-plays fine. I haven't tested the file earlier with vanilla jellyfin-web.
    Stream #0:0[0x1](eng): Audio: ac4 (ac-4 / 0x342D6361), 48000 Hz, 6 channels, 128 kb/s (default)
    Stream #0:1[0x2](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv), 1280x720 [SAR 1:1 DAR 16:9], 1015 kb/s, 25 fps, 25 tbr, 25k tbn (default)
    
  • A .ts now can't be played back anymore, so that's currently a regression. Before these changes, the audio stream got transcoded to aac and then played back fine. Now I still see a DirectStream log file for each attempt (actually, 2 files for each attempt), both with the unexpected aac transcoding still, but the playback fails.
    Input #0, mpegts, from 'file:/jellyfin/Samples/atsc3.ts':
      Duration: 00:00:10.08, start: 13664.044767, bitrate: 1292 kb/s
      Program 3 
      Stream #0:0[0x31]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn
      Stream #0:1[0x32](eng): Audio: ac4 (AC-4 / 0x342D4341), 46034 Hz, 5.1(side), fltp
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (ac4 (native) -> aac (libfdk_aac))
    Press [q] to stop, [?] for help
    Output #0, hls, to '/var/cache/jellyfin/transcodes/a04fa586b10c2e97876e2e50b0ac38cc.m3u8':
      Stream #0:0: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn
      Stream #0:1: Audio: aac, 44100 Hz, 5.1, s16, 640 kb/s
    

@jellyfin-bot
Copy link
Collaborator

jellyfin-bot commented Nov 12, 2025

Cloudflare Pages deployment

Latest commit fad7fa4
Status ✅ Deployed!
Preview URL https://c16ff74f.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs

@sonarqubecloud
Copy link

@kinke
Copy link
Contributor Author

kinke commented Nov 12, 2025

A .wgt Tizen build for testing (based on v10.11) is available from https://github.com/kinke/jellyfin-tizen-builds/actions/runs/19298759849.

@krishhari2105
Copy link

A .wgt Tizen build for testing (based on v10.11) is available from https://github.com/kinke/jellyfin-tizen-builds/actions/runs/19298759849.

Tested a few ac4 files in mp4 container. It is direct playing but there is no audio. Also for 5.1.4 atmos ac4 track jellyfin media info shows as ac4 with 0 channels. Standard 5.1ch ac4 track is showing correctly but all tracks have no audio when played.Tested with Tizen 8 TV.

@kinke
Copy link
Contributor Author

kinke commented Nov 12, 2025

The first Dolby sample I've linked plays fine on my Tizen 9, the thunder is audible. But I'm not going to test much more, since my personal interest is basically 0. - Note that the media info stuff comes from the server, that's unrelated to the web client here.

@krishhari2105
Copy link

The first Dolby sample I've linked plays fine on my Tizen 9, the thunder is audible. But I'm not going to test much more, since my personal interest is basically 0. - Note that the media info stuff comes from the server, that's unrelated to the web client here.

I tested the first demo file too but don't know what causes the no audio issue. The file plays with audio if i play it via the native tizen media player via dlna. Since you are saying tizen 9 plays fine I couldn't figure out the exact issue with my tv. Btw thanks for your efforts and response.

@kinke
Copy link
Contributor Author

kinke commented Nov 12, 2025

I've also tested https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Test_Signals/muxed_streams/MP4/Example/Audio_ID_720p_50fps_h265_514ch_192kbps_ac4.mp4 now, with a 5.1.4 channel config. It's direct-played and audible just fine (FWIW, both on GQ65S95F alone and via AV receiver); media info shows 0 channels, playback info has no channels info either (but shows the same 192 kbps and 51200 Hz).

Maybe it's really a Tizen 9 change.

How about the .ts, are you seeing the same regression too, not playable at all anymore?

@kinke
Copy link
Contributor Author

kinke commented Nov 13, 2025

After just discovering @dmitrylyzo's rather old avplay branch (replacing the default HTML5 <video> player with Samsung's 'native' AVPlay API), I've just had to give it a quick go: https://github.com/kinke/jellyfin-tizen-builds/actions/runs/19334659485. This .wgt build uses this branch (rebased and enabled AV1, AC-4), while still using my jellyfin-web fork (v10.11).

So far, after testing a few samples, it surprisingly seems to be almost usable on my Tizen 9.

  • Direct-play of AC4 in .mp4 still works, and the .ts now plays back again too (but the AC4 audio is still transcoded to aac).
  • A selected secondary audio stream doesn't require a remux anymore!
  • DOVI fallbacks and HDR10[+] stuff direct-plays fine.
  • The aspect ratio of direct-played anamorphic videos is NOT applied automatically.
  • Subtitles don't seem to work at all.

It'd be interesting to know whether AVPlay fixes the AC4 audio on your Tizen 8.

@krishhari2105
Copy link

After just discovering @dmitrylyzo's rather old avplay branch (replacing the default HTML5 <video> player with Samsung's 'native' AVPlay API), I've just had to give it a quick go: https://github.com/kinke/jellyfin-tizen-builds/actions/runs/19334659485. This .wgt build uses this branch (rebased and enabled AV1, AC-4), while still using my jellyfin-web fork (v10.11).

So far, after testing a few samples, it surprisingly seems to be almost usable on my Tizen 9.

  • Direct-play of AC4 in .mp4 still works, and the .ts now plays back again too (but the AC4 audio is still transcoded to aac).
  • A selected secondary audio stream doesn't require a remux anymore!
  • DOVI fallbacks and HDR10[+] stuff direct-plays fine.
  • The aspect ratio of direct-played anamorphic videos is NOT applied automatically.
  • Subtitles don't seem to work at all.

It'd be interesting to know whether AVPlay fixes the AC4 audio on your Tizen 8.

That's really good🤩.. tested your avplay build and i can now directly play ac4 files with audio.. yeah subtitles doesn't work..for that anamorphic video..i saw some "is anamorphic conditions" in avplayvideoplayer.js file..maybe we could tweak that?..for .ts ac4 playback it says unsupported file even in the native tizen media player...this is some firmware or hardware level limitations?...i hope u will find something for that subtitles issue😊...also it would be nicer if we focus in AVplay API for video playback in tizen client..

@dmitrylyzo
Copy link
Contributor

That branch is not ready yet, because we need a subtitle overlay class for rendering ASS, PGS, and SRT (to support our styling settings). And client settings so that we can choose a player.

@kinke
Copy link
Contributor Author

kinke commented Nov 13, 2025

@dmitrylyzo: Thx for the work and the response! Did I miss any PR, or is it really just that 'hidden' branch of yours? I've just found it incidentally by googling...

for that anamorphic video..i saw some "is anamorphic conditions" in avplayvideoplayer.js file..maybe we could tweak that?

I've removed those is-not-anamorphic-conditions for AVPlay too (in that build), enabling direct-play; but the aspect ratio isn't applied automatically, unlike for the HTML5 player. So that's something that's worse in AVPlay, and after a quick look at the (crappy) API docs, I'm not sure the aspect ratio can be freely customized at all.

I'm almost 100% happy with the HTML5 player on Tizen 9 (now after the latest 10.11 regression fixes); the only slight annoyance so far in practice is the need to remux for a secondary audio track (which apparently might have worked for Tizen < 8, so shame on Samsung if that's really true). So I suspect I wouldn't really gain a lot from switching to AVPlay; the situation might be different for older Tizen devices, where Samsung might have kept more features AVPlay-exclusive, like that AC-4 support apparently.

@krishhari2105
Copy link

Yeah i am too sticking with HTML5 player on my TV. AVplay API is good but can't trade off subtitles support for ac4 which will not be necessary as for now.

So the current bugs in AVplay is

1.Subtitles
2.Mismatch in switching audio tracks

Hoping for this to be solved if further development continues. @kinke So is this PR going to be closed or stay as a Draft?

@kinke
Copy link
Contributor Author

kinke commented Nov 16, 2025

I've continued the AVPlay experiment somewhat, hacking in some subtitles support along the way: #7339

So is this PR going to be closed or stay as a Draft?

According to our 2 tests, we'd apparently have to restrict the HTML AC-4 support on Tizen to v9+, to prevent Tizen 8 from outputting no audio. Tests on older devices would be interesting.

@krishhari2105
Copy link

krishhari2105 commented Nov 17, 2025

Hey, thanks for the build.

Tested a few movies with subtitles. embedded subtitles works perfectly but external subtitles doesn't seem to work.

Also, I noticed a bug where the previous subtitle text stays in the screen until the next dialogue comes. It is not noticeable in continuous convos but highly noticeable during high gap dialogues and songs.

Need someone to test this in older Tizen versions like 5,6,7.

Update: External subtitles too works perfectly. The movie I tested had a corrupted subtitle. So the bug i mentioned is the only issue in subtitles rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants