[FFmpeg-user] Extracting stills frames from a DVB-T MPEG transport stream with subtitles
Tom Crane
TPCffmpeg at mklab.ph.rhul.ac.uk
Sat Jun 20 05:14:25 EEST 2020
Dear All,
I am attempting to extract still frames from a video stream in a
multi-channel DVB-T MPEG transport stream, for example every 2 seconds,
with selected accompanying subtitles but can't get it to work.
This example command successfully extracts frames from video stream 0:26 to jpeg files.
ffmpeg -i dvb.ts -map 0:26 -qscale:v 1 -r 0.5 stills%04d.jpg
This one successfully copies the same file's video stream 0:26 along with
subtitle stream 0:30 to a video file in a Matroska container.
ffmpeg -i dvb.ts -map 0:26 -c:v copy -map 0:30 -c:s copy tmp.mkv
Is there a way to combine the two to capture still frames from the video
stream to JPEG files including the accompanying subtitles?
The relevant part of the dvb.ts file's contents from ffprobe are,
Input #0, mpegts, from
'dvb.ts':
Duration: 00:02:00.18, start: 52229.147411, bitrate: 24040 kb/s
Program 1542
Metadata:
service_name : TMC
service_provider: SMR6
Stream #0:26[0x26c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:27[0x276](fra): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:28[0x277](qaa): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:29[0x278](fra): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 96 kb/s (visual impaired) (descriptions)
Stream #0:30[0x28a](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:31[0x28b](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:7[0xaa]: Unknown: none ([5][0][0][0] / 0x0005)
$ ffmpeg -version
ffmpeg version N-96647-g343ccfcc4d Copyright (c) 2000-2020 the FFmpeg
developers
built with gcc 9.2.0 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--docdir=/usr/doc/ffmpeg-git-20200206/html --mandir=/usr/man
--disable-debug --enable-shared --disable-static --enable-gpl
--enable-version3 --enable-avresample --arch=x86_64 --disable-encoder=aac
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-gnutls --enable-libbluray --enable-libcaca --enable-libcdio
--enable-libopus --enable-librtmp --enable-libspeex --enable-libssh
--enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid
--enable-libmp3lame --enable-opencl --enable-opengl --enable-libopenjpeg
--enable-libpulse --enable-libsmbclient --enable-libwavpack
libavutil 56. 39.100 / 56. 39.100
libavcodec 58. 68.100 / 58. 68.100
libavformat 58. 38.100 / 58. 38.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 74.100 / 7. 74.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Thanks
Tom Crane
More information about the ffmpeg-user
mailing list