[FFmpeg-trac] #2397(undetermined:new): Burn a selected picture based subtitle into video lost most part of the selected subtitle in the result video
FFmpeg
trac at avcodec.org
Sun Mar 24 11:10:00 CET 2013
#2397: Burn a selected picture based subtitle into video lost most part of the
selected subtitle in the result video
-------------------------------------+-------------------------------------
Reporter: littlebat | Type: defect
Status: new | Priority: important
Component: | Version: git-
undetermined | master
Keywords: burn | Blocked By:
subtitle | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
I am trying burn a selected picture based subtitle into video according to
the guide in ffmpeg wiki page: "How to burn subtitles into the video" :
http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20burn%20subtitles%20into%20the%20video
. But, the most part of the selected subtitle disappeared in the result
video.
The command line I used:
/opt/ffmpeggit/bin/ffmpeg -ss 240 -i CD1.mkv -filter_complex
'[0:v][0:s:1]overlay[v]' -map [v] -map 0:a -c:v mpeg4 -b:v 1024k -c:a
libmp3lame -async 1 -t 10 240_10_s_1.mkv
But, in this section from 240 second to 250 second, no subtitle be burned
into video. I can use "mplayer -sid 1 -ss 240 -endpos 10 CD1.mkv" to
confirm the selected subtitle is in this section of input file.
The console output as below (cuted the trival output, marked as
"[omit...]" below):
mdx at debian:~/test$ /opt/ffmpeggit/bin/ffmpeg -ss 240 -i CD1.mkv
-filter_complex '[0:v][0:s:1]overlay[v]' -map [v] -map 0:a -c:v mpeg4 -b:v
1024k -c:a libmp3lame -async 1 -t 10 240_10_s_1.mkv
ffmpeg version N-51166-g4331484 Copyright (c) 2000-2013 the FFmpeg
developers
built on Mar 21 2013 08:50:03 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --prefix=/opt/ffmpeggit --enable-static --disable-shared
--enable-gpl --enable-version3 --enable-nonfree --enable-fontconfig
--enable-libass --enable-libfreetype --enable-swscale --enable-postproc
--enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libopenjpeg --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --extra-
cflags=-I/opt/custom/include --extra-ldflags=-L/opt/custom/lib
libavutil 52. 22.100 / 52. 22.100
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'CD1.mkv':
Metadata:
creation_time : 2009-09-01 23:53:41
Duration: 01:08:31.01, start: 0.000000, bitrate: 3018 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 720x480, SAR 1:1 DAR 3:2,
29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
(default)
Stream #0:2(fre): Subtitle: dvd_subtitle (default)
Stream #0:3(chi): Subtitle: dvd_subtitle
Stream #0:4(chi): Subtitle: dvd_subtitle
-async is forwarded to lavfi similarly to -af
aresample=async=1:min_hard_comp=0.100000:first_pts=0.
Output #0, matroska, to '240_10_s_1.mkv':
Metadata:
encoder : Lavf55.0.100
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x480 [SAR
1:1 DAR 3:2], q=2-31, 1024 kb/s, 1k tbn, 29.97 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp
(default)
Stream mapping:
Stream #0:0 (h264) -> overlay:main (graph 0)
Stream #0:3 (dvdsub) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (mpeg4)
Stream #0:1 -> #0:1 (dca -> libmp3lame)
Press [q] to stop, [?] for help
frame= 2 fps=1.9 q=2.0 size= 33kB time=00:00:00.14
bitrate=1843.3kbits/sframe= 5 fps=3.2 q=2.0 size= 65kB
time=00:00:00.26 bitrate=1997.8kbits/sframe= 11 fps=5.4 q=4.4 size=
129kB time=00:00:00.40 bitrate=2576.3kbits/sframe= 16 fps=6.3 q=4.4
size= 180kB
[omit...]
frame= 300 fps=9.3 q=7.5 size= 1534kB time=00:00:10.01
bitrate=1255.8kbits/sframe= 300 fps=9.2 q=7.5 Lsize= 1559kB
time=00:00:10.01 bitrate=1275.8kbits/s dup=0 drop=25
video:1396kB audio:157kB subtitle:0 global headers:0kB muxing overhead
0.405373%
mdx at debian:~/test$
The input file information:
mdx at debian:~/test$ /opt/ffmpeggit/bin/ffmpeg -v 9 -loglevel 99 -i CD1.mkv
ffmpeg version N-51166-g4331484 Copyright (c) 2000-2013 the FFmpeg
developers
built on Mar 21 2013 08:50:03 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --prefix=/opt/ffmpeggit --enable-static --disable-shared
--enable-gpl --enable-version3 --enable-nonfree --enable-fontconfig
--enable-libass --enable-libfreetype --enable-swscale --enable-postproc
--enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libopenjpeg --enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --extra-
cflags=-I/opt/custom/include --extra-ldflags=-L/opt/custom/lib
libavutil 52. 22.100 / 52. 22.100
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set libav* logging level)
with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav*
logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'CD1.mkv'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set libav* logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file CD1.mkv.
Successfully parsed a group of options.
Opening an input file: CD1.mkv.
[matroska,webm @ 0xa7a8800] Format matroska,webm probed with size=2048 and
score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
st:3 removing common factor 1000000 from timebase
st:4 removing common factor 1000000 from timebase
[matroska,webm @ 0xa7a8800] File position before
avformat_find_stream_info() is 6873
[dvdsub @ 0xa7aaf40] palette: 0x000000 0x1f1f1f 0xffffff 0xe63f07 0x7e7e7e
0xbebebe 0x14bef3 0xea12eb 0xfaff1a 0x000070 0x067506 0x731f03 0x095f78
0x750975 0x7c950b 0xffffff
[dvdsub @ 0xa7ab720] palette: 0x000000 0x1f1f1f 0xffffff 0xe63f07 0x7e7e7e
0xbebebe 0x14bef3 0xea12eb 0xfaff1a 0x000070 0x067506 0x731f03 0x095f78
0x750975 0x7c950b 0xffffff
[dvdsub @ 0xa7abf20] palette: 0x000000 0x1f1f1f 0xffffff 0xe63f07 0x7e7e7e
0xbebebe 0x14bef3 0xea12eb 0xfaff1a 0x000070 0x067506 0x731f03 0x095f78
0x750975 0x7c950b 0xffffff
[h264 @ 0xa7aa440] Using externally provided dimensions
[h264 @ 0xa7aa440] no picture
[dca @ 0xa7aa9c0] Stream with high frequencies VQ coding
[matroska,webm @ 0xa7a8800] All info found
[matroska,webm @ 0xa7a8800] File position after
avformat_find_stream_info() is 39890
Input #0, matroska,webm, from 'CD1.mkv':
Metadata:
creation_time : 2009-09-01 23:53:41
Duration: 01:08:31.01, start: 0.000000, bitrate: 3018 kb/s
Stream #0:0, 3, 1/1000: Video: h264 (High), yuv420p, 720x480,
333667/20000000, SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
(default)
Stream #0:1, 16, 1/1000: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp,
1536 kb/s (default)
Stream #0:2(fre), 0, 1/1000: Subtitle: dvd_subtitle (default)
Stream #0:3(chi), 0, 1/1000: Subtitle: dvd_subtitle
Stream #0:4(chi), 0, 1/1000: Subtitle: dvd_subtitle
Successfully opened the file.
At least one output file must be specified
Statistics: 65536 bytes read, 0 seeks
mdx at debian:~/test$
But, it seems a little part of the video can be burned the same selected
subtitle into result video normally, for example, from 395 senconds to 405
seconds:
/opt/ffmpeggit/bin/ffmpeg -ss 395 -i CD1.mkv -filter_complex
'[0:v][0:s:1]overlay[v]' -map [v] -map 0:a -c:v mpeg4 -b:v 1024k -c:a
libmp3lame -async 1 -t 10 395_10_s_1.mkv
Attachments:
1, Input file sample: "CD1_10M.mkv" (created by: dd if=CD1.mkv
of=CD1_10M.mkv bs=1024 count=10000), also, for research purpose, you can
download the entire file via emule:
ed2k://|file|[%E5%B7%B4%E9%BB%8E%E5%9C%A3%E6%AF%8D%E9%99%A2].Notre.Dame.de.Paris.1999.DVDrip.x264.DTS.by.writeclay.CD1.mkv|1551161470|1E41A8E6CC648AF4BEF5D16A5F673B59|/
2, The part can't burn the selected subtitle: "240_10.mkv" (created by:
/opt/ffmpeggit/bin/ffmpeg -ss 240 -i CD1.mkv -c copy -map 0:0 -map 0:1
-map 0:2 -map 0:3 -map 0:4 -async 1 -t 10 240_10.mkv);
3, The part can burn the selected subtitle: "395_10.mkv" (created by:
/opt/ffmpeggit/bin/ffmpeg -ss 395 -i CD1.mkv -c copy -map 0:0 -map 0:1
-map 0:2 -map 0:3 -map 0:4 -async 1 -t 10 395_10.mkv).
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2397>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list