NOTE!: If you downloaded clover-0.1.tar.gz before Thursday August 4th @ 3:00pm, your archive is missing 'clover.h', which I accidentally left out of the tarball. The new tarball is in place and includes this file.
Big thanks to Richards Michael for pointing this out!
clover is now available as a binary package.
Thanks to Jeremy Ellis for being my beta-tester.
clover 0.2 is available in a click-install package clover-0.2.pkg This package will install clover as /usr/local/bin/clover
clover 0.1 source-code is available here clover-0.1.tar.gz
.
The only difference between 0.1 and 0.2 is some futzing with the xcodeproj file. I'll update the source tar later today when I have time.
Hi. I'm Nathan Ramella, and this is 'clover'. A command line utility for recording
digital video via firewire from mpeg tuner devices such as the Motorola DCT-6200.
Clover is named after our dog who's about 13 months old.
This application does not support capturing from DV devices (although it could if
you integrated the original code from AVCVideoCap.app back into it, but I wanted
to make this as simple as possible for other people to use.)
This package is based on AVCVideoCap.app, which is distributed with the FireWire
SDK available from Apple. This package also requires AVCVideoServices.framework
from the same SDK package.
I wrote this after looking around for a CLI utility to control my DCT-6200
and being unable to find anything that would do so. AVCVideoCap.app is a nice
example of how to use the AVCVideoServices.framework, but its captive UI made it
unusable for the purposes I wanted. After seeing that there was a general need
for a CLI utility I set out to make it happen.
I'm not a C++ programmer or an Objective-C/C++ programmer, so I apologize for
the mixing in of a bit of C and the likely poor architecture of the application,
if you're a C++/Objective-C++ brain I'll happily accept any modifications that
you think can improve this project. You can e-mail me nar AT hush.com with
any diffs you have and I'll be happy to merge them in.
The utility is pretty basic and covers the following tasks:
1) Searching for a valid MPEG tuner device (It defaults to the first one it
finds, and is statically defined as '0' in the device index. This should
be a bit more dynamic and will change in the future. Make sure to unplug
any DV devices (Cameras, etc) you might have plugged in to ensure that
your tuner device is found.
2) You can specify a channel to change to before recording using the '-c' flag.
3) You specify the duration (-d) (in minutes), and an outfile (-o) (which
is always overwritten, never appended). I should make it append, but
I'm unsure of how that will work with transport streams, it could break
things it might not. Haven't tested it yet. So for now, we just open it as
a new file every time.
3) When running it seems to be pretty low resource usage, 1-1.5% cpu and just
the diskio of it being written. I was able to successfully capture video
while watching HD content on my Mac Mini so this may be a feasable background
activity without any modifications.
To recap, if you wanted to record a show on channel 67 for 60 minutes and save
it to a file called 'my_recording.ts', you could run clover with the following
command line options:
clover -c 67 -d 60 -o my_recording.ts
clover also includes a 'verbose' setting that will show you some debug information
regarding its activity and how the recording is progressing.
My intent now that this is complete is to write a Python scheduler that will use
XMLTV for scheduling recordings, making a complete DVR system. My hope is that by
providing the source code for this project that it will empower others in using
the firewire capture capabilities of AVCVideoServices.framework as I've added some
general functionality to make it pretty simple. You can see from clover.m how
simple it is to use.
This source code is provided in accordance with Apple's SDK header license, all
of my modifications are provided in the same spirit. You're free to redist/use
this code within the terms of the Apple license. I make no promises of its
suitability for production use, it might set your computer on fire. So use common
sense.
I've provided the AVCVideoServices.framework in this tar ball. You may need to add
it to your frameworks directory to get it to compile and run.
-Nathan Ramella AKA Synthesizer Patel (nar@hush.com)