Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Suppose I have a video format like this:
- Metadata:
- CREATION_TIME : 2017-08-04T21:29:42Z
- ENCODER : Lavf57.7.2
- Duration: 00:24:45.83, start: 0.000000, bitrate: 1130 kb/s
- Chapter #0:0: start 0.000000, end 90.048000
- Metadata:
- title : Chapter 1
- Chapter #0:1: start 90.048000, end 741.074000
- Metadata:
- title : Chapter 2
- Chapter #0:2: start 741.074000, end 1391.348000
- Metadata:
- title : Chapter 3
- Chapter #0:3: start 1391.348000, end 1422.338000
- Metadata:
- title : Chapter 4
- Chapter #0:4: start 1422.338000, end 1485.693000
- Metadata:
- title : Chapter 5
- Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 960x720 [SAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
- Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
- Metadata:
- title : Stereo
- Stream #0:2(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp
- Metadata:
- title : Stereo
- Stream #0:3(eng): Subtitle: ass (default) (forced)
- Stream #0:4: Attachment: ttf
- Metadata:
- filename : FRAMD.TTF
- mimetype : application/x-truetype-font
- Stream #0:5: Attachment: ttf
- Metadata:
- filename : FRAMDCN.TTF
- mimetype : application/x-truetype-font
- Stream #0:6: Attachment: ttf
- Metadata:
- filename : FRAMDIT.TTF
- mimetype : application/x-truetype-font
- Stream #0:7: Attachment: ttf
- Metadata:
- filename : DEJAVUSERIF.TTF
- mimetype : application/x-truetype-font
- Stream #0:8: Attachment: ttf
- Metadata:
- filename : FRADM.TTF
- mimetype : application/x-truetype-font
- Stream #0:9: Attachment: ttf
- Metadata:
- filename : FRADMCN.TTF
- mimetype : application/x-truetype-font
- Stream #0:10: Attachment: ttf
- Metadata:
- filename : FRADMIT.TTF
- mimetype : application/x-truetype-font
- I want to take every frame of this video and convert it into an image, _but I want to keep the subtitles_.
- I tried a command like this:
- ffmpeg -i file.mkv -r 1 -ss 120 -t 350 -map 0:0 images/output_%05d.png
- Which gets me the frames from the range I want (`-ss..-t`), but whenever I try to add some variation of `-map 0:3` (the subtitle stream), I get
- Automatic encoder selection failed for output stream #0:1. Default encoder for format image2 (codec none) is probably disabled. Please choose an encoder manually.
- Error selecting an encoder for stream 0:1
- I have also tried a variation like
- ffmpeg -i file.mkv -r 1 -ss 120 -t 350 -map 0:0 -attach ~/Library/Fonts/DejaVuSans.ttf -metadata:s:0 mimetype=application/x-truetype-font images/output_%05d.png
- Which also simply wrote out the PNGs--no subtitles.
- What am I missing here?
Advertisement
Add Comment
Please, Sign In to add comment