User:Delimiter/Video Antics

From ConShell
Jump to: navigation, search


How to perform various functions

Capture video from my webcam using mencoder

mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 \
-nosound -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o ./Desktop/webcam1.avi

Capture video (stream) from my webcam using vlc

Unconfirmed, need to test.

vlc -vvv v4l2:///dev/video0:norm=ntsc:size=640x480:adev=/dev/dsp:audio=0  --sout \

Capture video from Digital camera (ZR-20)

dvgrab --format dv2 filename

saves as filename001.avi @720x480 30fps This file is playable in both xine and mplayer, although in the latter the aspect is screwed up (too skinny). There is a 1024MB limit on the size, but dvgrab will continue to capture using the next incremented filename e.g. filename002.avi.

file filename001.avi
filename001.avi: RIFF (little-endian) data, AVI
(720x480) 1048755376 bytes

To reduce the 1G movie by a factor of ten.

dv2jpg filename001.avi filename.avi

converts captured filename.avi @352x240. Note: dv2jpg seems to compress to 1/10th the size, so 1GB results in about 104MB

See alternate ending below (How to make a VCD...) to also learn how to stitch them together. Here next is how to make a DVD!


Start up kino and load each avi file in turn (there's an icon for appending a loaded file). Once all the bits are loaded up, use the export function to create a DVD. The result will be a dvdauthor.xml file.

The next steps look like this on my system.

cd /share2/video/work/
mkdir dvd
dvdauthor -o dvd -x filename-dvdauthor.xml 
mkisofs -dvd-video -o dvd.iso dvd/
growisofs -dvd-compat -Z /dev/scd1=dvd.iso

Afterwards, some cleanup

rm -rf dvd/ dvd.iso

Video pulled from a Treo 650

The format appears to be 3GP. Mime-type: video/3gpp. Dimensions: 176 x 144 Plays just fine in mplayer & Real Player 10.

Convert MOV files pulled from Kodak Easyshare DX6490 camera

Video clips taken from the Kodak are in MOV format (video/quicktime)

Dims: 352 x 288
Codec: H.263
Framerate: 20/s
Bitrate: n/a
Audio Codec: Mu-law audio
Audio Bitrate: n/a

Or, as reported by mencoder...

VIDEO:  [h263]  320x240  24bpp  20.034 fps    0.0 kbps ( 0.0 kbyte/s)

Unfortunately these clips do not play well in totem movie player as there is a significant amount of stuttering. To view them normally it is necessary to convert. Use a script to call mencoder with the right options.

mencoder "$1.MOV" -oac lavc -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:acodec=mp2:abitrate=128 -o "$1.avi"


./mov2avi p045

This also appears to reduce the size by about 1/3rd (verify)

See also:

How to make a VCD from a (bunch of) AVI movie(s)


Note this step is optional... if digitizing more than about 4m of video pulled in via dvgrab above, the files will be chunked at 1GB so you'll have filename001.avi, filename002.avi ... filenameNNN.avi. This command will stitch them together.

mencoder -oac copy -ovc copy filename???.avi -o joined.mpg

This next command will create an mpg from the joined.mpg that is compliant to the VCD specification.

ffmpeg -i joined.mpg -f vcd vcdmovie.mpg

Then use mkvcdfs (from vcdtools) to create these files: vcd_image.bin and vcd.toc

mkvcdfs vcdmovie.mpg

Burn those files to a CDR & that is your VCD.

cdrdao write --device /dev/sg0 --driver generic-mmc vcd.toc

Note: I have yet to get one of these VCDs to play in my commercial off-the-shelf DVD players. However they seem to play fine in linux using mplayer and xine... so I don't know what's up with that.

How to create "Screencasts"


Digitize a DVD and load onto an iPOD


Basically the steps are 1. Digitize the DVD title using acidrip. Using the defaults should be fine. 2. Use ffmpeg via winff ... add the digitized AVI from step 1 and choose Xvid to iPod 4:3 (or 16:9) depending on the source video dims. Set the output dims to 320x240 or 352x240 depending on the input. The result is about ~400mb .mp4 file compatible with iTunes and iPod.

Convert a .TiVo show into iPod

  1. Using TiVo Desktop, transfer the show to windows computer, then cut/paste into franco:/share2/video/fromtivo/
  2. Hop on franco and run tivodecode -m 1234567890 -o outfile.mpg infile.tivo
  3. Hop on monk and run winff. Load the outfile.mpg. Choose iPod Xvid 4:3 size 352x240 audio 96 and Convert.
  4. The result can be imported into iTunes and should play on iPod.

Apps to install

Not all of these are called out above.