From: Chris H. <mo...@de...> - 2005-08-24 21:17:34
|
Hi Artur Thanks for the script it was what I was looking for. I note on my PC that it takes 0.1 sec on average to convert a frame (1200 frames in 2mins) so it is not really practical for me for on the fly conversion but fine for cron jobs. I also notice that there are quite a few artifacts visible which presumably is normal for this conversion to AVI. cheers Chris > Hi, > > the ffmpeg use some rules when reading the jpg. If I'm not wrong, the jpg > need > to be in the following syntax name+number+.jpg and the command is > > ffmpeg -i tmp%d.jpg out.avi > > in the following example I send a send a script that create a avi with all > the > jpg from the previous day and send it by email. > > -//- > > #!/bin/bash > # criar filme diario do motion > ADDR=xx...@yy... > CAM=cam2 > > ANO=`date -d yesterday +%Y` > MES=`date -d yesterday +%m` > DIA=`date -d yesterday +%d` > > TMPDIR=`mktemp -d /tmp/motion-diario.XXXXXXX` || ( echo "error creating > tmpdir" > ; exit 1 ) > > cd $TMPDIR > i=1; > for x in `echo /var/shots/$CAM/$ANO/$MES/$DIA/*/*/*.jpg`; do > cp $x tmp$i.jpg; > ((i++)); > done ; > ffmpeg -i tmp%d.jpg -f avi -vcodec mpeg4 $ANO$MES$DIA.avi ; > #ffmpeg -i tmp%d.jpg -f avi -vcodec msmpeg4 $ANO$MES$DIA.avi ; > find . -name '*.jpg' -exec rm {} \; ; > > echo "" | mutt -x -a $ANO$MES$DIA.avi -s "report diario de $ANO$MES$DIA" > $ADDR > > rm $ANO$MES$DIA.avi > > cd - > > rmdir $TMPDIR > > exit 0 > > > > ---------- Original Message ----------- > From: "Chris Heap" <mo...@de...> > To: mot...@li... > Sent: Sun, 21 Aug 2005 10:08:21 +0100 (BST) > Subject: [Motion-user] jpg Conversion to mpeg > >> I store jpg's using the original file format of motion and >> I have been using xanim to display a moving sequence of the jpg's. >> >> I wish to retain the individual jpg images (for fine detail >> retention) but to be able to create an mpg file on the fly from >> these jpg's and play the .mpg from a web page. >> >> I've tried using ffmpeg (version 0.4.8 rpm with fc4) but get the >> following >> error message: >> >> ffmpeg -i *.jpg a.mpg >> >> 59-01.jpg: Unknown format >> >> and I seem to remember recursion down through the directory tree with >> ffmpeg was a problem for me in the past. >> >> Is there a preconversion that I need to carry out prior to using ffmpeg? >> Are there any more appropriate methods? >> >> Many thanks >> >> Chris >> >> ------------------------------------------------------- >> SF.Net email is Sponsored by the Better Software Conference & EXPO >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle >> Practices >> Agile & Plan-Driven Development * Managing Projects & Teams * >> Testing & QA Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf >> _______________________________________________ >> Motion-user mailing list >> Mot...@li... >> https://lists.sourceforge.net/lists/listinfo/motion-user >> http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > ------- End of Original Message ------- > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Motion-user mailing list > Mot...@li... > https://lists.sourceforge.net/lists/listinfo/motion-user > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > |