Guest User

Untitled

a guest
Mar 31st, 2018
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Suppose I have a video format like this:
  2.  
  3.  
  4. Metadata:
  5. CREATION_TIME : 2017-08-04T21:29:42Z
  6. ENCODER : Lavf57.7.2
  7. Duration: 00:24:45.83, start: 0.000000, bitrate: 1130 kb/s
  8. Chapter #0:0: start 0.000000, end 90.048000
  9. Metadata:
  10. title : Chapter 1
  11. Chapter #0:1: start 90.048000, end 741.074000
  12. Metadata:
  13. title : Chapter 2
  14. Chapter #0:2: start 741.074000, end 1391.348000
  15. Metadata:
  16. title : Chapter 3
  17. Chapter #0:3: start 1391.348000, end 1422.338000
  18. Metadata:
  19. title : Chapter 4
  20. Chapter #0:4: start 1422.338000, end 1485.693000
  21. Metadata:
  22. title : Chapter 5
  23. 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)
  24. Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
  25. Metadata:
  26. title : Stereo
  27. Stream #0:2(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp
  28. Metadata:
  29. title : Stereo
  30. Stream #0:3(eng): Subtitle: ass (default) (forced)
  31. Stream #0:4: Attachment: ttf
  32. Metadata:
  33. filename : FRAMD.TTF
  34. mimetype : application/x-truetype-font
  35. Stream #0:5: Attachment: ttf
  36. Metadata:
  37. filename : FRAMDCN.TTF
  38. mimetype : application/x-truetype-font
  39. Stream #0:6: Attachment: ttf
  40. Metadata:
  41. filename : FRAMDIT.TTF
  42. mimetype : application/x-truetype-font
  43. Stream #0:7: Attachment: ttf
  44. Metadata:
  45. filename : DEJAVUSERIF.TTF
  46. mimetype : application/x-truetype-font
  47. Stream #0:8: Attachment: ttf
  48. Metadata:
  49. filename : FRADM.TTF
  50. mimetype : application/x-truetype-font
  51. Stream #0:9: Attachment: ttf
  52. Metadata:
  53. filename : FRADMCN.TTF
  54. mimetype : application/x-truetype-font
  55. Stream #0:10: Attachment: ttf
  56. Metadata:
  57. filename : FRADMIT.TTF
  58. mimetype : application/x-truetype-font
  59.  
  60. I want to take every frame of this video and convert it into an image, _but I want to keep the subtitles_.
  61.  
  62. I tried a command like this:
  63.  
  64. ffmpeg -i file.mkv -r 1 -ss 120 -t 350 -map 0:0 images/output_%05d.png
  65.  
  66. 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
  67.  
  68. Automatic encoder selection failed for output stream #0:1. Default encoder for format image2 (codec none) is probably disabled. Please choose an encoder manually.
  69. Error selecting an encoder for stream 0:1
  70.  
  71. I have also tried a variation like
  72.  
  73. 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
  74.  
  75. Which also simply wrote out the PNGs--no subtitles.
  76.  
  77. What am I missing here?
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×