OpenWrt Forum Archive

Topic: Sanity check my idea - Firewire video storage

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

This may be slightly longwinded, but I'll try to cover everything as briefly as I can.

The ambition here is to build a device which will accept firewire video input from a video camera, and write it as an AVI file to a compactflash card. I was talking about this in #electronics on freenode, and it was suggested that this might be doable using something like a WGT634U router board, replacing the miniPCI wifi card with a firewire one and using a USB compactflash reader on the WGT634U's USB host. We're talking about something like the Firestore series of video disk recorders, only for removable flash memory cards. It would be physically compact, low power, and run an open OS (yeay!)

I have made sure that the Commell MP323 miniPCI firewire card uses an Agere FW323 chip, which is apparently supported by the OHCI firewire drivers already available for openWRT. There's apparently also a VFAT driver available which would facilitate writing to the CF card. CF cards which will do the required rates - about 4MB a second - are easily available. It's 25 megabit DV video which we're doing nothing with except wrapping it in an AVI and storing it, so I don't anticipate any bandwidth problems on a board designed to run four 100-megabit ethernet ports at once.

Does this idea pass a sanity check?

The second issue is that I would need software to do the recording. The program dvgrab, which is reliant on at least libraw1394 and libiec61883, does what I want, but of course there's never been any need for it to exist on an openWRT platform. While I'm confident that I can probably follow the instructions to create a working openWRT on a WGT634U, I'm not a software engineer and setting up a cross-compilation environment to port dvgrab and the required libraries is pretty much beyond me. Assuming this whole idea passes the sanity check, I would then be looking to negotiate a fee for an experienced person to port dvgrab, the libraries, and help me get it working. I understand that often people are willing to do this in return for ownership of the test hardware, which would be fine, but WGT634Us are rare enough now that a straight fee might be easier.

Hope I'm asking the right questions in the right way.

Regards,

Jan

heyho,
don't know how much stress your setup would be for the cpu. I don't know how much it needs to do for "wrapping it in an AVI", does it just write down the data with a header or does it also have to convert the input?
About the your thought with the bandwidth of the board, I think it's like on the most boards: one internal nic connected to the switch, which provides the rest of the ports and allows some nice things like vlan tagging the single ports. If you split up the switch into vlans and setup some routing on it, you'll see it's slow because the traffic will travel over the single 100mbit nic from the cpu.

The software side could be done, maybe, we are crazy people and have already software on routers which you normally setup on a server, like subversion big_smile.

crazy_imp

As to the CPU issue I really don't know. There are two types of DV-AVI, either of which dvgrab is capable of creating. Type 1 simply puts the native frames as sourced from the I/O device into an IVAS chunk in an AVI movie - "integrated video/audio stream". This involves no processing, just chopping the data up into frames and wrapping it. This was a new development to allow this efficient way of storing and handling DV - before directshow, AVIs had to have a separate audio and video stream. Type 2 DV-AVIs do that by duplicating the soundtrack, which would presumably be more work.

I don't know how dvgrab does it as I am not smart enough to read and understand the source code, but I can only assume that Type 1 is fairly easy to create.

I suspect it'll just have to be tried and verified experimentally. Again, I just need some support on the software side.

Jan

All packages are nearly build, even if i don't have a minipci firewire card right now, i'll try the stuff later on a good old p1 (with a normal pci card) to see how it performs - help granted & challenge accepted big_smile.
hope it'll work.

crazy_imp

Thanks very much!

I guess if we can figure out roughly what proportion of CPU time it eats up, and how much RAM, we'll have an idea whether it'll work or not.

Jan

Hi,

Sorry I missed you on IRC, crazy!

I should be more available for the rest of the week.

J

PS - your suggestion of the Asus WL500GP router may be better, as the WTG634 apparently doesn't like USB hubs.

(Last edited by JanH on 1 Oct 2007, 06:22)

The discussion might have continued from here.