Ffmpeg
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
CLI Stuff
Mp3
Fade in and out
ffmpeg -i out.mp3 -af 'afade=t=in:ss=0:d=3,afade=t=out:st=129:d=7' promise_final.mp3
Trim size
ffmpeg -i promise.mp3 -ss 00:00:45 -t 00:02:16 ~/Desktop/out.mp3
Webm
HD, 14Mbps bitrate
ffmpeg -ss 01:18:02 -t 00:00:19 -i input.mkv -b:v 14M -c:v libvpx -an output.webm
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++; } ?>