Video Editing

From Wiki
Jump to: navigation, search

Create video using gource:

gource -1440x960 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.avi

combine (cat) video files:

mencoder -oac copy -ovc copy -forceidx foo1.avi foo2.avi -o foo3.avi

create time lapse video from source video:

mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3 -vf framestep=4 -fps 120 -ofps 30 file.avi -o output.avi

Note: fps = ofps*framestep. For example, if you meant to encode every 3rd frame (3x speed-up) fps would be 90 (3x30).

split video into frames:

ffmpeg -i video.avi -r 30 -f image2 image-%07d.png

create time lapse video from image files:

mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -o test.avi -mf type=png:fps=30 mf://@files.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -vf scale=1920:1080 -o test.avi -mf type=png:fps=30 mf://@files.txt

low quality:

mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi -mf type=png:fps=20 mf://@files.txt

add song:

mencoder -oac copy -audiofile foo.mp3 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 -o output.avi -mf type=png:fps=30 mf://@files.txt

convert avi to flv (flash):

ffmpeg -i file.avi file.flv