rotational467 35 Posted November 12, 2022 Posted November 12, 2022 (edited) I've run across (and posted once or twice in the Roku area about this) apparently "random" TV episodes that I have personally ripped and encoded from the blu-ray, where Emby cannot do a hardware transcode for playback when the PGS subtitle track is enabled. I've finally had time to do dig out the original blu-ray to validate whether there is some defect in my encoded version. I identified an episode that failed to xcode in HW and displays the following in the ffmpeg log: >>>>>> Subtitle Processing Steps for [0:2]: HDMV PGS subtitles Step Format Target Size HDMV_PGS_SUBTITLE >> Subs: Bitmap scale >> Video: UNKNOWN 1920x1080 ... 11:24:00.581 [matroska,webm @ 0xe35ac0] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options 11:24:00.581 Input #0, matroska,webm, from '/share/Video/TV/Archer (2009)/Season 02/Archer (2009) - S02E01 - Swiss Miss.mkv': 11:24:00.581 Metadata: 11:24:00.581 title : ARCHER SEASON 2 - DISC 1 11:24:00.581 creation_time : 2019-12-27T05:43:27.000000Z 11:24:00.581 ENCODER : Lavf58.20.100 11:24:00.581 Duration: 00:21:03.44, start: 0.000000, bitrate: 6649 kb/s 11:24:00.581 Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Level 120, 23.98 fps, 23.98 tbr, 1k tbn (default) 11:24:00.582 Metadata: 11:24:00.582 DURATION : 00:21:03.429000000 11:24:00.582 Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default) 11:24:00.582 Metadata: 11:24:00.582 title : Surround 11:24:00.582 DURATION : 00:21:03.435000000 11:24:00.582 Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle 11:24:00.582 Metadata: 11:24:00.582 DURATION : 00:21:01.281000000 11:24:00.597 Stream mapping: 11:24:00.597 Stream #0:0 (hevc) -> overlay (graph 0) 11:24:00.597 Stream #0:2 (pgssub) -> scale:default (graph 0) 11:24:00.597 hwupload:default (graph 0) -> Stream #0:0 (h264_vaapi) 11:24:00.597 Stream #0:1 -> #0:1 (dts (dca) -> mp3 (libmp3lame)) 11:24:00.597 Press [q] to stop, [?] for help 11:24:00.944 subtitle_kickoff: call subtitle_resend_current 5057 frame->format: 1 11:24:00.945 subtitle input filter: decoding size 0x0 11:24:00.945 Auto-inserting subfeed filter 11:24:00.945 Auto-inserting graphicsub2video filter 11:24:00.969 Output #0, segment, to '/scratch/embytemp/transcoding-temp/DC840A/DC840A_%d.ts': 11:24:00.969 Metadata: 11:24:00.969 encoder : Lavf59.17.100 11:24:00.969 Stream #0:0: Video: h264 (High), vaapi(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 13299 kb/s, Level 40, 23.98 fps, 90k tbn 11:24:00.969 Metadata: 11:24:00.969 encoder : Lavc59.21.100 h264_vaapi 11:24:00.969 Stream #0:1(eng): Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s (default) 11:24:00.969 Metadata: 11:24:00.969 encoder : Lavc59.21.100 libmp3lame 11:24:00.980 elapsed=00:00:00.34 frame= 2 fps=0.0 q=-0.0 size=N/A time=00:00:01.79 bitrate=N/A throttle=off speed=5.17x 11:24:01.219 subtitle input filter: decoding size 1920x1080 11:24:01.219 Auto-inserting subfeed filter 11:24:01.219 Auto-inserting graphicsub2video filter 11:24:01.220 Impossible to convert between the formats supported by the filter 'hwupload@f4' and the filter 'auto_scale_0' 11:24:01.220 Error reinitializing filters! 11:24:01.220 Failed to inject frame into filter network: Function not implemented 11:24:01.220 Error while processing the decoded data for stream #0:2 11:24:01.222 [libmp3lame @ 0xe9b440] 3 frames left in the queue on closing 11:24:01.225 Conversion failed! Compared to an episode that xcodes in HW properly: >>>>>> Subtitle Processing Steps for [0:2]: HDMV PGS subtitles Step Format Target Size HDMV_PGS_SUBTITLE >> Subs: Bitmap 1920x1080 scale >> Video: UNKNOWN 1920x-2 ... 11:27:42.355 Input #0, matroska,webm, from '/share/Video/TV/Archer (2009)/Season 02/Archer (2009) - S02E03 - Blood Test.mkv': 11:27:42.355 Metadata: 11:27:42.355 title : ARCHER SEASON 2 - DISC 1 11:27:42.355 creation_time : 2019-12-27T06:09:10.000000Z 11:27:42.355 ENCODER : Lavf58.20.100 11:27:42.355 Duration: 00:21:16.58, start: 0.000000, bitrate: 4813 kb/s 11:27:42.356 Stream #0:0: Video: hevc (Main), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Level 120, 23.98 fps, 23.98 tbr, 1k tbn (default) 11:27:42.356 Metadata: 11:27:42.356 DURATION : 00:21:16.567000000 11:27:42.356 Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default) 11:27:42.356 Metadata: 11:27:42.356 title : Surround 11:27:42.356 DURATION : 00:21:16.576000000 11:27:42.356 Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080, Start-Time 3.420s 11:27:42.356 Metadata: 11:27:42.356 DURATION : 00:21:14.544000000 11:27:42.375 Stream mapping: 11:27:42.375 Stream #0:0 (hevc) -> overlay (graph 0) 11:27:42.375 Stream #0:2 (pgssub) -> scale:default (graph 0) 11:27:42.375 hwupload:default (graph 0) -> Stream #0:0 (h264_vaapi) 11:27:42.375 Stream #0:1 -> #0:1 (dts (dca) -> mp3 (libmp3lame)) 11:27:42.375 Press [q] to stop, [?] for help 11:27:42.745 subtitle input filter: decoding size 1920x1080 11:27:42.745 Auto-inserting subfeed filter 11:27:42.745 Auto-inserting graphicsub2video filter 11:27:42.769 Output #0, segment, to '/scratch/embytemp/transcoding-temp/6CD0C8/6CD0C8_%d.ts': 11:27:42.769 Metadata: 11:27:42.769 encoder : Lavf59.17.100 11:27:42.769 Stream #0:0: Video: h264 (High), vaapi(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 9626 kb/s, Level 40, 23.98 fps, 90k tbn 11:27:42.769 Metadata: 11:27:42.769 encoder : Lavc59.21.100 h264_vaapi 11:27:42.769 Stream #0:1(eng): Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s (default) 11:27:42.769 Metadata: 11:27:42.769 encoder : Lavc59.21.100 libmp3lame 11:27:42.770 elapsed=00:00:00.36 frame= 1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A throttle=off speed= 0x 11:27:43.198 [segment @ 0xda4780] Opening '/scratch/embytemp/transcoding-temp/6CD0C8/6CD0C8.m3u8.tmp' for writing Note that these two episodes were from the same disc and ripped/transcoded using identical commands, software versions, etc. via a batch script. So, how can the subtitle metadata for one have gotten corrupted/lost and not the other? It didn't. I re-ripped the failing episode using MakeMKV without any modifications and swapped it in place: >>>>>> Subtitle Processing Steps for [0:2]: HDMV PGS subtitles Step Format Target Size HDMV_PGS_SUBTITLE >> Subs: Bitmap scale >> Video: UNKNOWN 1920x1080 ... 11:39:46.983 [matroska,webm @ 0x7d9ac0] Could not find codec parameters for stream 2 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options 11:39:47.017 Input #0, matroska,webm, from '/share/Video/TV/Archer (2009)/Season 02/s02e01.mkv': 11:39:47.017 Metadata: 11:39:47.017 title : ARCHER SEASON 2 - DISC 1 11:39:47.017 encoder : libmakemkv v1.17.2 (1.3.10/1.5.2) win(x64-release) 11:39:47.017 creation_time : 2022-11-12T16:31:22.000000Z 11:39:47.017 Duration: 00:21:03.43, start: 0.000000, bitrate: 28728 kb/s 11:39:47.017 Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], Level 41, 23.98 fps, 23.98 tbr, 1k tbn 11:39:47.017 Metadata: 11:39:47.017 BPS-eng : 24403287 11:39:47.017 DURATION-eng : 00:21:03.428833333 11:39:47.017 NUMBER_OF_FRAMES-eng: 30292 11:39:47.017 NUMBER_OF_BYTES-eng: 3853974619 11:39:47.017 SOURCE_ID-eng : 001011 11:39:47.017 Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default) 11:39:47.017 Metadata: 11:39:47.017 title : Surround 5.1 11:39:47.017 BPS-eng : 4257095 11:39:47.017 DURATION-eng : 00:21:03.434666666 11:39:47.017 NUMBER_OF_FRAMES-eng: 118447 11:39:47.017 NUMBER_OF_BYTES-eng: 672319952 11:39:47.018 SOURCE_ID-eng : 001100 11:39:47.018 Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle 11:39:47.018 Metadata: 11:39:47.018 BPS-eng : 65252 11:39:47.018 DURATION-eng : 00:20:56.234145833 11:39:47.018 NUMBER_OF_FRAMES-eng: 888 11:39:47.018 NUMBER_OF_BYTES-eng: 10246614 11:39:47.018 SOURCE_ID-eng : 001200 11:39:47.037 Stream mapping: 11:39:47.037 Stream #0:0 (h264) -> overlay (graph 0) 11:39:47.037 Stream #0:2 (pgssub) -> scale:default (graph 0) 11:39:47.037 hwupload:default (graph 0) -> Stream #0:0 (h264_vaapi) 11:39:47.037 Stream #0:1 -> #0:1 (dts (dca) -> mp3 (libmp3lame)) 11:39:47.038 Press [q] to stop, [?] for help 11:39:47.300 subtitle_kickoff: call subtitle_resend_current 5057 frame->format: 1 11:39:47.301 subtitle input filter: decoding size 0x0 11:39:47.301 Auto-inserting subfeed filter 11:39:47.301 Auto-inserting graphicsub2video filter 11:39:47.325 Output #0, segment, to '/scratch/embytemp/transcoding-temp/A6B9A8/A6B9A8_%d.ts': 11:39:47.325 Metadata: 11:39:47.325 encoder : Lavf59.17.100 11:39:47.325 Stream #0:0: Video: h264 (High), vaapi(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 28728 kb/s, Level 41, 23.98 fps, 90k tbn 11:39:47.325 Metadata: 11:39:47.325 encoder : Lavc59.21.100 h264_vaapi 11:39:47.325 Stream #0:1(eng): Audio: mp3, 48000 Hz, stereo, fltp, 192 kb/s (default) 11:39:47.325 Metadata: 11:39:47.325 encoder : Lavc59.21.100 libmp3lame 11:39:47.340 elapsed=00:00:00.26 frame= 2 fps=0.0 q=-0.0 size=N/A time=00:00:02.03 bitrate=N/A throttle=off speed=7.74x 11:39:47.528 subtitle input filter: decoding size 1920x1080 11:39:47.528 Auto-inserting subfeed filter 11:39:47.528 Auto-inserting graphicsub2video filter 11:39:47.529 Impossible to convert between the formats supported by the filter 'hwupload@f4' and the filter 'auto_scale_0' 11:39:47.529 Error reinitializing filters! 11:39:47.529 Failed to inject frame into filter network: Function not implemented 11:39:47.529 Error while processing the decoded data for stream #0:2 11:39:47.534 [libmp3lame @ 0x8ff380] 3 frames left in the queue on closing 11:39:47.535 Conversion failed! So - the source itself has what is apparently incorrect and/or missing subtitle track metadata. I re-ripped the working example episode as well to confirm. Note that none of the tools I normally use (primarily MediaInfo, MKVToolNix) expose this information about the subtitle tracks as far as I can tell, so I'm not sure even how to identify a problematic file besides seeing if Emby pukes and falls back to SW. The original disc plays without issue, and the file I transcoded from the source rip will play with subs enabled in Kodi, VLC, and MPC-BE without a problem, and prior when I was on Plex it was able to transcode these w/subs without a problem. Is the source itself actually out-of-spec? Is this an ffmpeg issue, or an issue with the command used to locate/examine the subtitle track? I've run across incidences of this specific problem in a few different shows and movies I've personally ripped (Archer, Futurama, The Venture Bros, The Running Man, more). If this is an issue of specification/standards enforcement (i.e. "yeah it can work that way, but it's out of spec so we're failing it"), I'd ask that the issue be re-examined, as it's apparently a common enough thing in the available source media that I've tripped over it multiple times across multiple shows and movies in my relatively small library. ffmpeg logs and mediainfo reports for the files are attached. If there's further info I could gather in order to determine definitively what's going on and whether it's addressable I'm happy to do so. Thanks! archer_s02e01_br_source.html bad_subs_encoded_ffmpeg-transcode-c853a7c1-ca06-4c2f-8d8e-ac3e617f44bf_1.txt bad_subs_source_ffmpeg-transcode-90cd65e4-b7eb-496d-ac0b-6049aab86897_1.txt good_subs_encoded_ffmpeg-transcode-4f28ce54-3508-4a03-9415-f755f50d7514_1.txt Edited November 12, 2022 by rotational467
Solution softworkz 4278 Posted November 12, 2022 Solution Posted November 12, 2022 These issues are resolved in the latest betas. 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now