[FFmpeg-user] subtitles extraction
Alessandro Magni
magni at inrim.it
Mon Dec 23 14:39:23 CET 2013
I am struggling to extract the subtitles from an ISO image - I have
tried different ways following various guides, always failing -
hope you can make sense of what I'm doing wrong:
1) ffmpeg -i mpfc.iso -vn -an -c copy a.srt
ffmpeg version 1.2.4 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 16 2013 22:38:20 with gcc 4.8.1 (GCC) 20130603 (Red Hat
4.8.1-1)
configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r
--enable-gnutls --enable-libass --enable-libcelt --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264
--enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample
--enable-postproc --enable-pthreads --disable-static --enable-shared
--enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
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
[mpeg @ 0x8faa80] max_analyze_duration 5000000 reached at 5000000
microseconds
Input #0, mpeg, from 'mpfc.iso':
Duration: 00:30:49.06, start: 62.047267, bitrate: 4316 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x24]: Subtitle: dvd_subtitle
File 'a.srt' already exists. Overwrite ? [y/N] y
Unsupported subtitles codec: dvd_subtitle
Output #0, srt, to 'a.srt':
Metadata:
encoder : Lavf54.63.104
Stream #0:0: Subtitle: dvd_subtitle
Stream mapping:
Stream #0:2 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters
?): Invalid argument
----------------------------------------------------------------------
2) ffmpeg -i mpfc.iso -vn -an -codec:s:0.2 srt a.srt
ffmpeg version 1.2.4 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 16 2013 22:38:20 with gcc 4.8.1 (GCC) 20130603 (Red Hat
4.8.1-1)
<...config lines skipped...>
[mpeg @ 0x640a80] max_analyze_duration 5000000 reached at 5000000
microseconds
Input #0, mpeg, from 'mpfc.iso':
Duration: 00:30:49.06, start: 62.047267, bitrate: 4316 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x24]: Subtitle: dvd_subtitle
File 'a.srt' already exists. Overwrite ? [y/N] y
Output #0, srt, to 'a.srt':
Stream #0:0: Subtitle: srt
Stream mapping:
Stream #0:2 -> #0:0 (dvdsub -> srt)
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
----------------------------------------------------------------------
3) ffmpeg -i mpfc.iso -an -vn -map 0:s:0 -c:s:0 srt a.srt
ffmpeg version 1.2.4 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 16 2013 22:38:20 with gcc 4.8.1 (GCC) 20130603 (Red Hat
4.8.1-1)
<...config lines skipped...>
[mpeg @ 0x2638aa0] max_analyze_duration 5000000 reached at 5000000
microseconds
Input #0, mpeg, from 'mpfc.iso':
Duration: 00:30:49.06, start: 62.047267, bitrate: 4316 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x24]: Subtitle: dvd_subtitle
File 'a.srt' already exists. Overwrite ? [y/N] y
Output #0, srt, to 'a.srt':
Stream #0:0: Subtitle: srt
Stream mapping:
Stream #0:2 -> #0:0 (dvdsub -> srt)
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
----------------------------------------------------------------------
unfortunately I understand nothing about ffmpeg usage!
alessandro
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ Dr.Alessandro Magni
\ Electromagnetics Division
/ INRiM Strada delle Cacce 91, 10135 Torino (ITALIA)
\ Email magni at inrim.it
/ Tel: 0039-011-3919821 Fax: 0039-011-3919834
\ URL http://www.inrim.it/~magni
/ Our business in life is not to succeed but to continue to fail
\ in high spirits. -- Robert Louis Stevenson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the ffmpeg-user
mailing list