How to make a animation from separate images

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(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...")
 
Line 23: Line 23:
 
  ffmpeg -y -i:path1%06d.png -r 20 -b:v 5000000 r2raw4.mpeg
 
  ffmpeg -y -i:path1%06d.png -r 20 -b:v 5000000 r2raw4.mpeg
 
  ls -l *.mpeg
 
  ls -l *.mpeg
 +
 +
Save the modified file as e.g. "makempeg"
 +
 +
then make it runable and run it
 +
 +
chmod +x makempeg
 +
./makempeg

Revision as of 08:39, 23 July 2016

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

Save the modified file as e.g. "makempeg"

then make it runable and run it

chmod +x makempeg
./makempeg
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox