Example transforming videos

September 13, 2009 by · Leave a Comment
Filed under: Phone, Video 

I recently made some video editing on videos i copied to and from my cell phone and realized some of the stuff might be rather esoteric and hard to find good examples on how to do. Basically just going to post some minor tips and tricks that I picked up, and some very simple commands to use with mencoder, ffmpeg and kino.

I used mencoder and ffmpeg to do some of the basic edits, like turning videos around etc. After the basic video snippets where done, throw them into kino and make the final cut, and then recode the video into a distributable format (10 minute video in dv format as used in kino = 2.1gig data, while 10minute divx of the same video = 170 meg).

#Rotate video 90degrees
oan@laptop4:~$ mencoder -o lala.avi -vf-add rotate=1 V170709_12.54.AVI -oac copy -ovc lavc

#Postprocessing filters, ac = high quality
oan@laptop4:~/Desktop$ mencoder -o lala.avi -vf pp=ac V170709_12.54-recode.AVI -oac copy -ovc lavc

#Transcode video so it works on cellphone (KC910), this “works for me”(tm)
oan@laptop4:~/Videos$ mencoder -o lala.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4 alice-final.avi

# Create a black 2 second frame (25 fps, 50 frames), I used this as a filler between
# two movies. There’s probably easier ways of doing this, but it “works for me”(tm)
oan@laptop4:~/Pictures/2009-08-01$ ffmpeg -r 25 -loop_input -i black.jpg -vcodec mjpeg -vframes 50 -y -an test.avi

Finally I put the videos together in kino in the order I wanted, with black frames in between and effects fading from the videos into black, and so forth, making for smooth transitions.