Size: 419
Comment:
|
← Revision 5 as of 2011-02-09 14:28:00 ⇥
Size: 892
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Generating a Rick Roll file = |
= Generating a rick-roll file = |
Line 5: | Line 4: |
{{{ #! /bin/bash |
{{{#! /bin/bash |
Line 10: | Line 8: |
cp 1.jpg $i.jpg | cp 1.jpg $i.jpg |
Line 12: | Line 10: |
mencoder "mf://*.jpg" -mf fps=1 -o test.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800 | mencoder "mf://*.jpg" -mf fps=1 -o test.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800 |
Line 14: | Line 12: |
for i in `seq 2 $1`; do rm $i.jpg done }}} The picture you want to be in the movie has to be called 1.jpg for this script to work. Converting the given movie test.avi to a flv is done with the following command {{{ ffmpeg -i test.avi -vcodec libx264 -vpre libx264-superfast -f flv test.flv |
|
Line 16: | Line 25: |
The picture you want to be in the movie has to be called 1.jpg for this script to work. | To do the whole thing in a single step {{{ for i in `seq 2 $1`; do ln 1.jpg $i.jpg done ffmpeg -i %d.jpg -r 25 -vcodec libx264 -vpre libx264-superfast -f flv -y timinutter.flv for i in `seq 2 $1`; do rm $i.jpg done }}} |
Generating a rick-roll file
Generating an avi or mov movie from a single picture file is done with the following script:
for i in `seq 2 $1`; do cp 1.jpg $i.jpg done mencoder "mf://*.jpg" -mf fps=1 -o test.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800 ffmpeg -i test.avi test.mov for i in `seq 2 $1`; do rm $i.jpg done
The picture you want to be in the movie has to be called 1.jpg for this script to work.
Converting the given movie test.avi to a flv is done with the following command
ffmpeg -i test.avi -vcodec libx264 -vpre libx264-superfast -f flv test.flv
To do the whole thing in a single step
for i in `seq 2 $1`; do ln 1.jpg $i.jpg done ffmpeg -i %d.jpg -r 25 -vcodec libx264 -vpre libx264-superfast -f flv -y timinutter.flv for i in `seq 2 $1`; do rm $i.jpg done