Tuesday, March 2, 2010

From DV to Vimeo on Linux

Short summary of "how to get a movie from DV camera to Vimeo on Linux" (after several tries with 16:9 format rendered as 4:3 :-)).
Download data from camera (used Firewire port and Kino). Only needed thing was to load raw1394 module and add permissions to r/w to /dev/raw1394 before launching Kino.
Exported movie as DV-AVI (type 1).
Converted the resulting AVI to H.264 (and rescaled it on the way).
mencoder -profile vi -aspect 16:9 -vf scale=848:480 $1 -o $2
Here the vi profile refers to a section in ~/.mplayer/mencoder.conf:
[vi]
profile-desc="Lo-quality x264 video with aac"
vf="pp=ci"
ovc=x264=yes
oac=lavc=yes
lavcopts="ac3"
x264encopts="threads=auto:subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:qp=30"
Value of the qp parameter in x264encopts determines quality - the lower, the better (and larger file). In general 10 seems very nice, 30 acceptable for not-so-hi-quality source.

Actually - the size it's rescaled to should probably be chosen better...