Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This expects a directory named 'images', with images of the form 01_image_45.jpg
- # where 45 is the number of frames to show that image for.
- #!/bin/bash
- FPS=30
- OUTPUT=output.mp4
- (
- for F in images/*; do
- C="${F/*_/}"
- C="${C/.*/}"
- while [ "$C" -gt 0 ]; do
- cat "$F"
- C=$(($C - 1))
- done
- done
- ) | ffmpeg -y \
- -vcodec mjpeg -f image2pipe -r "$FPS" -i - \
- -vcodec libx264 -crf 20 -movflags +faststart \
- "$OUTPUT"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement