[FFmpeg-user] pgssub direct to .sub & .idx ? Possible?
Mark Filipak
markfilipak.imdb at gmail.com
Tue Jun 10 16:39:19 EEST 2025
Is there a workaround for the failure below? If there is, it will save me an extra, mkvextract step
and about 10 minutes per movie.
Thanks!--Mark.
I've been doing this:
Next, convert 'hdmv_pgs_subtitle's to 'dvd_subtitle's; make an mkv that contains only subtitles.
It takes 5 to 10 minutes.
Note that the step following this step extracts only dvd subtitles and only from mkv transports.
ffmpeg^
-i "y:\BDMV\STREAM\00000.m2ts"^
-map 0:s:0 -s 1920x1080 -c:s dvdsub -f matroska^
"c:\2001, A SPACE ODYSSEY [1968].mkv"
Next, make idx and sub files. Both are needed for SubtitleEdit.
It takes one or two seconds.
"c:\Program Files\MKVToolNix\mkvextract"^
"c:\2001, A SPACE ODYSSEY [1968].mkv"^
tracks 0:"c:\2001, A SPACE ODYSSEY [1968]"
It would be more efficient to do this:
ffmpeg^
-i "y:\BDMV\STREAM\00000.m2ts"^
-map 0:s:0 -s 1920x1080 -c:s dvdsub^
"c:\2001, A SPACE ODYSSEY [1968].sub"
Unfortunately, that fails:
C:\Windows\System32>ffmpeg^
More? -i "y:\BDMV\STREAM\00000.m2ts"^
More? -map 0:s:0 -s 1920x1080 -c:s dvdsub^
More? "c:\2001, A SPACE ODYSSEY [1968].sub"
ffmpeg version 2025-06-02-git-688f3944ce-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg
developers
built with gcc 15.1.0 (Rev4, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads
--disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lc
ms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib
--enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enabl
e-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2
--enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enab
le-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd
--enable-libzvbi --enable-liboapv --enable-libqrencode --enable-librav1e --enable
-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2
--enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --en
able-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype
--enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidst
ab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2
--enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl
--enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo
--enable-opencl --enable-libcdio --enable-openal --enable-libgme --
enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
--enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --
enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --ena
ble-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr
--enable-chromaprint
libavutil 60. 3.100 / 60. 3.100
libavcodec 62. 3.101 / 62. 3.101
libavformat 62. 0.102 / 62. 0.102
libavdevice 62. 0.100 / 62. 0.100
libavfilter 11. 0.100 / 11. 0.100
libswscale 9. 0.100 / 9. 0.100
libswresample 6. 0.100 / 6. 0.100
[mpegts @ 00000000026e2340] Failed to open codec in avformat_find_stream_info
[mpegts @ 00000000026e2340] start time for stream 9 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 10 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 11 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 12 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 13 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 14 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 15 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 16 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 17 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 18 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 19 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 20 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 21 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 22 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 23 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 24 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 25 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] start time for stream 26 is not set in estimate_timings_from_pts
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 9 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 10 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 11 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 12 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 13 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 14 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 15 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 16 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 17 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 18 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 19 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 20 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 21 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 22 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 23 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 24 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 25 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
[mpegts @ 00000000026e2340] Could not find codec parameters for stream 26 (Subtitle:
hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'y:\BDMV\STREAM\00000.m2ts':
Duration: 02:28:51.68, start: 11.650667, bitrate: 22336 kb/s
Program 1
Stream #0:0[0x1011]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p(progressive), 1920x1080
[SAR 1:1 DAR 16:9], 23.98 fps, 47.95 tbr, 90k tbn, Start 11.650667
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:2[0x1101]: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, 5.1(side), s16, 4608 kb/s,
Start 11.650667
Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:4[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:5[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:6[0x1105]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:7[0x1106]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s, Start
11.650667
Stream #0:8[0x1107]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s, Start
11.650667
Stream #0:9[0x1200]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:10[0x1201]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:11[0x1202]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:12[0x1203]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:13[0x1204]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:14[0x1205]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:15[0x1206]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:16[0x1207]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:17[0x1208]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:18[0x1209]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:19[0x120a]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:20[0x120b]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:21[0x120c]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:22[0x120d]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:23[0x120e]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:24[0x120f]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:25[0x1210]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream #0:26[0x1211]: Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090), Start 11.650667
Stream mapping:
Stream #0:9 -> #0:0 (hdmv_pgs_subtitle (pgssub) -> dvd_subtitle (dvdsub))
Press [q] to stop, [?] for help
[microdvd @ 00000000026ea880] microdvd muxer supports only codec microdvd for type subtitle
[out#0/microdvd @ 00000000027dbb40] Could not write header (incorrect codec parameters ?): Invalid
argument
[sost#0:0/dvdsub @ 00000000026e9d80] Task finished with error code: -22 (Invalid argument)
[sost#0:0/dvdsub @ 00000000026e9d80] Terminating thread with return code -22 (Invalid argument)
[out#0/microdvd @ 00000000027dbb40] Nothing was written into output file, because at least one of
its streams received no packets.
size= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:02:57.80
Conversion failed!
More information about the ffmpeg-user
mailing list