Mailinglist Archive: opensuse (818 mails)

< Previous Next >
Re: [opensuse] howto get details of 1394 (firewire) device creation on camera plug-in (need BASH test)
On 09/26/2011 01:34 AM, Roger Oberholtzer wrote:
On Sun, 2011-09-25 at 13:36 -0500, David C. Rankin wrote:

I use firewire cameras, not video. They plug in just fine. They do not
have any local storage, so access is really just grabbing a new image. I
have a udev rule that ensures proper permissions. I think this is
different for video cameras. But the general idea may be the same:

KERNEL=="raw1394*", NAME="%k", GROUP="video", MODE="666", OPTIONS="last_rule"
KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video", MODE="666",
KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video", MODE="666",

The only thing I have found is that if the cameras are unplugged/plugged
too quickly, the 1349 drivers sometimes complain about which devices is
a master. (Or some such similar text - it never happened enough to
become an issue that I remember in detail.)

Does dvgrab list all the interesting info about the found cameras when
it starts? If so, perhaps that shows a difference.


Thanks. dvgrab doesn't give you a whole lot of information when it starts other than telling you it:

Found AV/C device with GUID 0x08004601017ede99

It gives you that information regardless. (as long as it can find a device). If there is no camera found it just exits with the "No Camera Found" message.

In my case, the camera is always found and dvgrab can ALWAYS control it (rewind, play, etc..) The problem I'm dealing with is when it starts 'play' to begin the capture - sometimes there is no capture, nothing recorded to disk, even though dvgrab has started the 'play' mode on the camera just fine.

The indication I get on whether there is a successful download started is that dvgrab issues the "Capture Started" message when download begins. For the times when the camera is put in play mode and nothing is downloaded, dvgrab just sits there with the "Waiting for DV..." message (even though dvgrab has rewound the tape and started the camera playing). In either case, dvgrab will play though the entire tape before exiting... (roughly an hour +- 5 minutes)

I am using the following command line to start dvgrab. I just echo the date so I have a reference for when I started the download so I know to check back in an hour to switch tapes and start it again. (the first "Capture Started" message is mine from the CLI [poor choice of words]) The second "Capture Started" message is the one issued by dvgrab. I run dvgrab in a subshell so that any error messages from the dvgrab stderr stream are logged in the correct order and don't get intertwined with any messages from the tee stderr stream (not that I've ever had any from tee). The download/no download issue occurs regardless of whether you run dvgrab in a subshell.

10:37 archangel:/dat_e/dv/new> (echo -e "\nCapture Started: $(date '+%b %e %T')\n"; dvgrab -rewind -timestamp -autosplit=3600 -format raw dcrv- 2>&1) | tee -a /dat_e/dv/capture.log

Capture Started: Sep 26 10:37:52

Found AV/C device with GUID 0x08004601017ede99
Waiting for DV...
Capture Started <== this is the dvgrab message
"dcrv-1999.12.24_17-11-33.dv": 999.98 MiB 8738 frames timecode 00:04:51.18 date 1999.12.24 17:24:26
"dcrv-1999.12.24_17-24-26.dv": 656.78 MiB 5739 frames timecode 00:08:03.05 date 1999.12.24 18:14:28

On thing I could do is to wait for 3-4 minutes after starting dvgrab and then check for the "Capture Started" message -- but frankly, I'm unclear how I would do that from within a script since processing in the script is waiting for dvgrab to finish?? Any ideas on how to do this would be welcomed. I don't know, maybe start a timer in the script before the dvgrab call that waits 5 minutes, checks for the "Capture Started" and if not found, kills the dvgrab PID and issues an error?? I'll have to dig more into BASH to figure that one out. dnh, bkw -- you listening :)

David C. Rankin, J.D.,P.E.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >