Advertisement
metalx1000

Create Image Grid from Video

Apr 13th, 2016
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. dir="/tmp/$RANDOM"
  4. mkdir "$dir"
  5. cd "$dir"
  6.  
  7. #Download example video
  8. youtube-dl "https://youtu.be/5zsVn_vZ9zE" -o video
  9.  
  10. #convert video to jpg at 10 frames per minute (6/60)
  11. ffmpeg -i video.* -vf fps=6/60 img%03d.jpg
  12.  
  13. #Create Grid
  14. montage -geometry 320x160 *.jpg output.png
  15.  
  16. #Display output image
  17. display output.png
  18.  
  19. #clean up
  20. rm -fr "$dir"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement