jellyfin / jellyfin

The Free Software Media System
https://jellyfin.org
GNU General Public License v2.0
33.69k stars 3.08k forks source link

Jellyfin performs a full transcode on SecondaryAudioNotSupported when using AAC codec #7649

Closed dferrg closed 3 months ago

dferrg commented 2 years ago

I'm using firefox to play a video file with multiple audio tracks. The first track plays well, but when I change to the others, jellyfin is transcoding the full file instead of just demuxing. It doesn't happen with MP3 audio, even with exactly the same video codec and container format.

Media Info of the file Audio Title Und - AAC - 6 ch - Default Language und Codec AAC Codec tag mp4a Profile LC Channels 6 ch Bitrate 224 kbps Sample rate 48000 Hz Default Yes

Audio Title AAC - 6 ch Codec AAC Codec tag mp4a Profile LC Channels 6 ch Bitrate 224 kbps Sample rate 48000 Hz Default No

Video Title1080p H264 SDR Codec H264 Codec tag avc1 AVC No Profile High Level 40 Resolution 1920x1040 Aspect ratio 1.85:1 Interlaced No Framerate 23.97589 Bitrate 1644 kbps Bit depth 8 bit Video range SDR Pixel format yuv420p Ref frames 1 NAL 0

Audio Title AAC - 6 ch Codec AAC Codec tag mp4a Profile LC Channels 6 ch Bitrate 224 kbps Sample rate 48000 Hz Default No

Logs

[12:49:42] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for dani. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [12:49:42] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: Profile: Unknown Profile, Path: /data/movies/El.viatge.de.Chihiro(1080p.x264.ACC)(Cat.Esp.Eng).m4v, isEligibleForDirectPlay: True, isEligibleForDirectStream: True [12:49:42] [INF] [25] Jellyfin.Api.Helpers.MediaInfoHelper: Profile: VideoAudioCodecProfile, DirectPlay=false. Reason=Unknown Profile.IsSecondaryAudio Condition: Equals. ConditionValue: false. IsRequired: False. Path: /data/movies/El.viatge.de.Chihiro(1080p.x264.ACC)(Cat.Esp.Eng).m4v [12:49:43] [INF] [110] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [12:49:43] [INF] [110] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -f mov,mp4,m4a,3gp,3g2,mj2 -i file:"/data/movies/El.viatge.de.Chihiro(1080p.x264.ACC)(Cat.Esp.Eng).m4v" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:2 -map 0:3 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset veryfast -crf 23 -maxrate 4112095 -bufsize 8224190 -profile:v:0 high -level 41 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 "expr:gte(t,0+n_forced3)" -vf "scale=trunc(min(max(iw\,ihdar)\,min(1920\,1040dar))/2)2:trunc(min(max(iw/dar\,ih)\,min(1920/dar\,1040))/2)*2" -start_at_zero -vsync -1 -codec:a:0 aac -ac 6 -ab 224424 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/config/data/transcodes/51b2683d380fd7b31e67c074d9b8a0ff%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/51b2683d380fd7b31e67c074d9b8a0ff.m3u8"

Stats for Nerds Screenshots image

Server System (please complete the following information):

Client System (please complete the following information):

cvium commented 2 years ago

Have you tried the 10.8 beta?

dferrg commented 2 years ago

No, I haven't. I was planning to transcode all my library to a common format, so it doesn't matter too much whether it's AAC or MP3 for me. Is it supposed to be solved in 10.8? I can give it a try and give feedback if you want.

Shadowghost commented 2 years ago

10.8 supports partial transcodes so only the streams not compatible with your client are getting transcoded

dferrg commented 2 years ago

The streams themselves should be compatible since the primary track plays without transcoding. Also, the same video but transcoded to MP3 gets remuxed instead of transcoded.

Though obviously if AAC can't be remuxed for some reason, transcoding just audio would be much better than transcoding the entire file.

whiteowl3 commented 2 years ago

please tag 10.7.7

Traace commented 1 year ago

Jellyfin still performs a full transcode on live-tv for me. The Media plays fine when I disable transcoding, so there shouldn't be any need for it.

300EMI commented 1 year ago

Hi,

I have the same problem: SecondaryAudioNotSupported

Video Title: 1080p H264 SDR Codec: H264

Audio Title: Deutsch 2.0 - AAC - Stereo - Default Language: deu Codec: AAC Codec tag: mp4a

Audio Title: Deutsch 5.1 - Dolby Digital Language: deu Codec: AC3

Audio Title: Englisch 2.0 - AAC - Stereo Language: eng Codec: AAC

If I play the movie with the default/ first soundtrack, playback starts without “transcoding”. (Windows 11, Firefox, Edge and Chrome) If I play the third soundtrack (TranscodeReasons=SecondaryAudioNotSupported) and the Jellyfin starts to “transcode” the stream

Server: jellyfin Version: 10.8.9 Operating System: Linux Architecture: X64

Client: Windows 10 Firefox 111.0 (64-Bit) Chrome Version 111.0.5563.65 (Offizieller Build) (64-Bit) Microsoft Edge: Version 111.0.1661.44 (Offizielles Build) (64-Bit)

BR René

jellyfin-bot commented 1 year ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

xescure commented 11 months ago

I'm still encountering this issue and nothing was done to remedy the problem. Can this be reopened?

dancingmadkefka commented 8 months ago

I am having the same issue. I have a 10GB episode with two tracks: both E-AC-3 JOC. I played it on my LG OLED B8 Jellyfin native app, and it said "Remuxing due to container" or something. MKV container, should not be an issue. Then I turned on HWA and selected all the codecs and enabled HEVC transcoding and it started giving me the above issue. It also stutters a lot despite the server not being overloaded and my network being uncongested.

jellyfin-bot commented 4 months ago

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

jellyfin-bot commented 3 months ago

This issue was closed due to inactivity.