Quote:
Originally Posted by ServerGenius
bump for the day crew
|
Nice script, mines a little more basic
Code:
#!/bin/sh
# make life easier 1.0
# script to convert, split and create thumbs for videos
case "$1" in
thumbs)
## this will grab a screen shot 4 seconds in of a flash video
for i in *.flv; do ffmpeg -an -y -t 00:00:04 -i "$i" -f image2 "`echo $i |sed 's/.flv$/.jpg/'`" ;done
;;
## this will convert all the mpegs in a directory to flash video format
convert)
for i in *.mpg; do ffmpeg -i "$i" "`echo $i |sed 's/.mpg$/.flv/'`" ;done
;;
## this split cuts the video from start to 1 minute in
split)
for i in *.mpg; do ffmpeg -i "$i" -vcodec copy -acodec copy -ss 00:00:00 -t 00:01:00 split-$i; done
;;
*)
echo "Usage: `basename $0` {thumbs|convert|split}" >&2
exit 64
;;
esac
exit 0