jellyfin / jellyfin-webos

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

Audio Codec Issue #106

Open Wire-Fox opened 1 year ago

Wire-Fox commented 1 year ago

I'm having what I believe to be a codec issue when playing back video on my TV. I've got one series that is in a mkv container, HEVC video codec, and has the audio encoded in a 6-channel OPUS codec. The video is fine, but the audio playback of this comes through very choppy, cutting out every few seconds and quickly resuming play. This always streams with direct playback-no transcoding. On the same TV, if I access my server via its web browser (and thus, the Jellyfin for Web Client), it does not treat OPUS as a supported codec and transcodes only the audio to AAC. This plays back perfect with no discernable issues. The OPUS codec itself didn't appear to be an officially supported audio codec per LG. https://www.lg.com/ca_en/support/product-help/CT20098005-1437128842789

In another instance, I have a series that is in .mkv containers, H264 High Codec, and AAC LC. Once more, LG doesn't list this specific AAC codec mode as supported with mkv containers, and I have a very similar audio cut-out issue. Only in this instance, the web client also does not show this as unsupported, so it plays back without any audio transcoding and experiences the same issue as the WebOS client.

This same file plays fine on an Android phone via the Jellyfin for Web client in Firefox with direct playback, so that hypothetically may rule out the original encoding of the specific file being the issue.

Final comment for what I've tested so far: Both the Jellyfin for WebOS and Jellyfin for Web client on this TV seem to completely disregard the "Maximum Allowed Audio Channels" setting under the Playback Settings, as I had tried to select "Stereo" in order to force encoding; however, this did not trigger any audio transcoding to occur.

Client LG 55UN7300PUF webOS 5.3.0-21 (jhericurl-jasper) Jellyfin for WebOS 10.8.4 Server: Version: 10.8.4 Operating System: Linux Architecture: X64

jasondaigo commented 1 year ago

I got a LG C2 last weekend and experience also Issues with files where the audio track is labeled AAC (LC) in jellyfin. 2 Channel Audio from what i can tell. So far anime shows for me. The playback stops for 1 second and plays on. This happens every 10 seconds or something. This is with direct play. If forcing lower bandwith limit, so jellyfin is forced to transcode, it would play fine. But thats not so convenient to do every time i watch this content. OLED48C27LA webOS 7.1.0.63 The videos do all play nicely in Kodi (direct) and in Firefox. They also play without issues when using DLNA feature of jellyfin on the same TV. But no subtitles available then.

jasondaigo commented 1 year ago

Is it possble that it has something to do with the used video create application? In the play overview when playing episodes, the Information for working and non working title are mostly identical.
Here is a mkvinfo from a non working file which will stutter and on resume audio desync till next stutter (and repeat):

mitglied.mkv
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 796965924
|+ Seek head (subentries will be skipped)
|+ EBML void: size 131
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Lavf58.29.100
| + Writing application: Lavf58.29.100
| + Segment UID: 0x61 0xbd 0x6d 0x44 0x02 0xa1 0x19 0x78 0x23 0x9c 0x17 0x69 0xfe 0x70 0x16 0x9d
| + Duration: 00:24:10.063000000
|+ Tracks
| + Track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 1
|  + "Lacing" flag: 0
|  + Language: und
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Track type: video
|  + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
|  + Video track
|   + Pixel width: 1280
|   + Pixel height: 720
|   + Video color information
|    + Horizontal chroma siting: 1
|    + Vertical chroma siting: 2
|  + Codec's private data: size 41 (H.264 profile: High @L4.0)
| + Track
|  + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
|  + Track UID: 2
|  + "Lacing" flag: 0
|  + Language: ger
|  + Codec ID: A_AAC
|  + Track type: audio
|  + Audio track
|   + Channels: 2
|   + Sampling frequency: 44100
|   + Output sampling frequency: 44100
|   + Bit depth: 32
|  + Codec's private data: size 2
|  + EBML void: size 312
| + Track
|  + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
|  + Track UID: 3
|  + "Lacing" flag: 0
|  + Language: eng
|  + "Default track" flag: 0
|  + Codec ID: A_AAC
|  + Track type: audio
|  + Audio track
|   + Channels: 2
|   + Sampling frequency: 44100
|   + Output sampling frequency: 44100
|   + Bit depth: 32
|  + Codec's private data: size 2
|  + EBML void: size 312
| + Track
|  + Track number: 4 (track ID for mkvmerge & mkvextract: 3)
|  + Track UID: 4
|  + "Lacing" flag: 0
|  + Language: jpn
|  + "Default track" flag: 0
|  + Codec ID: A_AAC
|  + Track type: audio
|  + Audio track
|   + Channels: 2
|   + Sampling frequency: 44100
|   + Output sampling frequency: 44100
|   + Bit depth: 32
|  + Codec's private data: size 2
|  + EBML void: size 312
| + Track
|  + Track number: 5 (track ID for mkvmerge & mkvextract: 4)
|  + Track UID: 5
|  + "Lacing" flag: 0
|  + Language: ger
|  + "Default track" flag: 0
|  + "Forced display" flag: 1
|  + Codec ID: S_TEXT/ASS
|  + Track type: subtitles
|  + Codec's private data: size 1751
| + Track
|  + Track number: 6 (track ID for mkvmerge & mkvextract: 5)
|  + Track UID: 6
|  + "Lacing" flag: 0
|  + Language: eng
|  + "Default track" flag: 0
|  + "Forced display" flag: 1
|  + Codec ID: S_TEXT/ASS
|  + Track type: subtitles
|  + Codec's private data: size 2861
| + Track
|  + Track number: 7 (track ID for mkvmerge & mkvextract: 6)
|  + Track UID: 7
|  + "Lacing" flag: 0
|  + Language: ger
|  + "Default track" flag: 0
|  + Codec ID: S_TEXT/ASS
|  + Track type: subtitles
|  + Codec's private data: size 1751
| + Track
|  + Track number: 8 (track ID for mkvmerge & mkvextract: 7)
|  + Track UID: 8
|  + "Lacing" flag: 0
|  + Language: eng
|  + "Default track" flag: 0
|  + Codec ID: S_TEXT/ASS
|  + Track type: subtitles
|  + Codec's private data: size 2861
|+ Attachments
| + Attached
|  + File name: nsdkr.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 483724
|  + File UID: 1367121823
| + Attached
|  + File name: georgiab.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 139584
|  + File UID: 2408400613
| + Attached
|  + File name: trebuc.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 126796
|  + File UID: 2825496863
| + Attached
|  + File name: georgia.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 142964
|  + File UID: 3805081534
| + Attached
|  + File name: times.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 330412
|  + File UID: 57384808
| + Attached
|  + File name: cour.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 302688
|  + File UID: 1392243882
| + Attached
|  + File name: verdana.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 139640
|  + File UID: 284640833
|+ EBML void: size 863
|+ Cluster

and this from a working videofile:

Sukuna.mkv
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 739934991
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4012
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.6 + libmatroska v1.4.9
| + Writing application: mkvmerge v31.0.0 ('Dolores In A Shoestand') 64-bit
| + Duration: 00:23:55.086000000
| + Date: 2020-11-21 15:02:37 UTC
| + Segment UID: 0x21 0x9a 0x83 0x67 0x35 0xef 0x50 0x45 0x7f 0x68 0xf1 0x08 0x3c 0x8c 0xa2 0xbe
|+ Tracks
| + Track
|  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
|  + Track UID: 1
|  + Track type: video
|  + "Forced display" flag: 1
|  + "Lacing" flag: 0
|  + Codec ID: V_MPEG4/ISO/AVC
|  + Codec's private data: size 41 (H.264 profile: High @L4.0)
|  + Default duration: 00:00:00.041708375 (23.976 frames/fields per second for a video track)
|  + Language: jpn
|  + Video track
|   + Pixel width: 1280
|   + Pixel height: 720
|   + Display width: 1280
|   + Display height: 720
|   + Video color information
|    + Horizontal chroma siting: 1
|    + Vertical chroma siting: 2
| + Track
|  + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
|  + Track UID: 2
|  + Track type: audio
|  + "Forced display" flag: 1
|  + Codec ID: A_AAC
|  + Codec's private data: size 2
|  + Default duration: 00:00:00.023219954 (43.066 frames/fields per second for a video track)
|  + Language: ger
|  + Audio track
|   + Sampling frequency: 44100
|   + Channels: 2
|   + Output sampling frequency: 44100
| + Track
|  + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
|  + Track UID: 593418089061073804
|  + Track type: subtitles
|  + "Forced display" flag: 1
|  + "Lacing" flag: 0
|  + Codec ID: S_TEXT/ASS
|  + Codec's private data: size 2716
|  + Language: ger
|  + Name: Deutsch
|+ EBML void: size 1120
|+ Attachments
| + Attached
|  + File name: font.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 144220
|  + File UID: 3199805688303581958
| + Attached
|  + File name: font2.ttf
|  + MIME type: application/x-truetype-font
|  + File data: size 140192
|  + File UID: 7830438191431205336
|+ Cluster

i have another 720p video where Lavf59.16.100 was used; and this also stutters. Everything looks the same otherwise for me. I have even shows where Season 1 is working and libebml v1.4.2 + libmatroska v1.6.4 is shown, but season 2 is not working where libebml v1.4.2 + libmatroska v1.6.4 is shown, also ofc the Writing application difference

jasondaigo commented 9 months ago

Lately i didnt see this happening. Maybe fixed. Will watch more to be sure of course. haha

mattiahj commented 1 month ago

I also have this issue.