[FFmpeg-devel] [PATCH v20 02/20] avutil/frame: Prepare AVFrame\n for subtitle handling
Daniel Cantarín
canta at canta.com.ar
Mon Dec 13 19:01:41 EET 2021
> the v23_plus set still fails:
>
> ./ffmpeg -ss 20 -i dvbsubtest.ts -filter_complex
> "[0:v][0:s]overlay[v]" -map '[v]' -map 0:a -acodec copy -vcodec mpeg4
> -t 5 -bitexact /tmp/file.avi
>
> Input #0, mpegts, from 'dvbsubtest.ts':
> Duration: 00:00:34.64, start: 79677.098467, bitrate: 4842 kb/s
> Program 1
> Stream #0:0[0x1901](eng): Video: mpeg2video (Main) ([2][0][0][0] /
> 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps,
> 25 tbr, 90k tbn
> Side data:
> cpb: bitrate max/min/avg: 15000000/0/0 buffer size: 1835008
> vbv_delay: N/A
> Stream #0:1[0x19a1](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000
> Hz, stereo, s16p, 256 kb/s
> Stream #0:2[0x19b1](eng): Subtitle: dvb_subtitle ([6][0][0][0] /
> 0x0006)
> Stream mapping:
> Stream #0:0 (mpeg2video) -> overlay
> Stream #0:2 (dvbsub) -> overlay
> overlay:default -> Stream #0:0 (mpeg4)
> Stream #0:1 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> subtitle input filter: decoding size 0x0
> Auto-inserting graphicsub2video filter
> [swscaler @ 0x5608969b4940] Value 0.000000 for parameter 'srcw' out of
> range [1 - 2.14748e+09]
> [swscaler @ 0x5608969b4940] Value 0.000000 for parameter 'srch' out of
> range [1 - 2.14748e+09]
> [swscaler @ 0x5608969b4940] Value 0.000000 for parameter 'dstw' out of
> range [1 - 2.14748e+09]
> [swscaler @ 0x5608969b4940] Value 0.000000 for parameter 'dsth' out of
> range [1 - 2.14748e+09]
> [graphicsub2video @ 0x560896bd7540] [IMGUTILS @ 0x7fff37fbd6d0] Picture
> size 0x0 is invalid
> Error reinitializing filters!
> Failed to inject frame into filter network: Invalid argument
> Error while processing the decoded data for stream #0:0
> Conversion failed!
Can confirm. It's the -ss parameter.
dcantarin at work:/storage/softworkz$ ./ffmpeg -hide_banner -y -i dvb.mp4
-filter_complex "[0:v][0:s]overlay[v]" -map '[v]' -vcodec mpeg4 -t 5
-bitexact file.avi
Input #0, mpegts, from 'dvb.mp4':
Duration: 00:10:00.00, start: 1.400000, bitrate: 99 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0]
/ 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps,
30 tbr, 90k tbn
Stream #0:1[0x101](spa): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream mapping:
Stream #0:0 (h264) -> overlay
Stream #0:1 (dvbsub) -> overlay
overlay:default -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
subtitle input filter: decoding size 1920x1080
Auto-inserting graphicsub2video filter
Output #0, avi, to 'file.avi':
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p(progressive),
1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn
Metadata:
encoder : Lavc mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame= 150 fps= 84 q=31.0 Lsize= 537kB time=00:00:05.00 bitrate=
879.3kbits/s speed=2.79x
video:527kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.752431%
dcantarin at work:/storage/softworkz$ ./ffmpeg -hide_banner -y -ss 20 -i
dvb.mp4 -filter_complex "[0:v][0:s]overlay[v]" -map '[v]' -vcodec mpeg4
-bitexact file.avi
Input #0, mpegts, from 'dvb.mp4':
Duration: 00:10:00.00, start: 1.400000, bitrate: 99 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0]
/ 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps,
30 tbr, 90k tbn
Stream #0:1[0x101](spa): Subtitle: dvb_subtitle ([6][0][0][0] /
0x0006)
Stream mapping:
Stream #0:0 (h264) -> overlay
Stream #0:1 (dvbsub) -> overlay
overlay:default -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
subtitle input filter: decoding size 0x0
Auto-inserting graphicsub2video filter
[swscaler @ 0x55c2155c5480] Value 0.000000 for parameter 'srcw' out of
range [1 - 2.14748e+09]
[swscaler @ 0x55c2155c5480] Value 0.000000 for parameter 'srch' out of
range [1 - 2.14748e+09]
[swscaler @ 0x55c2155c5480] Value 0.000000 for parameter 'dstw' out of
range [1 - 2.14748e+09]
[swscaler @ 0x55c2155c5480] Value 0.000000 for parameter 'dsth' out of
range [1 - 2.14748e+09]
[graphicsub2video @ 0x55c214e67c80] [IMGUTILS @ 0x7ffc6bd4fc90] Picture
size 0x0 is invalid
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
Seems to be situations where graphicsub2video doesn't get
image/frame size. Didn't checked the code yet, just testing.
More information about the ffmpeg-devel
mailing list