How to make a animation from separate images

From Rsewiki
Revision as of 07:36, 23 July 2016 by Jca (talk | contribs) (Created page with "Using ffmpeg to convert a list of files with timestamped filenames into an mpeg video Change the line "for f in $( ls drone*.bmp ); do" to filter the images to be used - here...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using ffmpeg to convert a list of files with timestamped filenames into an mpeg video

Change the line "for f in $( ls drone*.bmp ); do" to filter the images to be used - here "drone*.bmp"

The last filename in the ffmpeg line to the destination name.

#! /bin/bash
let COUNTER=1000000
for f in $( ls drone*.bmp ); do 
  echo convert $f path$COUNTER.png
  convert $f path$COUNTER.png
  let PREV=$COUNTER
  let COUNTER+=1
  # use same image again to lower framerate
  convert $f path$COUNTER.png
  let PREV=$COUNTER
  let COUNTER+=1
  done
# convert to mpeg format
# -r 25 frames per second
# -b:v 5000000 video bitrate på 5Mbit/sec
# -y betyder overskriv destination
ffmpeg -y -i:path1%06d.png -r 20 -b:v 5000000 r2raw4.mpeg
ls -l *.mpeg