Generate Screenshots With FFmpeg Linux

What You Will Need
  • ffmpeg
  • b3n's screenshot script


Installing FFmpeg in Debian

Run these commands as root. Also substitute "lenny" for your Debian distribution.

First install the debian-multimedia key ring.



Now edit your apt sources.

  • nano /etc/apt/sources.list

And add these two lines.


Then run

  • apt-get update
  • apt-get install ffmpeg

You can install FFmpeg on most flavours of Linux. This is just how to do it on Debian.


b3n's Screenshot Script

This script will extract a screenshot every 20 mins as many times as you specify. Save the text below as screenshot.sh then run these commands to take four shots from THE.FILE.avi

  • chmod +x screenshot.sh
  • ./screenshot.sh THE.FILE.avi 4
Quote:

#!/bin/bash
file=$1
times=$2
x=1
while [ $x -le $times ];
do
ffmpeg -ss $(echo "$x * 1200" | bc -l) -i "$file" -an -vframes 1 -f image2 images$(echo "$x").png;
x=$(( $x + 1 ))
done

0 comments:

Post a Comment

 
© 2009 windows 8 download free Software | Powered by Blogger | Built on the Blogger Template Valid X/HTML (Just Home Page) | Design: Choen | PageNav: Abu Farhan