Opened 9 years ago
Closed 9 years ago
#4744 closed defect (fixed)
ffmpeg does not scale subtitles
Reported by: | Carl Eugen Hoyos | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | git-master | Keywords: | sub |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
The samples from ticket #679 show the subtitles correctly with FFplay, but they are no automatically scaled with ffmpeg.
$ ffmpeg -canvas_size 720x576 -i subtitles.ts -filter_complex [0:0][0:3]overlay -qscale 2 out.avi ffmpeg version N-74140-g6c87b86 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --enable-libzvbi libavutil 54. 29.100 / 54. 29.100 libavcodec 56. 56.101 / 56. 56.101 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 30.100 / 5. 30.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 [mpeg2video @ 0x3613fc0] Invalid frame dimensions 0x0. Last message repeated 10 times [NULL @ 0x3618a80] start time for stream 2 is not set in estimate_timings_from_pts [mpegts @ 0x35f0360] PES packet size mismatch [mpegts @ 0x35f0360] Could not find codec parameters for stream 2 (Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels, s16p): unspecified frame size Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x35f0360] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x35f0360] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x35f0360] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options [mpegts @ 0x35f0360] Could not find codec parameters for stream 7 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from 'subtitles.ts': Duration: 00:00:09.21, start: 11318.457333, bitrate: 2223 kb/s Program 8270 Metadata: service_name : ITV1 service_provider: ITV Program 8325 Metadata: service_name : ITV2 service_provider: ITV Program 8634 Metadata: service_name : Rabbit service_provider: Teletext Limited Program 8384 Metadata: service_name : Channel 4 service_provider: Channel 4 TV Program 8448 Metadata: service_name : E4 service_provider: Channel 4 TV Program 8442 Metadata: service_name : More 4 service_provider: Channel 4 TV Stream #0:0[0x24e]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 544x576 [SAR 32:17 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x24f](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s Stream #0:2[0x250](eng): Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels, s16p (visual impaired) Stream #0:3[0x251](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:4[0x84f]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:5[0x911]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:6[0x912]: Unknown: none ([11][0][0][0] / 0x000B) Stream #0:7[0xbbb]: Unknown: none ([11][0][0][0] / 0x000B) Program 8452 Metadata: service_name : Channel 4+1 service_provider: Channel 4 TV Program 8577 Metadata: service_name : Gay Rabbit service_provider: Teletext Limited Program 8500 Metadata: service_name : Channel 5 service_provider: five Program 8370 Metadata: service_name : ITV1 +1 service_provider: ITV Please use -q:a or -q:v, -qscale is ambiguous Output #0, avi, to 'out.avi': Metadata: ISFT : Lavf56.40.101 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 544x576 [SAR 32:17 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: encoder : Lavc56.56.101 mpeg4 Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s Metadata: encoder : Lavc56.56.101 ac3 Stream mapping: Stream #0:0 (mpeg2video) -> overlay:main (graph 0) Stream #0:3 (dvbsub) -> overlay:overlay (graph 0) overlay (graph 0) -> Stream #0:0 (mpeg4) Stream #0:1 -> #0:1 (mp2 (native) -> ac3 (native)) Press [q] to stop, [?] for help [mpegts @ 0x35f0360] PES packet size mismatche=00:00:07.88 bitrate=3515.2kbits/s [mpeg2video @ 0x365a080] ac-tex damaged at 11 25 [mpeg2video @ 0x365a080] Warning MVs not available [mpeg2video @ 0x365a080] concealing 374 DC, 374 AC, 374 MV errors in I frame Past duration 0.743889 too large frame= 198 fps=0.0 q=2.0 Lsize= 4318kB time=00:00:09.24 bitrate=3828.2kbits/s video:4100kB audio:196kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.498193%
$ ffmpeg -i BDAV\ recorded\ video\ sample.ts -filter_complex [0:0][0:3]overlay -qscale 2 out.avi ffmpeg version N-74140-g6c87b86 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --enable-libzvbi libavutil 54. 29.100 / 54. 29.100 libavcodec 56. 56.101 / 56. 56.101 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 30.100 / 5. 30.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 [h264 @ 0x1c637a0] non-existing SPS 0 referenced in buffering period [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] non-existing SPS 0 referenced in buffering period [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] no frame! ... [h264 @ 0x1c637a0] non-existing SPS 0 referenced in buffering period [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] non-existing SPS 0 referenced in buffering period [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] non-existing PPS 0 referenced [h264 @ 0x1c637a0] decode_slice_header error [h264 @ 0x1c637a0] no frame! [mpegts @ 0x1c5d360] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, mpegts, from 'BDAV recorded video sample.ts': Duration: 00:00:44.83, start: 47323.752122, bitrate: 4616 kb/s Program 82 Metadata: service_name : J2 service_provider: TVB Stream #0:0[0x335]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x336]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s Stream #0:2[0x337]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s Stream #0:3[0x339](CHI): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:4[0x3e9]: Unknown: none ([11][0][0][0] / 0x000B) Program 83 Metadata: service_name : iNews service_provider: TVB Program 85 Metadata: service_name : High Definition Jade service_provider: TVB Please use -q:a or -q:v, -qscale is ambiguous [mpegts @ 0x1c5d360] sub2video: using 1920x1080 canvas Output #0, avi, to 'out.avi': Metadata: ISFT : Lavf56.40.101 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: encoder : Lavc56.56.101 mpeg4 Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s Metadata: encoder : Lavc56.56.101 ac3 Stream mapping: Stream #0:0 (h264) -> overlay:main (graph 0) Stream #0:3 (dvbsub) -> overlay:overlay (graph 0) overlay (graph 0) -> Stream #0:0 (mpeg4) Stream #0:1 -> #0:1 (ac3 (native) -> ac3 (native)) Press [q] to stop, [?] for help [h264 @ 0x2dc88c0] error while decoding MB 38 4, bytestream -8rate=10554.1kbits/s [h264 @ 0x2dc88c0] concealing 7691 DC, 7691 AC, 7691 MV errors in P frame Past duration 0.760826 too large 56590kB time=00:00:44.68 bitrate=10375.6kbits/s frame= 1089 fps= 68 q=2.0 Lsize= 57117kB time=00:00:44.88 bitrate=10425.6kbits/s video:56021kB audio:1027kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.120315%
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in 21566b21d57ec9d8b0a40160e3e19c6970a813f7, 4ada49f9dbed6ab1a84cf2d79f0e8b5e549b0b6a, bd5d11d9f5fdfb5d639a182a97b84ae08af16fc0, 72237ef6e933527be7855cb266a2a4df4dcb8096
To scale subtitles to the same as the video there now exists the scale2ref filter
Note:
See TracTickets
for help on using tickets.
Same problem here, DVB-subtitle layer does not scale.
Sample file available here: https://www.dropbox.com/s/4voq6p56bv2l4to/sample.ts?dl=0
File is a clipped DVBLink recorded TVshow, a transponder file.
Console output:
BTW, that "too large" error and crash did not happen on a build I downloaded 3 days ago, it is not part of this reported problem so lets just ignore it for now.