dvgrab and dv players Guides
Software
Command summary
Instructions Controlling the camcorder To capture footage from a digital camcoder, hook it up with a firewire cable and make sure you have control of the unit: dvcont play, ff, stop, rewind, record, pause, status, timecode
Preview (this works fine) playdv --no-mmap /dev/ieee1394/dv/host0/NTSC/in
Piped output (drop the -i when using the latest dvgrab?) dvgrab -i | xine -D stdin://#demux:rawdvInput from dvgrab can be piped to xine in this way; it didn't work well for me.
Capturing To initiate the capture, press the play button and immediately issue grabThis is a script at /usr/local/bin/grab. Alternatively, issue the whole string manually: dvgrab --autosplit --format raw --frames 7500 --timestamp --dv1394 /dev/ieee1394/dv/host0/NTSC/in Tape01- This line is correct for dvgrab 1.2.1, which appeared in February 2003. Output format --format dv1 | dv2 | raw | test | qt | jpeg Using raw files means that you can't play the uncompressed
files in Windows without converting them first. It's better to
stick with the raw files for simplicity and for exporting back to the
camcorder, and transcode handles Capture jobs can be started remotely and delayed. Remote capture If the machine is busy compressing and you have more tapes to
capture, leave the camcorder hooked up with the tape inside it and
start the capturing remotely once the compression is completed. This works on miniDV and Digital8 camcorders. dvcont rewind To start the capturing, issue screen to start a virtual terminal. To see a list of screen key bindings, press Ctrl-a ?Here are some examples: detach ^c d Then copy and paste the following one line at a time into one command: dvgrab --autosplit --format raw --frames 7500 --timestamp --dv1394 /dev/ieee1394/dv/host0/NTSC/in T- Alternatively, just use the script /usr/local/bin/grab, which
contains the same line. Then detach the screen, either by a key shortcut or by going into a second terminal and issuing screen -listand then detaching using something like this: screen -d 17989.tty1.spello You can now log out cleanly. Later, you can monitor progress by
screen -r 17989.tty1.spello After reattaching, complete the job by pressing Ctrl-C (SIGINT) to close the last file. If you don't reattach, you can instead send a SIGINT to the process
pid to complete the last file: kill -2 <pid dvgrab> This cleanly closes the last file and exit dvgrab, as can be verified in the
log file. Rewind the tape when you're done -- you can even eject it if
you have a local person who can swap it out: In earlier versions of dvgrab, it used to be possible to pipe the output to a logfile, as follows: dvgrab --autosplit --format raw --frames 7500 --timestamp --dv1394 /dev/ieee1394/dv/host0/NTSC/in T- >& logfile &This method no longer works as described, though there may be a variant that will still work -- see the dvgrab man page. In the meantime, use screen, which in any case is more elegant. Delayed execution To instruct a capture job to start a few hours from now, you probably need to put the dvgrab string into a shell script, let's call it grab.sh, and then issue this command:
where <tt:mm> is the hour and minute to begin the job. Note
that you have to give the full path of the file to be run. Update 1 January 2003 Arthur Peters has written some very useful dv utilities, available as dv-utils 0.2.1-1 from the main debian distribution and as dv_utils-0.2.1.tar.gz from http://www.singingwizard.org/programming.php. They include several small programs for moving between dv, avi, and mov (Arthur works on libquicktime), and a few others:
" The main tool is dv2dv. It is a file converter that converts from between AVI, quicktime and raw DV without decoding." Status prior to the debian installation fall 2002 Both gubbio and cyberspace handle dvgrab and kino. Only gubbio has playdv and dv1394in and out; they rely on the new dv1394 driver, which is in the 2.4.19 kernel. There are several players to handle these different formats. Kino plays well on cyberspace but not on gubbio. Quicktime will play raw dv, but currently lacks the right codec. I could also install xdvplay, based on the libdv codec. Aviplay handles uncompressed avifiles fine, but it rarely compiles and I don't have a working copy on gubbio. Mplayer does great on divx and may handle dv on cyberspace. It's too slow on gubbio. If you leave dvgrab running, you can close the last file cleanly with kill -2 <pid> -- see commands for details. How to use dvgrab To get five-minute files of the raw dv format, automatically named Tape02-001 etc., enter:
How to use dv1394in To import a file raw from the camcorder, issue:
It does a beautiful job. How to use dv1394out To export a raw dv file to the camcorder, issue:
For details on the tweaked setup, see firewire. How to control the camcorder: 1. start camera playback:
2. preview:
3. stop camera:
4. prepare to record:
5. start recording after issuing dvcont record pause:
5. view in monitor:
Installation October 2002 update On 3 Oct 2002, I got dvgrab-dv1394 from Dan Dennedy -- that is, the dvgrab version that goes with the new dv1394 driver. I compiled it and placed it in /usr/bin/dvgrab -- the other dvgrab is in /usr/bin/local/dvgrab and comes up as default. I made a symlink from /dev/dv1394 to the working /dev/1394in. The dvgrab-dv1394 lacks the --index switch, so it likely won't support large file sizes. It also doesn't support the raw format, and I found it doesn't split the files at scene breaks ( --autosplit doesn't work). I kept having trouble with this version. It produces garbled sound and poor video, sometimes with block effects. However, I reestablished the /dev nodes needed for the old dvgrab, which continues to work fine! Dan also sent me the dv1394io utility by Dan Maas. When I tried to compile it with default gcc, I got this:
I then swithed to /usr/bin/gcc and got part that hurdle -- evidently this version was compiled to handle C++. Next I ran into this:
I opened the dv1394device file and added a full ref to dv1394.h in the kernel and it got past this point, but it still wouldn't compile. Dan Dennedy said compile with g++ instead of gcc (change the Makefile), and in fact this worked flawlessly. I have no idea why. This produced a number of files, but as far as I could tell it's dv1394in and dv1394out that are the useful binaries. I copied them both to /usr/local/bin -- they should be used for copying to and from the camcorder. On 7 October 2002, I used dv1394in to transfer a 1 1/2 hour LP tape; it created a 20GB file. Kino read it fine, but didn't see the scene changes. I asked it to export this huge file to create a file that is split in two at 107,000 frames -- this would create a one-hour segment that could then be exported to a new SP tape, and a half-hour remnant. This worked! I then read the 107,000 frame file into kino -- and it shows the scene
changes! First installation I downloaded dvgrab 1.01 as a tarball and installed it. To make the new file execute, I had to move dvgrab from /usr/local/bin to /usr/bin and it started up, apparently accepting the libraw library. Test it using
It should produce a small avi file. I had to build a new kernel to make firewire work -- with the help of gscanbus to diagnose the problems -- but once I had done that, dvgrab WORKED!! I tested it a bit and then did this:
This produces three-minute .avi files on the video harddrive. Pretty cool, eh? While my little production system was capturing, I kept working -- no overhead taken up by huge programs! dvgrab produced ten 3-minute files over a half-hour period of about 650 MB each. I then switched to Windows and downloaded the Windows Media 8 Encoding Utility, a command-line codec. It took seven and a half hours to compress three minutes -- down from 650MB (a CD) to 3MB !! That's a megabyte a minute, or a full hour comfortably on a CD. Note that dvgrab can grab to three different formats: two avi formats and a raw format. I used the default avi format, which plays perfectly in Windows Media Player. The results were extremely clear, but with some color distortion at the bottom of the screen. Possibly this is due to the High-8 format, or it could be due to dvgrab. Here's material from dvgrab's forum: Here's a remark on capturing: "Maybe someone can tell me what data-mode would be best to capture under EXT3 (journal, ordered or writeback, I think journal is too slow, but I can't say if ordered or writeback is better). Maybe it's generally better to use EXT2 or any other filesystem for capturing." And a possible compatability issue between V4L and kino: "I've found that if I don't load any of the Marvel/G400-TV video4linux modules, that XVideo support in Kino does work!" On kino, Arne Schirmacher writes, "Please use 2.4.12 or 2.4.16 kernel." On the new dv1394, there's Dan Dennedy: "A new driver called dv1394 in the linux1394 CVS aims to make DV export more stable and predictable. We hope it is ready for general use by the end of the year." On kino's future, Thomas Ostreich writes, "there will be 2 export modules in 0.5.2. One for raw DV with sound interleaved and one for AVI with sound as extra track in any format." xmms is the most popular music player -- the equivalent to WinAmp. Xanim is at http://xanim.va.pubnix.com/ -- there's lots of excellent development work being done there, and detailed information about supported codecs. See Mplayer installation. Xanim is not working with dv files -- neither dv1 or dv2. I discovered Suse has installed the xanim codecs in /usr/lib/xanim/mods/ Before you install something, check the Suse repository to see where they put things. Use
to display verbose errors. MainActor find / -name MainActor -mount -print | less /usr/share/doc/packages/MainActor Good news: MainActor will edit video grabbed in dvgrab's -dv2 format! Down to the millisecond. Don't know how much I'll like it, but it works. Note that it takes a while to load a clip, and it doesn't handle the -dv1 format. That could be a matter of adding a codec of course. MainActor will also play the video, and the sound is rendered perfectly. However, the video runs slowly and the two are completely out of synch. The video noticeably speeds up when the sound is done, so this looks like it's a CPU constraint! Which is fun -- you should see much better results with the new machine. Blender is a 3D animation program. http://www.blender3d.com/ --
see their ipaq page!
|
|
|
|
|||||
Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles |