Skip to content

Instantly share code, notes, and snippets.

@kambara
Created April 4, 2011 12:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kambara/901547 to your computer and use it in GitHub Desktop.
Save kambara/901547 to your computer and use it in GitHub Desktop.
ViconRevue (SenseCam) で撮った画像をAVI (MS-MPEG4 v2) に変換。要mencoder。
#/bin/sh
if [ $# -lt 2 ]; then
echo "Usage: $ sensecam-movie.sh /media/76EF-F73A/DATA movie.avi 24"
exit 1
fi
TMP=/tmp/sensecam-images
FPS=24
if [ $# -eq 3 ]; then
FPS=$3
fi
rm -rf $TMP
mkdir $TMP
find $1 -name "*.JPG" -print0 | xargs --null -I{} cp {} $TMP
mencoder "mf://$TMP/*.JPG" -mf fps=$FPS -ovc lavc -lavcopts vcodec=msmpeg4v2 -o $2
@kambara
Copy link
Author

kambara commented Apr 11, 2011

引数で画像ディレクトリ、出力aviファイル名、fpsを指定。
12か24 fpsぐらいが調度良い。デフォルトは24 fpsになってます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment