Quantcast

Burning DVD subtitles into video using overlay filter not working

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Burning DVD subtitles into video using overlay filter not working

Thierry Lelegard
Hello all,

Sorry, yet another "subtitles" + "not working" topic ;-)

I have read the manual and a lot of posts about burning DVD subtitles into
the video stream using the overlay filter. I cannot make it work on a small
file. To make it clear, I want to remove the subtitles as an independent
stream and I want to burn/hardcode/encrust/whatever the subtitles into the
video images.

I have a small Matroska file (20 seconds) with one video stream, one audio
stream and one DVD subtitle stream:

Stream #0:0: Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
Stream #0:2: Subtitle: dvd_subtitle (default)

The subtitles are correctly displayed when the file is played using vlc
and mplayer. So, I assume that the subtitles data are correct.

To make a test, I try to burn the subtitles into the video using the following
command (full output at end of mail).

ffmpeg -i f.mkv -filter_complex "[0:v][0:s]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y f.hardsubs.mpg

It seems the simplest possible command to do. Please don't comment on video
quality, it is just a test to see if the subtitles are burnt into the video.
The resulting video does not contain subtitles.

I tried explicit x,y placement in the overlay and other options without more luck.

Any idea? So many people report successful DVD subtitles processing using
that type of command. What could be wrong?

Thanks in advance.
-Thierry

Full command output:
$ ffmpeg -i f.mkv -filter_complex "[0:v][0:s]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y f.hardsubs.mpg
ffmpeg version N-55753-g88909be Copyright (c) 2000-2013 the FFmpeg developers
  built on Aug 24 2013 21:47:18 with gcc 4.7.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 42.100 / 52. 42.100
  libavcodec     55. 29.100 / 55. 29.100
  libavformat    55. 14.102 / 55. 14.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.102 /  3. 82.102
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from 'f.mkv':
  Metadata:
    ENCODER         : Lavf55.14.102
  Duration: 00:00:23.00, start: 0.000000, bitrate: 5539 kb/s
    Chapter #0.0: start 0.000000, end 20.000000
    Stream #0:0: Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
    Stream #0:2: Subtitle: dvd_subtitle (default)
[mpeg @ 00000000026aed20] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'f.hardsubs.mpg':
  Metadata:
    encoder         : Lavf55.14.102
    Chapter #0.0: start 0.000000, end 20.000000
    Stream #0:0: Video: mpeg2video, yuv420p, 1280x536 [SAR 1:1 DAR 160:67], q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
    Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default)
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:2 (dvdsub) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (mpeg2video)
  Stream #0:1 -> #0:1 (dca -> mp2)
Press [q] to stop, [?] for help
frame=  483 fps= 80 q=31.0 Lsize=    2188kB time=00:00:20.10 bitrate= 891.6kbits/s dup=15 drop=0    
video:1866kB audio:303kB subtitle:0 global headers:0kB muxing overhead 0.877978%
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Paul B Mahol
On 8/29/13, Thierry Lelegard <[hidden email]> wrote:
> Hello all,
>
> Sorry, yet another "subtitles" + "not working" topic ;-)
>
> I have read the manual and a lot of posts about burning DVD subtitles into
> the video stream using the overlay filter. I cannot make it work on a small

What manual tells that for burning subtitles one should use overlay filter?

> file. To make it clear, I want to remove the subtitles as an independent
> stream and I want to burn/hardcode/encrust/whatever the subtitles into the
> video images.
>
> I have a small Matroska file (20 seconds) with one video stream, one audio
> stream and one DVD subtitle stream:
>
> Stream #0:0: Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67],
> 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
> Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
> (default)
> Stream #0:2: Subtitle: dvd_subtitle (default)
>
> The subtitles are correctly displayed when the file is played using vlc
> and mplayer. So, I assume that the subtitles data are correct.
>
> To make a test, I try to burn the subtitles into the video using the
> following
> command (full output at end of mail).
>
> ffmpeg -i f.mkv -filter_complex "[0:v][0:s]overlay" -codec:v mpeg2video
> -codec:a mp2 -ac 2 -y f.hardsubs.mpg

This can not work as overlay filter forks with video frames only.

>
> It seems the simplest possible command to do. Please don't comment on video
> quality, it is just a test to see if the subtitles are burnt into the
> video.
> The resulting video does not contain subtitles.
>
> I tried explicit x,y placement in the overlay and other options without more
> luck.
>
> Any idea? So many people report successful DVD subtitles processing using
> that type of command. What could be wrong?

Perhaps you should start reading documentation.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Nicolas George-2
In reply to this post by Thierry Lelegard
Le duodi 12 fructidor, an CCXXI, Thierry Lelegard a écrit :
> It seems the simplest possible command to do. Please don't comment on video
> quality, it is just a test to see if the subtitles are burnt into the video.
> The resulting video does not contain subtitles.

It should be working. I suggest three steps to understand how it fails:

First, use -loglevel debug and look at the "palette:" lines: maybe the
subtitles are completely transparent.

Second, add a showinfo filter after the subtitles input, something like
that:

  [0:s]ashowinfo[s];[0:v][s]overlay

That way, you can see if subtitles packets arrive.

Third, extract the subtitles track with mkvextract, and look at the index,
especially the size, the palette, etc.

Please ignore Paul's comment, he is mistaken.

Regards,

--
  Nicolas George

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Paul B Mahol
On 8/29/13, Nicolas George <[hidden email]> wrote:

> Le duodi 12 fructidor, an CCXXI, Thierry Lelegard a ecrit :
>> It seems the simplest possible command to do. Please don't comment on
>> video
>> quality, it is just a test to see if the subtitles are burnt into the
>> video.
>> The resulting video does not contain subtitles.
>
> It should be working. I suggest three steps to understand how it fails:
>
> First, use -loglevel debug and look at the "palette:" lines: maybe the
> subtitles are completely transparent.
>
> Second, add a showinfo filter after the subtitles input, something like
> that:
>
>   [0:s]ashowinfo[s];[0:v][s]overlay
>
> That way, you can see if subtitles packets arrive.
>
> Third, extract the subtitles track with mkvextract, and look at the index,
> especially the size, the palette, etc.
>
> Please ignore Paul's comment, he is mistaken.

Its first time I heard that bitmap subtitles are supported.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Thierry Lelégard
In reply to this post by Nicolas George-2
Thanks for the troubleshooting steps.

I tried all three steps and they all seem to indicate that the subtitles
do exist and are not transparent. See below.

As I mentioned in my original post, both vlc and mplayer correctly display
the subtitles which are white with outline.

If you are interested, the video file (20 seconds, 15 MB) is accessible at
http://dl.free.fr/kHF1KGkZ7

Le 29/08/2013 19:33, Nicolas George a écrit :

> Le duodi 12 fructidor, an CCXXI, Thierry Lelegard a écrit :
>> It seems the simplest possible command to do. Please don't comment on video
>> quality, it is just a test to see if the subtitles are burnt into the video.
>> The resulting video does not contain subtitles.
> It should be working. I suggest three steps to understand how it fails:
>
> First, use -loglevel debug and look at the "palette:" lines: maybe the
> subtitles are completely transparent.

Got the following. See the full output at the end of the mail.

[dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb

The subtitles are not transparent.

> Second, add a showinfo filter after the subtitles input, something like
> that:
>
>    [0:s]ashowinfo[s];[0:v][s]overlay
>
> That way, you can see if subtitles packets arrive.

I guess you mean "showinfo", not "ashowinfo", this is not audio.
Got the following. Again, see the full output at the end of the mail.

[Parsed_showinfo_0 @ 0000000000351160] n:0 pts:0 pts_time:0 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:1 pts:587 pts_time:0.587 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:2 pts:926 pts_time:0.926 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
....

So, the packets are seen by the filter chain. I am not sure how to interpret
some of those values.

> Third, extract the subtitles track with mkvextract, and look at the index,
> especially the size, the palette, etc.

$ mkvextract tracks gg.mkv 2:gg.sub
Extracting track 2 with the CodecID 'S_VOBSUB' to the file 'gg.sub'. Container format: VobSubs
Writing the VobSub index file 'gg.idx'.
Progress: 100%

The content of the index is:

# VobSub index file, v7 (do not modify this line!)
size: 1920x1080
org: 0, 0
scale: 100%, 100%
alpha: 100%
smooth: OFF
fadein/out: 0, 0
align: OFF at LEFT TOP
time offset: 0
forced subs: OFF
palette: 000000, f0f0f0, cccccc, 999999, 3333fa, 1111bb, fa3333, bb1111, 33fa33, 11bb11, fafa33, bbbb11, fa33fa, bb11bb, 33fafa, 11bbbb
custom colors: OFF, tridx: 1000, colors: 000000, 444444, 888888, cccccc

id: en, index: 0
timestamp: 00:00:00:000, filepos: 000000000
timestamp: 00:00:05:720, filepos: 000002800
timestamp: 00:00:12:200, filepos: 000004800
timestamp: 00:00:18:400, filepos: 000006800

Again, there is something to see in the subtitles.

> Please ignore Paul's comment, he is mistaken.

No problem ;) Just try Google with "ffmpeg overlay burn dvd subtitles" and you
will see many posts which indicate (after some hard tries) that the overlay
filter is successfully used to burn DVD subtitles. Concerning the manual, I
simply mean the ffmpeg manual about the overlay filter. But I agree that the
manual does not mention DVD subtitles specifically in the overlay section.

> Regards,

Full commands output:
--------------------------------------------------------------------------------------------

$ ffmpeg -loglevel debug -nostats -i gg.mkv -filter_complex "[0:v][0:s]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y gg.hardsubs.mpg
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
   built on Mar 28 2013 00:34:08 with gcc 4.8.0 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      52. 18.100 / 52. 18.100
   libavcodec     54. 92.100 / 54. 92.100
   libavformat    54. 63.104 / 54. 63.104
   libavdevice    54.  3.103 / 54.  3.103
   libavfilter     3. 42.103 /  3. 42.103
   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 '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-nostats' ... matched as option 'stats' (print progress report during encoding) with argument 0.
Reading option '-i' ... matched as input file with argument 'gg.mkv'.
Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:v][0:s]overlay'.
Reading option '-codec:v' ... matched as option 'codec' (codec name) with argument 'mpeg2video'.
Reading option '-codec:a' ... matched as option 'codec' (codec name) with argument 'mp2'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'gg.hardsubs.mpg' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Applying option nostats (print progress report during encoding) with argument 0.
Applying option filter_complex (create a complex filtergraph) with argument [0:v][0:s]overlay.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file gg.mkv.
Successfully parsed a group of options.
Opening an input file: gg.mkv.
[matroska,webm @ 000000000222b900] 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
[matroska,webm @ 000000000222b900] File position before avformat_find_stream_info() is 1094
[dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb
[h264 @ 00000000021bae60] no picture
[dca @ 0000000002227fe0] Stream with high frequencies VQ coding
[matroska,webm @ 000000000222b900] All info found
[matroska,webm @ 000000000222b900] File position after avformat_find_stream_info() is 85246
Input #0, matroska,webm, from 'gg.mkv':
   Metadata:
     ENCODER         : Lavf55.14.102
   Duration: 00:00:23.00, start: 0.000000, bitrate: 5539 kb/s
     Chapter #0.0: start 0.000000, end 20.000000
     Stream #0:0, 3, 1/1000: Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 104271/5000000, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Stream #0:1, 1, 1/1000: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
     Stream #0:2, 1, 1/1000: Subtitle: dvd_subtitle (default)
Successfully opened the file.
Parsing a group of options: output file gg.hardsubs.mpg.
Applying option codec:v (codec name) with argument mpeg2video.
Applying option codec:a (codec name) with argument mp2.
Applying option ac (set number of audio channels) with argument 2.
Successfully parsed a group of options.
Opening an output file: gg.hardsubs.mpg.
[buffer @ 00000000021b8240] Setting entry with key 'video_size' to value '1280x536'
[buffer @ 00000000021b8240] Setting entry with key 'pix_fmt' to value '0'
[buffer @ 00000000021b8240] Setting entry with key 'time_base' to value '1/1000'
[buffer @ 00000000021b8240] Setting entry with key 'pixel_aspect' to value '1/1'
[buffer @ 00000000021b8240] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 00000000021b8240] Setting entry with key 'frame_rate' to value '13978/583'
[graph 0 input from stream 0:0 @ 00000000022412a0] w:1280 h:536 pixfmt:yuv420p tb:1/1000 fr:13978/583 sar:1/1 sws_param:flags=2
[buffer @ 00000000021b7940] Setting entry with key 'video_size' to value '1920x1080'
[buffer @ 00000000021b7940] Setting entry with key 'pix_fmt' to value '30'
[buffer @ 00000000021b7940] Setting entry with key 'time_base' to value '1/1000'
[buffer @ 00000000021b7940] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 00000000021b7940] Setting entry with key 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:2 @ 0000000002240e20] w:1920 h:1080 pixfmt:bgra tb:1/1000 fr:0/1 sar:0/1 sws_param:flags=2
Successfully opened the file.
[scale @ 0000000002229b20] Setting 'w' to value '0'
[scale @ 0000000002229b20] Setting 'h' to value '0'
[auto-inserted scaler 0 @ 0000000002240d80] w:0 h:0 flags:'' interl:0
[Parsed_overlay_0 @ 0000000002241200] auto-inserting filter 'auto-inserted scaler 0' between the filter 'graph 0 input from stream 0:2' and the filter 'Parsed_overlay_0'
[auto-inserted scaler 0 @ 0000000002240d80] w:1920 h:1080 fmt:bgra sar:0/1 -> w:1920 h:1080 fmt:yuva420p sar:0/1 flags:0x2
[Parsed_overlay_0 @ 0000000002241200] main w:1280 h:536 fmt:yuv420p overlay x:0 y:0 w:1920 h:1080 fmt:yuva420p
[Parsed_overlay_0 @ 0000000002241200] Overlay area with coordinates x1:0 y1:0 x2:1920 y2:1080 is not completely contained within the output with size 1280x536
[abuffer @ 00000000021bd4c0] Setting entry with key 'time_base' to value '1/48000'
[abuffer @ 00000000021bd4c0] Setting entry with key 'sample_rate' to value '48000'
[abuffer @ 00000000021bd4c0] Setting entry with key 'sample_fmt' to value 'fltp'
[abuffer @ 00000000021bd4c0] Setting entry with key 'channel_layout' to value '0x60f'
[graph 1 input from stream 0:1 @ 0000000002240640] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[aformat @ 00000000021bf040] Setting entry with key 'sample_fmts' to value 's16'
[aformat @ 00000000021bf040] Setting entry with key 'sample_rates' to value '44100,48000,32000,22050,24000,16000'
[aformat @ 00000000021bf040] Setting entry with key 'channel_layouts' to value '0x3'
[audio format for output stream 0:1 @ 0000000002240520] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
0.414214 0.000000 0.292893 0.000000 0.292893 0.000000
0.000000 0.414214 0.292893 0.000000 0.000000 0.292893
[auto-inserted resampler 0 @ 0000000002240400] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[mpeg2video @ 00000000049d02e0] detected 8 logical cores
[mpeg2video @ 00000000049d02e0] intra_quant_bias = 96 inter_quant_bias = 0
[h264 @ 00000000021bae60] detected 8 logical cores
[dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb
[mpeg @ 00000000021b7a00] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'gg.hardsubs.mpg':
   Metadata:
     encoder         : Lavf54.63.104
     Chapter #0.0: start 0.000000, end 20.000000
     Stream #0:0, 0, 1/90000: Video: mpeg2video, yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 1001/24000, q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
     Stream #0:1, 0, 1/90000: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default)
Stream mapping:
   Stream #0:0 (h264) -> overlay:main (graph 0)
   Stream #0:2 (dvdsub) -> overlay:overlay (graph 0)
   overlay (graph 0) -> Stream #0:0 (mpeg2video)
   Stream #0:1 -> #0:1 (dca -> mp2)
Press [q] to stop, [?] for help
[h264 @ 00000000049614a0] no picture
[h264 @ 0000000004a78c00] no picture
[dca @ 0000000002227fe0] Stream with high frequencies VQ coding
[Parsed_overlay_0 @ 0000000002241200] Copying data in avfilter (have perms 5, need 7, reject 0)
*** 13 dup!
[mpeg @ 00000000021b7a00] First SCR: 0 First DTS: 45000
[Parsed_overlay_0 @ 0000000002241200] Copying data in avfilter (have perms 5, need 7, reject 0)
     Last message repeated 466 times
*** 1 dup!
     Last message repeated 1 times
[output stream 0:1 @ 0000000002240480] EOF on sink link output stream 0:1:default.
[output stream 0:0 @ 0000000002240be0] EOF on sink link output stream 0:0:default.
No more output streams to write to, finishing.
frame=  483 fps=134 q=31.0 Lsize=    2198kB time=00:00:20.10 bitrate= 895.7kbits/s dup=15 drop=0
video:1875kB audio:303kB subtitle:0 global headers:0kB muxing overhead 0.885072%
[AVIOContext @ 00000000021b92c0] Statistics: 15923228 bytes read, 0 seeks

--------------------------------------------------------------------------------------------

$ ffmpeg -i gg.mkv -filter_complex "[0:s]showinfo[s];[0:v][s]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y gg.hardsubs.mpg
  ffmpeg -i gg.mkv -filter_complex "[0:s]showinfo[s];[0:v][s]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y gg.hardsubs.mpg
ffmpeg version 1.2 Copyright (c) 2000-2013 the FFmpeg developers
   built on Mar 28 2013 00:34:08 with gcc 4.8.0 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
   libavutil      52. 18.100 / 52. 18.100
   libavcodec     54. 92.100 / 54. 92.100
   libavformat    54. 63.104 / 54. 63.104
   libavdevice    54.  3.103 / 54.  3.103
   libavfilter     3. 42.103 /  3. 42.103
   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 'gg.mkv':
   Metadata:
     ENCODER         : Lavf55.14.102
   Duration: 00:00:23.00, start: 0.000000, bitrate: 5539 kb/s
     Chapter #0.0: start 0.000000, end 20.000000
     Stream #0:0: Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
     Stream #0:1: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s (default)
     Stream #0:2: Subtitle: dvd_subtitle (default)
[Parsed_overlay_1 @ 0000000000351200] Overlay area with coordinates x1:0 y1:0 x2:1920 y2:1080 is not completely contained within the output with size 1280x536
[mpeg @ 00000000049a00a0] VBV buffer size not set, muxing may fail
Output #0, mpeg, to 'gg.hardsubs.mpg':
   Metadata:
     encoder         : Lavf54.63.104
     Chapter #0.0: start 0.000000, end 20.000000
     Stream #0:0: Video: mpeg2video, yuv420p, 1280x536 [SAR 1:1 DAR 160:67], q=2-31, 200 kb/s, 90k tbn, 23.98 tbc
     Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default)
Stream mapping:
   Stream #0:0 (h264) -> overlay:main (graph 0)
   Stream #0:2 (dvdsub) -> showinfo (graph 0)
   overlay (graph 0) -> Stream #0:0 (mpeg2video)
   Stream #0:1 -> #0:1 (dca -> mp2)
Press [q] to stop, [?] for help
[Parsed_showinfo_0 @ 0000000000351160] n:0 pts:0 pts_time:0 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:1 pts:587 pts_time:0.587 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:2 pts:926 pts_time:0.926 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:3 pts:938 pts_time:0.938 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:4 pts:1300 pts_time:1.3 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:5 pts:1310 pts_time:1.31 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:6 pts:1673 pts_time:1.673 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:7 pts:1683 pts_time:1.683 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:8 pts:2015 pts_time:2.015 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:9 pts:2047 pts_time:2.047 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:10 pts:2388 pts_time:2.388 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:11 pts:2398 pts_time:2.398 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:12 pts:2761 pts_time:2.761 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:13 pts:2772 pts_time:2.772 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
n:14 pts:3134 pts_time:3.134 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:15 pts:3145 pts_time:3.145 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:16 pts:3508 pts_time:3.508 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:17 pts:3519 pts_time:3.519 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:18 pts:3849 pts_time:3.849 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:19 pts:3892 pts_time:3.892 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB plane_checksum:[504E28AB]
[Parsed_showinfo_0 @ 0000000000351160] n:20 pts:3993 pts_time:3.993 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:21 pts:4266 pts_time:4.266 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:22 pts:4351 pts_time:4.351 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:23 pts:4638 pts_time:4.638 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:24 pts:4724 pts_time:4.724 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:25 pts:5011 pts_time:5.011 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:26 pts:5097 pts_time:5.097 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:27 pts:5385 pts_time:5.385 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:28 pts:5470 pts_time:5.47 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
n:29 pts:5719 pts_time:5.719 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:30 pts:5720 pts_time:5.72 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:31 pts:6100 pts_time:6.1 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:32 pts:6111 pts_time:6.111 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:33 pts:6473 pts_time:6.473 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:34 pts:6484 pts_time:6.484 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:35 pts:6846 pts_time:6.846 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:36 pts:6858 pts_time:6.858 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:37 pts:7220 pts_time:7.22 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:38 pts:7230 pts_time:7.23 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:39 pts:7561 pts_time:7.561 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:40 pts:7594 pts_time:7.594 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:41 pts:7935 pts_time:7.935 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:42 pts:7945 pts_time:7.945 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
n:43 pts:8307 pts_time:8.307 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:44 pts:8318 pts_time:8.318 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:45 pts:8681 pts_time:8.681 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:46 pts:8692 pts_time:8.692 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:47 pts:9054 pts_time:9.054 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:48 pts:9065 pts_time:9.065 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:49 pts:9396 pts_time:9.396 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:50 pts:9439 pts_time:9.439 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:51 pts:9769 pts_time:9.769 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:52 pts:9812 pts_time:9.812 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:53 pts:10143 pts_time:10.143 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:54 pts:10186 pts_time:10.186 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:92935102 plane_checksum:[92935102]
[Parsed_showinfo_0 @ 0000000000351160] n:55 pts:10635 pts_time:10.635 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
n:56 pts:10722 pts_time:10.722 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:57 pts:10974 pts_time:10.974 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:58 pts:11060 pts_time:11.06 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:59 pts:11316 pts_time:11.316 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:60 pts:11433 pts_time:11.433 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:61 pts:11689 pts_time:11.689 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:62 pts:11807 pts_time:11.807 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:63 pts:12063 pts_time:12.063 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:64 pts:12148 pts_time:12.148 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:65 pts:12200 pts_time:12.2 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:66 pts:12521 pts_time:12.521 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:67 pts:12564 pts_time:12.564 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:68 pts:12894 pts_time:12.894 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:69 pts:12937 pts_time:12.937 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
n:70 pts:13268 pts_time:13.268 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:71 pts:13311 pts_time:13.311 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:72 pts:13610 pts_time:13.61 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:73 pts:13684 pts_time:13.684 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:74 pts:13983 pts_time:13.983 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:75 pts:14025 pts_time:14.025 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:76 pts:14356 pts_time:14.356 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:77 pts:14398 pts_time:14.398 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:78 pts:14729 pts_time:14.729 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:79 pts:14772 pts_time:14.772 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:80 pts:15102 pts_time:15.102 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:81 pts:15145 pts_time:15.145 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:82 pts:15443 pts_time:15.443 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:83 pts:15519 pts_time:15.519 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
n:84 pts:15817 pts_time:15.817 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:85 pts:15860 pts_time:15.86 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A1744133 plane_checksum:[A1744133]
[Parsed_showinfo_0 @ 0000000000351160] n:86 pts:16239 pts_time:16.239 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:87 pts:16244 pts_time:16.244 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:88 pts:16606 pts_time:16.606 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:89 pts:16618 pts_time:16.618 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:90 pts:16980 pts_time:16.98 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:91 pts:16990 pts_time:16.99 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:92 pts:17321 pts_time:17.321 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:93 pts:17363 pts_time:17.363 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:94 pts:17695 pts_time:17.695 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:95 pts:17737 pts_time:17.737 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
n:96 pts:18068 pts_time:18.068 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:97 pts:18110 pts_time:18.11 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:00000000 plane_checksum:[00000000]
[Parsed_showinfo_0 @ 0000000000351160] n:98 pts:18400 pts_time:18.4 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:99 pts:18483 pts_time:18.483 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:100 pts:18772 pts_time:18.772 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:101 pts:18857 pts_time:18.857 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:102 pts:19113 pts_time:19.113 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:103 pts:19241 pts_time:19.241 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:104 pts:19487 pts_time:19.487 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:105 pts:19614 pts_time:19.614 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:106 pts:19859 pts_time:19.859 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
[Parsed_showinfo_0 @ 0000000000351160] n:107 pts:19988 pts_time:19.988 pos:0 fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:A5A089F4 plane_checksum:[A5A089F4]
frame=  483 fps=121 q=31.0 Lsize=    2198kB time=00:00:20.10 bitrate= 895.7kbits/s dup=15 drop=0
video:1875kB audio:303kB subtitle:0 global headers:0kB muxing overhead 0.885072%


_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Paul B Mahol
On 8/29/13, Thierry Lelegard <[hidden email]> wrote:

> Thanks for the troubleshooting steps.
>
> I tried all three steps and they all seem to indicate that the subtitles
> do exist and are not transparent. See below.
>
> As I mentioned in my original post, both vlc and mplayer correctly display
> the subtitles which are white with outline.
>
> If you are interested, the video file (20 seconds, 15 MB) is accessible at
> http://dl.free.fr/kHF1KGkZ7
>
> Le 29/08/2013 19:33, Nicolas George a ecrit :
>
>> Le duodi 12 fructidor, an CCXXI, Thierry Lelegard a ecrit :
>>> It seems the simplest possible command to do. Please don't comment on
>>> video
>>> quality, it is just a test to see if the subtitles are burnt into the
>>> video.
>>> The resulting video does not contain subtitles.
>> It should be working. I suggest three steps to understand how it fails:
>>
>> First, use -loglevel debug and look at the "palette:" lines: maybe the
>> subtitles are completely transparent.
>
> Got the following. See the full output at the end of the mail.
>
> [dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999
> 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11
> 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb
>
> The subtitles are not transparent.
>
>> Second, add a showinfo filter after the subtitles input, something like
>> that:
>>
>>    [0:s]ashowinfo[s];[0:v][s]overlay
>>
>> That way, you can see if subtitles packets arrive.
>
> I guess you mean "showinfo", not "ashowinfo", this is not audio.
> Got the following. Again, see the full output at the end of the mail.
>
> [Parsed_showinfo_0 @ 0000000000351160] n:0 pts:0 pts_time:0 pos:0 fmt:bgra
> sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB
> plane_checksum:[504E28AB]
> [Parsed_showinfo_0 @ 0000000000351160] n:1 pts:587 pts_time:0.587 pos:0
> fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB
> plane_checksum:[504E28AB]
> [Parsed_showinfo_0 @ 0000000000351160] n:2 pts:926 pts_time:0.926 pos:0
> fmt:bgra sar:0/0 s:1920x1080 i:P iskey:0 type:? checksum:504E28AB
> plane_checksum:[504E28AB]
> ....
>
> So, the packets are seen by the filter chain. I am not sure how to
> interpret
> some of those values.
>
>> Third, extract the subtitles track with mkvextract, and look at the
>> index,
>> especially the size, the palette, etc.
>
> $ mkvextract tracks gg.mkv 2:gg.sub
> Extracting track 2 with the CodecID 'S_VOBSUB' to the file 'gg.sub'.
> Container format: VobSubs
> Writing the VobSub index file 'gg.idx'.
> Progress: 100%
>
> The content of the index is:
>
> # VobSub index file, v7 (do not modify this line!)
> size: 1920x1080
> org: 0, 0
> scale: 100%, 100%
> alpha: 100%
> smooth: OFF
> fadein/out: 0, 0
> align: OFF at LEFT TOP
> time offset: 0
> forced subs: OFF
> palette: 000000, f0f0f0, cccccc, 999999, 3333fa, 1111bb, fa3333, bb1111,
> 33fa33, 11bb11, fafa33, bbbb11, fa33fa, bb11bb, 33fafa, 11bbbb
> custom colors: OFF, tridx: 1000, colors: 000000, 444444, 888888, cccccc
>

Well entries are really transparent.

[...]
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Thierry Lelegard
> De: "Paul B Mahol" <[hidden email]>

[...]

>>> First, use -loglevel debug and look at the "palette:" lines: maybe
>>> the
>>> subtitles are completely transparent.
>>
>> Got the following. See the full output at the end of the mail.
>>
>> [dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999
>> 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11
>> 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb

[...]

>> # VobSub index file, v7 (do not modify this line!)
>> size: 1920x1080
>> org: 0, 0
>> scale: 100%, 100%
>> alpha: 100%
>> smooth: OFF
>> fadein/out: 0, 0
>> align: OFF at LEFT TOP
>> time offset: 0
>> forced subs: OFF
>> palette: 000000, f0f0f0, cccccc, 999999, 3333fa, 1111bb, fa3333, bb1111,
>> 33fa33, 11bb11, fafa33, bbbb11, fa33fa, bb11bb, 33fafa, 11bbbb
>> custom colors: OFF, tridx: 1000, colors: 000000, 444444, 888888, cccccc
>>
>
> Well entries are really transparent.

Could you please elaborate on that? What does make you think this in the
above report? I am not sure on how to interpret the reported data.

If the subtitles are "transparent", why do vlc and mplayer display the
characters in white color with a black outline?

I also tried ffplay right now (same code base as ffmpeg I suppose).
It does display subtitles in white + black outline characters but
their size is messed up. They are much bigger than with vlc and
mplayer (roughly twice as big). Their position is also messed up
in a way which seems consistent with the wrong size (roughly shifted
left and up by twice the amount of pixels).

So, if ffplay displays "something" in the video (let's ignore the size
issue for now), which options or filters should be used with ffmpeg to
achieve the same result?

[...]
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Nicolas George-2
In reply to this post by Thierry Lelégard
Le tridi 13 fructidor, an CCXXI, Thierry Lelégard a écrit :
> [graph 0 input from stream 0:0 @ 00000000022412a0] w:1280 h:536
> [graph 0 input from stream 0:2 @ 0000000002240e20] w:1920 h:1080

Ok, here is the problem: the subtitle frames are much larger than the video
frames, and the top-left corner you actually see is completely transparent.
There was a time the overlay filter would have produced an error if the
overlay frame overflows the underlying, but no longer, it is accepted.

You need to scale and/or crop the subtitles frames to get them to fit on the
video. I suspect, in this particular case, you should scale to 1280×720 and
then crop to 1280×536 to achieve the intended geometry.

Regards,

--
  Nicolas George

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Carl Eugen Hoyos
In reply to this post by Thierry Lelegard
Thierry Lelegard <thierry <at> lelegard.fr> writes:

> I also tried ffplay right now (same code base as ffmpeg
> I suppose). It does display subtitles in white + black
> outline characters but their size is messed up.

This is ticket #679.

Carl Eugen

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Paul B Mahol
In reply to this post by Thierry Lelegard
On 8/30/13, Thierry Lelegard <[hidden email]> wrote:

>> De: "Paul B Mahol" <[hidden email]>
>
> [...]
>
>>>> First, use -loglevel debug and look at the "palette:" lines: maybe
>>>> the
>>>> subtitles are completely transparent.
>>>
>>> Got the following. See the full output at the end of the mail.
>>>
>>> [dvdsub @ 00000000021b74e0] palette: 0x000000 0xf0f0f0 0xcccccc 0x999999
>>> 0x3333fa 0x1111bb 0xfa3333 0xbb1111 0x33fa33 0x11bb11 0xfafa33 0xbbbb11
>>> 0xfa33fa 0xbb11bb 0x33fafa 0x11bbbb
>
> [...]
>
>>> # VobSub index file, v7 (do not modify this line!)
>>> size: 1920x1080
>>> org: 0, 0
>>> scale: 100%, 100%
>>> alpha: 100%
>>> smooth: OFF
>>> fadein/out: 0, 0
>>> align: OFF at LEFT TOP
>>> time offset: 0
>>> forced subs: OFF
>>> palette: 000000, f0f0f0, cccccc, 999999, 3333fa, 1111bb, fa3333, bb1111,
>>> 33fa33, 11bb11, fafa33, bbbb11, fa33fa, bb11bb, 33fafa, 11bbbb
>>> custom colors: OFF, tridx: 1000, colors: 000000, 444444, 888888, cccccc
>>>
>>
>> Well entries are really transparent.
>
> Could you please elaborate on that? What does make you think this in the
> above report? I am not sure on how to interpret the reported data.

Actually looking at source code those logs does not output alpha bytes at all.

>
> If the subtitles are "transparent", why do vlc and mplayer display the
> characters in white color with a black outline?
>
> I also tried ffplay right now (same code base as ffmpeg I suppose).
> It does display subtitles in white + black outline characters but
> their size is messed up. They are much bigger than with vlc and
> mplayer (roughly twice as big). Their position is also messed up
> in a way which seems consistent with the wrong size (roughly shifted
> left and up by twice the amount of pixels).
>
> So, if ffplay displays "something" in the video (let's ignore the size
> issue for now), which options or filters should be used with ffmpeg to
> achieve the same result?
>
> [...]
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Burning DVD subtitles into video using overlay filter not working

Thierry Lelegard
In reply to this post by Nicolas George-2
> De: "Nicolas George" <[hidden email]>
>
>> [graph 0 input from stream 0:0 @ 00000000022412a0] w:1280 h:536
>> [graph 0 input from stream 0:2 @ 0000000002240e20] w:1920 h:1080
>
> Ok, here is the problem: the subtitle frames are much larger than the video
> frames, and the top-left corner you actually see is completely transparent.
> There was a time the overlay filter would have produced an error if the
> overlay frame overflows the underlying, but no longer, it is accepted.
>
> You need to scale and/or crop the subtitles frames to get them to fit on the
> video. I suspect, in this particular case, you should scale to 1280×720 and
> then crop to 1280×536 to achieve the intended geometry.

Great, you got it Nicolas!

The following command does the job:

ffmpeg -i gg.mkv -filter_complex "[0:s]scale=width=1280:height=720,crop=w=1280:h=536:x=0:y=out_h[sub];[0:v][sub]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y gg.hardsubs.mpg

The subtitles are there and look nice. The width/height proportion of the
characters look fine.

I also tried without cropping, directly resizing to the video size, hence
without preserving the aspect ratio:

ffmpeg -i gg.mkv -filter_complex "[0:s]scale=width=1280:height=536[sub];[0:v][sub]overlay" -codec:v mpeg2video -codec:a mp2 -ac 2 -y gg.hardsubs.mpg

The subtitles are there but the characters are slightly vertically
compressed as expected. Interestingly, they now have exactly the same
appearance as displayed with vlc and mplayer. I suppose that both of
them simply resize the subtitle frames without preserving the aspect
ratio.

So far so good ... for this file. My original purpose is to automate
the processing of media files, making decisions based on the various
input streams. To get all characteristics of the input file, I use
ffprobe with "flat" print format. Based on these info, I generate
one or more ffmpeg commands to build the resulting media file.

Now, in the case of DVD subtitles, how can I compute the appropriate
filter? For this, I need the width and height of both the video and
dvdsub stream. However, ffprobe does not give me the size of the
dvdsub frames, only the video streams. See the example:

$ ffprobe gg.mkv -loglevel warning -show_streams -print_format flat | grep -e codec_name -e width -e height
streams.stream.0.codec_name="h264"
streams.stream.0.width=1280
streams.stream.0.height=536
streams.stream.1.codec_name="dca"
streams.stream.2.codec_name="dvdsub"

And if I look at all "stream.2" properties, I do not see anything usable:

streams.stream.2.index=2
streams.stream.2.codec_name="dvdsub"
streams.stream.2.codec_long_name="DVD subtitles"
streams.stream.2.profile="unknown"
streams.stream.2.codec_type="subtitle"
streams.stream.2.codec_time_base="1/1000"
streams.stream.2.codec_tag_string="[0][0][0][0]"
streams.stream.2.codec_tag="0x0000"
streams.stream.2.id="N/A"
streams.stream.2.r_frame_rate="0/0"
streams.stream.2.avg_frame_rate="0/0"
streams.stream.2.time_base="1/1000"
streams.stream.2.start_pts=0
streams.stream.2.start_time="0.000000"
streams.stream.2.duration_ts="N/A"
streams.stream.2.duration="N/A"
streams.stream.2.bit_rate="N/A"
streams.stream.2.nb_frames="N/A"
streams.stream.2.nb_read_frames="N/A"
streams.stream.2.nb_read_packets="N/A"
streams.stream.2.disposition.default=1
streams.stream.2.disposition.dub=0
streams.stream.2.disposition.original=0
streams.stream.2.disposition.comment=0
streams.stream.2.disposition.lyrics=0
streams.stream.2.disposition.karaoke=0
streams.stream.2.disposition.forced=0
streams.stream.2.disposition.hearing_impaired=0
streams.stream.2.disposition.visual_impaired=0
streams.stream.2.disposition.clean_effects=0
streams.stream.2.disposition.attached_pic=0

Maybe, as parameters of the scale and crop filters, I can use expressions
using the literal values of the video stream size. But I need to get more
familiar with the syntax of expressions in ffmpeg parameters.

Thanks a lot for your help,
-Thierry

PS:
> Le tridi 13 fructidor, an CCXXI, Thierry Lelégard a écrit :
Does anyone outside France understand the Revolutionary Calendar? :-)
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...