Difference between revisions of "Ffmpeg"

From KeegansWiki
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

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++;
        }
?>