Video

From Devipedia

Jump to: navigation, search

Random video notes:

cinelerra and AVCHD

mencoder -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=1920:1080,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:keyint=15:aspect=16/9:threads=4 00126.MTS -vf lavcdeint -ofps 25 -fps 50 -o 00126.mpg

This recipe is to to convert .MTS from a Canon HF100 to .mpg and then do the editing with blender VSE or cinelerra. (Thanks random post on web.)

This is a command to convert a batch of .MTS files : cd to the folder with the .MTS files and

Code:

find ~/ -name '*.MTS' -type f -exec mencoder '{}' -oac copy -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=1920:1080,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:keyint=15:aspect=16/9:threads=4 -vf lavcdeint -ofps 25 -fps 50 -o '{}'.mpg \;


Better than cheese for recording audio and video with webcam. I am able to use jack.

guvcview

Another mastering recipe for mpeg video using lame encoding for audio:

ffmpeg -i startingover.dv   -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2 -acodec libmp3lame   out.avi

Need to rotate iphone video? This does it...

mencoder -ovc lavc -vf rotate=1 -oac pcm orig.MOV -o show4.mpg


When mastering with Cinelerra I find that loud audio tracks often clip when rendering even when the original audio does not. When this occurs, it's easy enough to replace the generated audio output with original pristine audio using mencoder.

mencoder -audiofile ../Music/startingover_show.wav -oac copy  -ovc copy over_again.dv -o starting_over_cmdline.dv

Actually the above estimated the incorrect duration of the song, causing the song to end early. This takes longer to render but gives me the correct result.

ffmpeg -i ../pretty_show.wav -i  pretty_min2.dv -map 1:0 -map 0:0 modified.dv


Convert frame rate with -r:

devin@studio:~/Video$ ffmpeg -i thursday1.avi -r 25 thursday1.mpg

Convert directories of jpegs into avi file:

mencoder "mf://*.jpg" -mf fps=10 -o test.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800

Best avi to mpg results:

mencoder -nosound -ovc lavc claymation.avi  -o claymation.mpg

Grab output of mplayer with recordmydesktop:

# start mplayer
mplayer -loop 0 -vo aa:bold 2010-06-24-210644.ogv

# get window id
xwininfo

# record with captured id
recordmydesktop --windowid 0x3c00002

Final dv to mpeg 4:

mencoder video.dv -mf fps=25 -o video.avi -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame

ogv to mp4:

mencoder initdotd3.ogv -ovc lavc -o initdotd3.mp4 -lavcopts vcodec=mpeg4 -oac mp3lame

dv to ogv:

cat something.dv | ffmpeg2theora -f dv -o output.ogv -

Extract bitmaps from video

First, attempting to 8-bitify images by shrinking and losing resolution and reducing frame rate to drop most frames:

ffmpeg -i intel.avi -r 4 -s 24x24 intel8bit.avi

Extract bitmap images:

ffmpeg -i intel8bit.avi -f image2 foo_%5d.bmp

Note that I then took each image into Gimp and used Desaturate to convert to grayscale, then Levels to reduce image to pure Black or White.

Personal tools