Difference between revisions of "Ffmpeg"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
=Creating Time Lapses= | =Creating Time Lapses= | ||
ffmpeg -r 30 -i img_%04d.jpg -sameq -s hd720 -vcodec libx264 -vpre hq -crf 25 ./output_30fps.mp4 | ffmpeg -r 30 -i img_%04d.jpg -sameq -s hd720 -vcodec libx264 -vpre hq -crf 25 ./output_30fps.mp4 | ||
+ | |||
+ | =Renaming Image Files Script= | ||
+ | <pre> | ||
+ | <?php | ||
+ | $ducks = glob("*.jpg"); | ||
+ | |||
+ | $pref = "IMG_"; | ||
+ | $suf = ".jpg"; | ||
+ | |||
+ | $count = 0; | ||
+ | foreach($ducks as $duck) | ||
+ | { | ||
+ | $cmd = "mv $duck $pref" . str_pad($count, 4, 0, STR_PAD_LEFT) . $suf; | ||
+ | echo $cmd . "\n"; | ||
+ | #system($cmd); | ||
+ | $count++; | ||
+ | } | ||
+ | ?> | ||
+ | </pre> |
Revision as of 09:38, 30 July 2014
Linux Installation
- rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
- ffmpeg-php must be compiled by source
Creating Time Lapses
ffmpeg -r 30 -i img_%04d.jpg -sameq -s hd720 -vcodec libx264 -vpre hq -crf 25 ./output_30fps.mp4
Renaming Image Files Script
<?php $ducks = glob("*.jpg"); $pref = "IMG_"; $suf = ".jpg"; $count = 0; foreach($ducks as $duck) { $cmd = "mv $duck $pref" . str_pad($count, 4, 0, STR_PAD_LEFT) . $suf; echo $cmd . "\n"; #system($cmd); $count++; } ?>