jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
647 stars 68 forks source link

Player Unnecessarily Transcodes Video for Streams with DTS Audio #105

Closed PersonOfInterest523 closed 7 months ago

PersonOfInterest523 commented 2 years ago

When attempting to play an HEVC video with DTS audio, the player correctly begins transcoding the audio because of the previous issue described in #56. However, the player also transcodes the video into H.264 with the listed reason being "The container is not supported" even though the container is mkv, which is supported. If I disable the "Allow video playback that requires transcoding" setting for the user, it correctly plays the video back in HEVC and only the audio is transcoded, but this is a workaround, which prevents the playback of other videos and does not address the underlying issue.

The only two files I have with DTS audio are both 4K HEVC HDR videos in mkv containers, and this issue occurs for both of them. It does not occur for 4K HEVC HDR videos in mkv containers with audio other than DTS. The following is the video and audio info for one of the videos having the issue:

Video
Title: 4K HEVC HDR
Codec: HEVC
Profile: Main 10
Level: 153
Resolution: 3840x2160
Aspect ratio: 16:9
Interlaced: No
Framerate: 23.976025
Bitrate: 28227 kbps
Bit depth: 10 bit
Video range: HDR
Video range type: HDR10
Color space: bt2020nc
Color transfer: smpte2084
Color primaries: bt2020
Pixel format: yuv420p10le
Ref frames: 1

Audio
Title: English - DTS-HD MA - 5.1 - Default
Language: eng
Codec: DTS
Profile: DTS-HD MA
Layout: 5.1
Channels: 6 ch
Bitrate: 3686 kbps
Sample rate: 48000 Hz
Bit depth: 24 bit
Default: Yes
Forced: No
External: No

Please let me know if there's anything else I should try or any more info that you need.

anthonylavado commented 2 years ago

What version of Jellyfin are you using? The split transcoding requires at least 10.8+...

PersonOfInterest523 commented 2 years ago

I am using version 10.8.4

stoically commented 2 years ago

Sounds similar to https://github.com/jellyfin/jellyfin/issues/8043

I'm still running 10.8.0-beta2 because of it. Maybe you could try that too, to confirm whether it's the same underlying issue?

Otako77 commented 1 year ago

The same Problem on my LG C1 latest Firmware and latest Jellyfin App. Jellyfin latest 10.8.7, DTS-AAC Transcoding AND unnecessarily HEVC-H.264 transcoding.

dabohda commented 1 year ago

Same Problem here with the latest docker linuxserver/jellyfin 10.8.8 and lg c2 latest firmware. The player also transcodes the video into H.264 with the listed reason being "The container is not supported"

dabohda commented 1 year ago

Full HD movies with dts sound works like it should. Only the audio stream is transcoded and the movie is send in direct stream mode. With both x264 and x265 video codec. But with 4k movies the video stream is transcoded.

Otako77 commented 1 year ago

https://github.com/jellyfin/jellyfin-webos/issues/118#issuecomment-1367695609

Hooloovoo commented 1 year ago

If I disable the "Allow video playback that requires transcoding" setting for the user, it correctly plays the video back in HEVC and only the audio is transcoded

Great work figuring this out. Same here. Obviously a proper fix would be better. Please let me know if any details or logs from me would help.

Hooloovoo commented 1 year ago

I am still seeing this on 10.8.9 (server in Docker container on Ubuntu) -- is that expected? PR #9092 says it fixed this and I thought from looking at the release notes for 10.8.9 (https://github.com/jellyfin/jellyfin/releases/tag/v10.8.9) that it included this fix.

Killface1980 commented 1 year ago

The same issue came up in 10.10 again. It was working as expected, since a reinstall most videos are transcoded without any need. Also, pfrefer fMP4 is ignored completely.

dmitrylyzo commented 1 year ago

@Killface1980 Try disabling HEVC encoding in the Dashboard + disable fMP4 on the TV.

0xBADEAFFE commented 10 months ago

@Killface1980 Try disabling HEVC encoding in the Dashboard + disable fMP4 on the TV.

Unfortunately, this does not solve the problem.

PersonOfInterest523 commented 8 months ago

Update: I recently tried to play the file that originally caused the problem, and it worked perfectly without transcoding, so either this bug has been fixed or I misidentified it in the first place. The reason I say that I might have misidentified it is that the video transcodes when using the PGS subtitle track attached to the file. This is correct behavior, and when I turn off the subtitle track the transcoding stops. It is possible that the two files I had with PGS subtitles also happened to be the two files I had with DTS audio, and I misattributed what was causing the transcoding. However, I cannot verify what was causing the transcoding when I first opened this issue. As I said in my initial comment, the listed reason was "The container is not supported," which didn't make sense. Now, when the video transcodes the listed reason is "The subtitle codec is not supported," which is correct. Therefore, either there was a real bug causing transcoding, which was fixed, or there was a silly bug in listing the correct error message, which was fixed.

I don't know whether this issue should be closed because it sounds like other people had a similar problem, and I don't know if they still have it.

PersonOfInterest523 commented 8 months ago

Further update: I don't think I misattributed the bug because I mention in my original post that the video was transcoded into H.264, but when transcoding because of the subtitles, it stays in HEVC.

That doesn't change the fact that it works now, and the bug appears to be fixed (at least for me).