[FFmpeg-user] Forced Subtitles Only
petesea at frontier.com
petesea at frontier.com
Thu Feb 19 20:19:54 CET 2015
OS: Fedora 14
FFMPEG: 2.5.3 (full version info below)
I'm trying to generate a vob (from dvd) that contains a subtitle stream
into an mpeg2 with "hard" subtitles, but I only want to include the
"forced" subtitles.
I'm able to generate an mpeg2 with hard-subtitles using the following
command (see complete output below):
$ ffmpeg -analyzeduration 250M -probesize 250M -i video.vob -filter_complex "[0:v][0:11]overlay" -codec:v mpeg2video -b:v 16384k -maxrate 30000k -bufsize 4096k -codec:a copy -f vob video-HARDSUBS.mpg
But it includes all the subtitles in the specified subtitle stream. I
only want to include the subtitles marked as "forced". Is this possible
with ffmpeg?
Using HandBrakeCLI (0.10.0) I can generate an mkv (h264) with forced-only
hard subtitles using the same vob input file, so the information must be
in the file. Problem with HandBrake is it doesn't generate mpeg2 files,
so I'd have to convert the mkv/h264 back to mpeg2 via ffmpeg. I'm hoping
to avoid that extra conversion.
------------------------------------------------------------------------
$ ffmpeg -analyzeduration 250M -probesize 250M -i video.vob -filter_complex "[0:v][0:11]overlay" -codec:v mpeg2video -b:v 16384k -maxrate 30000k -bufsize 4096k -codec:a copy -f vob video-HARDSUBS.mpg
ffmpeg version 2.5.3 Copyright (c) 2000-2015 the FFmpeg developers
built on Feb 12 2015 12:31:33 with gcc 4.5.1 (GCC) 20100924 (Red Hat 4.5.1-4)
configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --disable-debug --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-x11grab
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mpeg, from 'video.vob':
Duration: 00:00:14.99, start: 0.500000, bitrate: 6305 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 16:9], max. 9800 kb/s, 29.92 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[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:3[0x82]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:4[0x83]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:5[0x84]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:6[0x22]: Subtitle: dvd_subtitle
Stream #0:7[0x20]: Subtitle: dvd_subtitle
Stream #0:8[0x24]: Subtitle: dvd_subtitle
Stream #0:9[0x25]: Subtitle: dvd_subtitle
Stream #0:10[0x26]: Subtitle: dvd_subtitle
Stream #0:11[0x28]: Subtitle: dvd_subtitle
Stream #0:12[0x21]: Subtitle: dvd_subtitle
Stream #0:13[0x23]: Subtitle: dvd_subtitle
Stream #0:14[0x27]: Subtitle: dvd_subtitle
[mpeg @ 0x885bac0] sub2video: using 720x480 canvas
Output #0, vob, to 'video-HARDSUBS.mpg':
Metadata:
encoder : Lavf56.15.102
Stream #0:0: Video: mpeg2video, 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 : Lavc56.13.100 mpeg2video
Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), 448 kb/s
Stream mapping:
Stream #0:0 (mpeg2video) -> overlay:main
Stream #0:11 (dvdsub) -> overlay:overlay
overlay -> Stream #0:0 (mpeg2video)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 450 fps= 55 q=2.0 Lsize= 3628kB time=00:00:14.98 bitrate=1983.8kbits/s dup=94 drop=0
video:2755kB audio:819kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.519567%
More information about the ffmpeg-user
mailing list