[FFmpeg-user] PGS Subtitles stream copy problem

Hans Carlson forbyta at inbox.com
Thu Mar 17 03:43:55 CET 2016


On Wed, 16 Mar 2016, Carl Eugen Hoyos wrote:

> Hans Carlson <forbyta <at> inbox.com> writes:
>
>> When I last tried to convert PGS to dvdsubs, I found the subtitles were
>> converted, but when played, none of the subtitles would disappear.
>
> How can I reproduce this?
> I don't think you provided a sample...

Are you asking for a sample command or a sample video clip?

If you're just asking for the command I used, see below.

If you want a sample video, I can try to provide one... although the 1 min 
sample used below is 250MB.    If you want something smaller and/or 
shorter I can see if I can dd a chunk out of that sample that still 
includes multiple subtitles and shows the behavior.  Please let me know if 
that's what you want.


$ ffmpeg -analyzeduration 100M -probesize 100M -i sample.m2ts -map 0:0 -map 0:1 -map 0:5 -codec:v mpeg2video -b:v 16384k -bufsize 4096k -maxrate 30000k -codec:a ac3 -b:a 448k -ar 48000 -codec:s dvdsub -f vob sample.mpg
ffmpeg version N-79067-g06267af Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
   configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-x11grab --disable-ffplay --disable-ffserver
   libavutil      55. 19.100 / 55. 19.100
   libavcodec     57. 28.103 / 57. 28.103
   libavformat    57. 28.102 / 57. 28.102
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 39.102 /  6. 39.102
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 12: packet 28 with DTS 1981221, packet 29 with DTS 2099552
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 16: packet 28 with DTS 1981207, packet 29 with DTS 2099567
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 14: packet 28 with DTS 1981205, packet 29 with DTS 2099569
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 13: packet 28 with DTS 1981183, packet 29 with DTS 2099591
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 6: packet 4 with DTS 1831051, packet 5 with DTS 2279753
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 11: packet 60 with DTS 2731962, packet 61 with DTS 2880342
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 5: packet 4 with DTS 2792023, packet 5 with DTS 2936646
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 6: packet 12 with DTS 2792005, packet 13 with DTS 2936665
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 7: packet 4 with DTS 2792003, packet 5 with DTS 2936666
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 9: packet 4 with DTS 2792003, packet 5 with DTS 2936666
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 8: packet 4 with DTS 2791996, packet 5 with DTS 2936673
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 10: packet 4 with DTS 2791996, packet 5 with DTS 2936673
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 10: packet 20 with DTS 3084820, packet 21 with DTS 3210667
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 5: packet 20 with DTS 3084818, packet 21 with DTS 3210669
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 7: packet 20 with DTS 3084816, packet 21 with DTS 3210671
[mpegts @ 0x1c5e7e0] DTS discontinuity in stream 8: packet 20 with DTS 3084812, packet 21 with DTS 3210674
[NULL @ 0x1c89640] start time for stream 17 is not set in estimate_timings_from_pts
[NULL @ 0x1c8a200] start time for stream 18 is not set in estimate_timings_from_pts
[mpegts @ 0x1c5e7e0] PES packet size mismatch
     Last message repeated 3 times
[mpegts @ 0x1c5e7e0] Could not find codec parameters for stream 17 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x1c5e7e0] Could not find codec parameters for stream 18 (Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'sample.m2ts':
   Duration: 00:00:59.52, start: 11.650667, bitrate: 35235 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
     Stream #0:1[0x1100]: Audio: dts (DTS-HD HRA) ([133][0][0][0] / 0x0085), 48000 Hz, 7.1, fltp
     Stream #0:2[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 640 kb/s
     Stream #0:3[0x1102]: Audio: dts (DTS) ([130][0][0][0] / 0x0082), 48000 Hz, 5.1(side), fltp, 1536 kb/s
     Stream #0:4[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
     Stream #0:5[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:6[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:7[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:8[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:9[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:10[0x1205]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:11[0x1206]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:12[0x1207]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:13[0x1208]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:14[0x1209]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:15[0x120a]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:16[0x120b]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
     Stream #0:17[0x120c]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
     Stream #0:18[0x120d]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
Output #0, vob, to 'sample.mpg':
   Metadata:
     encoder         : Lavf57.28.102
     Stream #0:0: Video: mpeg2video (Main), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 16384 kb/s, 23.98 fps, 90k tbn, 23.98 tbc
     Metadata:
       encoder         : Lavc57.28.103 mpeg2video
     Side data:
       cpb: bitrate max/min/avg: 30000000/0/16384000 buffer size: 4096000 vbv_delay: -1
     Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
     Metadata:
       encoder         : Lavc57.28.103 ac3
     Stream #0:2: Subtitle: dvd_subtitle (dvdsub), 1920x1080
     Metadata:
       encoder         : Lavc57.28.103 dvdsub
Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> mpeg2video (native))
   Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))
   Stream #0:5 -> #0:2 (hdmv_pgs_subtitle (pgssub) -> dvd_subtitle (dvdsub))
Press [q] to stop, [?] for help
[mpegts @ 0x1c5e7e0] PES packet size mismatche=00:00:58.18 bitrate=12079.0kbits/s speed=2.04x
[dca @ 0x1d2ea20] Failed to decode block code(s)
Error while decoding stream #0:1: Invalid data found when processing input
frame= 1429 fps= 49 q=2.0 Lsize=   87302kB time=00:00:59.55 bitrate=12007.8kbits/s dup=1 drop=0 speed=2.05x
video:82868kB audio:3218kB subtitle:129kB other streams:0kB global headers:0kB muxing overhead: 1.260718%


More information about the ffmpeg-user mailing list