Advertisement
Guest User

Untitled

a guest
Jun 26th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. # This expects a directory named 'images', with images of the form 01_image_45.jpg
  2. # where 45 is the number of frames to show that image for.
  3.  
  4.  
  5.  
  6. #!/bin/bash
  7.  
  8. FPS=30
  9. OUTPUT=output.mp4
  10.  
  11. (
  12.   for F in images/*; do
  13.     C="${F/*_/}"
  14.     C="${C/.*/}"
  15.  
  16.     while [ "$C" -gt 0 ]; do
  17.       cat "$F"
  18.       C=$(($C - 1))
  19.     done
  20.   done
  21.  
  22. ) | ffmpeg -y \
  23.   -vcodec mjpeg -f image2pipe -r "$FPS" -i - \
  24.   -vcodec libx264 -crf 20 -movflags +faststart \
  25.   "$OUTPUT"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement