Saturday, November 29, 2008

Kino is keen! dvgrab is <bang head> keen too!

Kino, the digital video (dv) non-linear editor on open source platforms (but notably Linux) is really keen. It will find your camcorder if it's plugged into firewire and start using it for capture.

This pretty much "just works". Life is good.

Perhaps you decide you need to be using dvgrab--after all, you're just recording the video--not really trying to edit or view it (after all the image is already displayed on the back of the camcorder....)

so:

dowdberry@longplay:~$ dvgrab grabname
Error: no camera exists

Okay, specify the camera....

dowdberry@longplay:~$ dvgrab -card 0 grabname
Error: no camera exists

(Do that about a dozen different ways. Try it as root. Pass in /dev/raw1394 try to stdin /dev/raw1394... still nothing. Read the manpage for dvgrab. Re-read the manpage for dvgrab. Re-re-read the manpage for dvgrab. Google for about an hour. Look at the strace of kino and dvgrab... nothing. Learn about testlibraw. Re-read the dvgrab strace. Re-read the kino strace.)

Finally, closely reading the kino strace shows this CLUEFUL snippet:


write(2, ">> Starting Capture", 19) = 19
write(2, "\n", 1) = 1
write(2, ">> AV/C ", 8) = 8
write(2, "Enabled", 7) = 7
write(2, "\n", 1) = 1
write(2, ">>> Using iec61883 capture", 26) = 26
write(2, "\n", 1) = 1
open("/dev/raw1394", O_RDWR) = 6
write(6, "\1\0\0\0\0\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 52) = 52

<Cluebulb illuminates!>

Hmmm, I saw something about "avc" in the dvgrab man page....


dowdberry@longplay:~$ dvgrab -noavc -card 0 junk
Warning: Cannot set RR-scheduler
Warning: Cannot disable swapping
Capture Started
^C"junk002.dv": 8.81 MiB 77 frames timecode -1076813608:-1076813816:-1209659343.195702400 date 2008.11.29 12:15:43
Capture Stopped

medberry@longplay:~$ file junk002.dv
junk002.dv: DIF (DV) movie file (NTSC)

Woot!

Now... what was I going to do with that video? Oh yeah, dvsource to dvswitch to dvsink