2023-12-03, 04:19 AM
I'm a long-time blu-ray ripping user. For some media, I re-encode to save space. Recently I've started experimenting with HEVC/Opus in MKV. My primary use case is a Shield TV, so HEVC is OK.
My server is locally hosted Fedora 38/Jellyfin 10.8.12 using Fedora's RPMs, but a self-compiled version of jellyfin-mpeg (using an SRPM helpfully provided by another user).
I have re-encoded two TV series that I ripped from disc. The first I used Handbrake with x265. Playback works fine from both a Windows machine using the web client, and from the Shield TV using the Jellyfin client.
I've recently gotten an Arc A380 board. The plan is to put it into the server, but I have issues I need to solve before I can do so, so I've put it into my Windows 10 desktop. I then started encoding a second series using Handbrake, but using QuickSync (QSV) instead of x265. The resulting encodes play just fine as straight files, and from the web interface:
[2023-12-02 23:04:57.036 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:04:57.038 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) "mediavideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/master.m3u8?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=119616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=13ee6f0a016de49e2d913d9b77cc69db&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&TranscodeReasons=VideoCodecNotSupported"
[2023-12-02 23:04:57.342 -05:00] [INF] [59] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-12-02 23:04:57.343 -05:00] [INF] [59] Jellyfin.Api.Helpers.TranscodingJobHelper: "ffmpeg" "-analyzeduration 200M -f matroska,webm -autorotate 0 -i file:\"/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 5136910 -bufsize 10273820 -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_forced*3)\" -sc_threshold:v:0 0 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p\" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af \"volume=2\" -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 \"/var/lib/jellyfin/transcodes/b2b40b927ae2a756973ad084795f26ef%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/b2b40b927ae2a756973ad084795f26ef.m3u8\""
This plays correctly.
However, if I play the same file using both the Shield TV, and the android client on my Pixel 4a (Android 13), I get only this in the log:
[2023-12-02 23:12:29.203 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:12:29.204 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediavideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/stream.mkv?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=13ee6f0a016de49e2d913d9b77cc69db"
That's it. On the pixel, a message pops up at the bottom of the screen saying "Source Error". On the Shield TV, the media just doesn't play, and shows a 0:00 run time.
I tried enabling the "upload error logs to the server" options, but nothing is showing up.
On the Shield, I experimented with changing the media player to MPV. That worked. Findroid on the phone also works (unsrprisingly). I think the problem is something very specific to ExoPlayer and these media files I've made using QSV.
My dilema is: I don't know where to go next. What can I do to try to get more information than "Source Error"?
I was actually surprised to see "DirectPlay", because I suspected that ExoPlayer can't play the Opus audio, but it has no trouble with the x265 encoded show:
[2023-12-02 23:17:11.060 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:17:11.061 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/That 70's Show (199/Season 05/That '70S Show (199 S05e23 Nobody's Fault But Mine (2).mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediavideos/cb43f241-77a8-a567-92aa-dac6937664b6/stream.mkv?MediaSourceId=cb43f24177a8a56792aadac6937664b6&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=ab62ac05009c0eedb79407969ffe9196"
This plays just find in the Android client. (Again, both media were made by the same version of Handbrake, both transcoding the audio to Opus, and the video to HEVC, the working using x265 and the non-working QSV.)
What can I do to try to further figure out what's going on here?
Thank you,
Kevin
My server is locally hosted Fedora 38/Jellyfin 10.8.12 using Fedora's RPMs, but a self-compiled version of jellyfin-mpeg (using an SRPM helpfully provided by another user).
I have re-encoded two TV series that I ripped from disc. The first I used Handbrake with x265. Playback works fine from both a Windows machine using the web client, and from the Shield TV using the Jellyfin client.
I've recently gotten an Arc A380 board. The plan is to put it into the server, but I have issues I need to solve before I can do so, so I've put it into my Windows 10 desktop. I then started encoding a second series using Handbrake, but using QuickSync (QSV) instead of x265. The resulting encodes play just fine as straight files, and from the web interface:
[2023-12-02 23:04:57.036 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:04:57.038 -05:00] [INF] [59] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported ) "mediavideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/master.m3u8?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=119616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=13ee6f0a016de49e2d913d9b77cc69db&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&TranscodeReasons=VideoCodecNotSupported"
[2023-12-02 23:04:57.342 -05:00] [INF] [59] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-12-02 23:04:57.343 -05:00] [INF] [59] Jellyfin.Api.Helpers.TranscodingJobHelper: "ffmpeg" "-analyzeduration 200M -f matroska,webm -autorotate 0 -i file:\"/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 5136910 -bufsize 10273820 -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_forced*3)\" -sc_threshold:v:0 0 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p\" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af \"volume=2\" -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 \"/var/lib/jellyfin/transcodes/b2b40b927ae2a756973ad084795f26ef%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/lib/jellyfin/transcodes/b2b40b927ae2a756973ad084795f26ef.m3u8\""
This plays correctly.
However, if I play the same file using both the Shield TV, and the android client on my Pixel 4a (Android 13), I get only this in the log:
[2023-12-02 23:12:29.203 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:12:29.204 -05:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/Friends (1994)/Season 01/Friends (1994) S01e02 The One With The Sonogram At The End.mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediavideos/8d4bc4c9-a700-4e89-346a-c09d67f7d8db/stream.mkv?MediaSourceId=8d4bc4c9a7004e89346ac09d67f7d8db&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=13ee6f0a016de49e2d913d9b77cc69db"
That's it. On the pixel, a message pops up at the bottom of the screen saying "Source Error". On the Shield TV, the media just doesn't play, and shows a 0:00 run time.
I tried enabling the "upload error logs to the server" options, but nothing is showing up.
On the Shield, I experimented with changing the media player to MPV. That worked. Findroid on the phone also works (unsrprisingly). I think the problem is something very specific to ExoPlayer and these media files I've made using QSV.
My dilema is: I don't know where to go next. What can I do to try to get more information than "Source Error"?
I was actually surprised to see "DirectPlay", because I suspected that ExoPlayer can't play the Opus audio, but it has no trouble with the x265 encoded show:
[2023-12-02 23:17:11.060 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "jellyfin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-12-02 23:17:11.061 -05:00] [INF] [85] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Jellyfin Android", Path="/xxx/That 70's Show (199/Season 05/That '70S Show (199 S05e23 Nobody's Fault But Mine (2).mkv", AudioStreamIndex=1, SubtitleStreamIndex=-1 ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "mediavideos/cb43f241-77a8-a567-92aa-dac6937664b6/stream.mkv?MediaSourceId=cb43f24177a8a56792aadac6937664b6&Static=true&VideoCodec=hevc&AudioCodec=opus&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=ab62ac05009c0eedb79407969ffe9196"
This plays just find in the Android client. (Again, both media were made by the same version of Handbrake, both transcoding the audio to Opus, and the video to HEVC, the working using x265 and the non-working QSV.)
What can I do to try to further figure out what's going on here?
Thank you,
Kevin