[FFmpeg-user] Overlay one subtitle stream and copy another
Hans Carlson
forbyta at inbox.com
Mon Mar 7 06:13:06 CET 2016
I have an mpeg2 with 2 subtitles streams, I'd like to copy the 1st
subtitle stream and overlay the 2nd. When I do this, I get
buffer underflow warnings.
If I remove the overlay filter, there are no warnings.
Am I doing something wrong?
I'd also like to take a different mpeg2 with a single subtitle stream and
both copy AND overlay the same stream. In this case, I'd most likely only
overlay the forced subtitles:
$ ffmpeg -forced_subs_only 1 -i sample.mpg ... -filter_complex '[0:v][0:2]overlay' -f vob test.mpg
I get the same kind of warnings, so I'm wondering if it's for the same
reason. I can provide output for that command if necessary, but it's the
same as the command below except for the addition of "forced_subs_only"
and "0:2" stream in the overlay filter.
$ ffmpeg -i sample.mpg -map 0:0 -map 0:1 -map 0:2 -codec:v mpeg2video -b:v 16384k -bufsize 4096k -maxrate 30000k -codec:a copy -codec:s copy -filter_complex '[0:v][0:3]overlay' -f vob test.mpg
ffmpeg version N-78949-g6f5048f 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. 27.101 / 57. 27.101
libavformat 57. 28.100 / 57. 28.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 39.100 / 6. 39.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mpeg, from 'sample.mpg':
Duration: 00:00:21.98, start: 0.507000, bitrate: 6883 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, max. 9800 kb/s, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream #0:2[0x20]: Subtitle: dvd_subtitle
Stream #0:3[0x21]: Subtitle: dvd_subtitle
[mpeg @ 0x1e947c0] sub2video: using 720x480 canvas
Output #0, vob, to 'test.mpg':
Metadata:
encoder : Lavf57.28.100
Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 16384 kb/s, 29.97 fps, 90k tbn, 29.97 tbc (default)
Metadata:
encoder : Lavc57.27.101 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), 448 kb/s
Stream #0:2: Subtitle: dvd_subtitle
Stream mapping:
Stream #0:0 (mpeg2video) -> overlay:main
Stream #0:3 (dvdsub) -> overlay:overlay
overlay -> Stream #0:0 (mpeg2video)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
[Parsed_overlay_0 @ 0x1e9d020] [framesync @ 0x1f6d048] Buffer queue overflow, dropping. drop=0 speed=7.15x
Last message repeated 27 times
[Parsed_overlay_0 @ 0x1e9d020] [framesync @ 0x1f6d048] Buffer queue overflow, dropping. drop=0 speed=8.17x
Last message repeated 150 times
frame= 660 fps=281 q=2.0 Lsize= 5664kB time=00:00:21.98 bitrate=2110.2kbits/s dup=312 drop=0 speed=9.37x
video:4371kB audio:1202kB subtitle:5kB other streams:0kB global headers:0kB muxing overhead: 1.529098%
More information about the ffmpeg-user
mailing list