CompilingKino

Ok, SlackWare doesn’t come with Kino! So I’ll try to do everything “by the book” (ie. the README file). This is for Kino 0.7.5.

SlackWare

Kino

Dependencies first...

libdv-0.103

./configure
make
make install prefix=/usr/local/stow/libdv

“The Linux IEEE 1394 subsystem is required for DV/1394 I/O. Linux1394 comes with Linux kernels 2.4+.” – Nothing to do, I guess. 😄

libraw1394-0.9.0

./configure
make

Here the trouble starts...

...
ranlib .libs/libraw1394.a
creating libraw1394.la
(cd .libs && rm -f libraw1394.la && ln -s ../libraw1394.la libraw1394.la)
gcc -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -Wall -Wunused -c testlibraw.c
testlibraw.c:22:31: missing terminating " character
testlibraw.c:24: error: parse error before "version"
testlibraw.c:25: error: stray '\' in program
...

I added trailing backslashes to lines 23, 24, and 28. And now it works. Weird! This is for libraw1394 0.9.0.

make
make install prefix=/usr/local/stow/libraw1394
make dev

The last one was suggested while installing... I will worry about permissions later. I *think* I want to change the group to “disk” and give that group rw permissions...

libavc1394 0.4.1

This one requires libraw1394, so I use stow to install what I have up to now.

cd /usr/local/stow
stow libdv
stow libraw1394
./configure
make
make install prefix=/usr/local/stow/libavc1394

dvgrab 1.6

./configure
make
make install prefix=/usr/local/stow/dvgrab

Time for some testing!

stow libavc1394
stow libdvgrab

Do it, as user alex:

dvgrab --frames 200 dvgrabtest-

Oops, another error:

dvgrab: error while loading shared libraries: libdv.so.4: cannot open shared object file: No such file or directory

But I remembered what it was – always run ’ldconfig’ after installing new libraries... ;)

ldconfig

Try again as user alex:

dvgrab --frames 200 dvgrabtest-

Next problem:

raw1394 - failed to get handle: Permission denied.

Right, that’s the permission thing I postponed earlier.

chgrp disk /dev/raw1394
chmod g+rw /dev/raw1394

Try again as user alex:

cd /mnt/kino
dvgrab --frames 200 dvgrabtest-

Error: no camera exists

That one’s easy, I hope. The camera switched itself off because I wasted so much time...

Capture Started
"dvgrabtest-001.avi": buffer underrun near: timecode 00:08:39.07 date 2004.11.07 00:15:22
This error means that the frames could not be written fast enough.
"dvgrabtest-001.avi":    28.30 MB 200 frames timecode 00:08:39.07 date 2004.11.07 00:15:31
Warning: 27 dropped frames.
"dvgrabtest-002.avi":    28.30 MB 200 frames timecode 00:08:39.07 date 2004.11.07 00:15:39
"dvgrabtest-003.avi":    28.30 MB 200 frames timecode 00:08:39.07 date 2004.11.07 00:15:47
"dvgrabtest-004.avi":     3.84 MB 27 frames timecode 00:08:39.07 date 2004.11.07 00:15:48
Capture Stopped

It works!!

As for the frames being dropped, I faintly remember reading something somewhere about tuning your harddisk so that it uses DMA or something. Based on the FAQ ¹ I think that’s not it:

¹

hdparm -v /dev/hdd

/dev/hdd:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    =  8 (on)
 geometry     = 238216/16/63, sectors = 240121728, start = 0

Looking at the output again, I suspect that it only happened on the first file, probably because the disk was spun down and just woke up... I’ll keep an eye on this.

On to compile kino!

./configure

Gah! A dependency not noted in the README file:

checking for samplerate... Package samplerate was not found in the pkg-config search path.
Perhaps you should add the directory containing `samplerate.pc'
to the PKG_CONFIG_PATH environment variable
No package 'samplerate' found
configure: error: samplerate.pc not found, install libsamplerate-devel (see http://www.mega-nerd.com/SRC/)

libsamplerate-0.1.2

./configure
make
make install prefix=/usr/local/stow/dvgrab

Kino still doesn’t want to configure, so I’ll run ldconfig again... But that wasn’t what I needed. Here’s the output of configure for SRC:

Compiling some other packages against libsamplerate may require the addition of “_usr_local/lib/pkgconfig” to the PKG_CONFIG_PATH environment variable.

Ok.

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

(Turned out that PKG_CONFIG_PATH was empty on my system anyway, but so what.)

Tried .*configure again for kino – success!*

make
make install prefix=/usr/local/stow/kino

More trouble? Not really:

test -z "/usr/local/etc/hotplug/usb" || mkdir -p -- "/usr/local/etc/hotplug/usb"
mkdir: cannot create directory `/usr/local/etc': Permission denied

That’s because I build and install (to stow) using my alex account, not root... What to do? And why isn’t this code using _usr_local/stow/kino/etc/hotplug/usb? Damn.

What I did: I edited the linux-hotplug/Makefile and set hotplugscriptdir = _usr_local/stow/kino/etc/hotplug/usb, knowing full well that its contents would have to end up in _etc_hotplug/usb. This is where the real stuff is! When I looked at it again, however, I found that it was just a little script to tell hotplug about USB jogshuttles. And I don’t have any of those. So I’ll just let it be. 😄

This time, no problems:

make install prefix=/usr/local/stow/kino

Now, as root, I used stow to install kino.

cd /usr/local/stow
stow kino

And as user alex, I’ll test it!

Compiling and writing this page, and posting on the Kino forum took me exactly one hour and thirty minutes.

Note: Stow installs the kino icon in _usr_local/share/icons. I had to manually add a copy to _usr_local/share/icons/hicolor/48x48/apps. Then it worked.