Building a Multi-Channel PVR System? 344
Dr.Ruud asks: "What would be good ways to build a multichannel VCR? Think of a cluster of 4 PCs, each having 4 TV-cards (with MPEG-hardware on each) and (if necessary) a separate harddisk per TV-card, and maybe a 5th PC that controls the others, holds a DVD-writer and any other necessary hardware. Could it be done in a simpler and cheaper way? See also linuxtv.org, linuxmedialabs.com and of course SouceForge-vcr-projects like Freevo." What would be the best way to go about cutting down the number of machines such a cluster would need? Could this be done by building an all-in-one-wonderbox without it getting really expensive?
And the answer, again, is "MythTV" (Score:5, Informative)
Far more interesting is what ramifications (if any) are there to having 2/3/4 tuner cards in one PC. After all, each tuner card probably needs its own sound card... what else is involved?
PVR Advice... (Score:5, Informative)
16 channels? Err. Okay. If you really want to capture that many at once, you'd likely be better off having one computer per card. You don't need expensive/new hardware to do that. If the card does the processing and funnels the compressed data down to the hard disk, then the processor is little more than a manager. Last I checked, a P3 500 would easily handle a PVR card with hardware compression.
If you have space considerations, go with a dual I suppose. But I wouldn't do more than 2-channels per PC.
Some limitations to keep in mind (Score:5, Informative)
Many of the PVR cards use the KFIR encoder chip in conjunction with a Conexant bt8x8 video capture chip. The bt8x8 does the NTSC->PCM, and sends it to the KFIR encoder, which sends the MPEG data back to the bt8x8. The limitation comes from the fact that there is no hardware-assisted DMA for the data coming from the KFIR chip. That means the host process has to repeatedly poll the PCI memory address for the bt8x8 GPIO ports in order to capture the data.
Putting more than one or may be two of these cards in a single machine would swamp the machine so badly it wouldn't be able to do much else at all, let alone sending the video to disk or a network-attached storage device.
If you can find a PVR card (supported under Linux, good luck putting multiple *anything* in a Windows box) that doesn't blow the PCI bus to pieces when capturing, and you should be able to put quite a large number in a single machine, limited by PCI slots. The KFIR chip captures up to 12Mbps, which is 1.5MB/sec. PCI can peak at 132MB/sec, so as long as busmastering overhead across a dozen cards isn't fatal, you could put them all in a PCI expansion cage on a single machine.
Re:PC Stereo Component (Score:2, Informative)
Re:PC Stereo Component (Score:1, Informative)
and this page has a couple...
http://www.tomshardware.com/howto/20021109/pc_f
Re:PC Stereo Component (Score:2, Informative)
I like my Cooler Master ATC-600 [coolermaster.com], but it looks like they have a number of other options [coolermaster.com] as well (look under "Desktop"). The ATC-600 is just slightly too big for my entertainment center, but it perches nicely on top of it. Now I just need to find a reason to use the thing (now I have a high definition cable feed, the HTPC is useless for recording shows). Also, it's a Micro-ATX form factor, but if you're planning on doing an HTPC, that should be more than enough. Especially if you want the case to fit well in your entertainment center.
Re:Hmmm.. (Score:5, Informative)
If that is the case he should have a look at motion [sourceforge.net] it can handle multiple videodevices and even use multiple inputs on each device.
Jeroen
Re:hmm (Score:2, Informative)
Re:16-channels at once? (Score:5, Informative)
Jeroen
Re:CPU Power (Score:3, Informative)
Thats what I have in mine, and it record Native just fine.
Yeah, a video server for community tv stations. (Score:5, Informative)
I've been working with MNN [mnn.org], the public access station in New York, NY in building a cheap, open source video server out of an old TiVo [mit.edu]. The equipment necessary to program and run television broadcast/cablecast centers is often expensive and proprietary. And unless you do web playback like indymedia [indymedia.org] or freespeechtv [fstv.org], you have to buy the equipment to play the game.
An open, Linux-based multi-encoder like this (accompanied by an open video server) would do wonders for the community media world!
MythTV (Score:3, Informative)
Hmm... how much are you willing to spend? (Score:3, Informative)
Given enough money, anything is possible.
If you want to reduce the number of nodes, you need to increase the capacity of each individual unit. One way of doing that would be to use a PCI backplane with a motherboard "card". This would give you more than the 4 or 5 PCI slots on most motherboards.
Go with a FireWire or USB2.0 capture device instead of a capture card. You can connect 4 capture devices to a 4-port FireWire or USB2.0 PCI card. So, if you only devote 3 PCI slots to your input sources, you still get between 6-12 concurrent input streams via FireWire or USB2.0. The problem is finding a TV tuner you can control via software through the FireWire and USB2.0 links. But that would solve your problem of recording alot of different shows at the same time with fewer CPU count.
If you plan on having the storage local, you'll want to go Raid. Hardware Raid would be better than software Raid.
If you use a seperate machine for storage, I'd go with NFS or netcat over GigaEthernet to a FileServer with striped volumes on mirrored or Raid-5'd disks. netcat would be better since it has lower overhead than NFS.
So, with 2 Computers, you will be able to capture from 1-12(depending on how many cards and ports you use) individual channels/sources to a very fast file server which can then serve out the streams or burn them locally to DVD(s).
ADC, Canopus, Sony, and a few others produces AVFireWire/USB2.0 adaptors, but they are for signal source and output and not for tuners/channels. Some resources listed below:
Resources
WinTV Products:
http://www.hauppauge.com/html/usb_data.htm
A USB TV Tuner
http://www.snapstream.com/buy/buy-tunerusb.htm
More USB TV Tuners...(wintv repackaged)
ATI Wonder USB
http://www.ati.com/products/pc/tvwonderusb/
http://shopper.cnet.com/shopping/resellers/0-114 36-311-3850079-0.html
ATI usb tuner card...
Basically, they are USB tv tuners which captures to MPEG1 or MPEG2... if you're running under Linux anyways, you can re-pipe through Mjpegtools to resize and recompress to MPEG2 format for use with DVD playback on the fileserver.
But yeah, it's doable. :)
Good luck and have fun!
Re:TV Listings? (Score:3, Informative)
TV Listings are available for do it yourself PVRs.
If you're willing to screenscrape, you can use XMLTV [membled.com] to get your listings. The only potential problem is that if lots of people start screenscraping the free web sources are likely to try and stop people from doing so.
If you're willing to pay for the service, you can use TVNow [unihedron.com] and pay $30 per year [tv-now.com] (about $2.50 per month, a fraction of what Tivo charges).
Re:And the answer, again, is "MythTV" (Score:2, Informative)
i think cards that outputs directly compressed streams (such as dvb-s) doesn't need tricks like this
I could use something like this because... (Score:5, Informative)
If you want to edit video on a computer, you need to "digitize" or "capture" it to the computer. Hook up multiple VTRs and capture multiple tapes at once. There are systems that exist to do this, but they are high dollar. This might not be cheep, but I'm sure there would be some free clock cycles to use.
Say you do a political talk show. You want to do all the research you can. The major networks all have good political shows on Sunday morning. With this you could record them all and watch them later. Yes you could just use VCRs, but that applys to ALL PVR applications.
Many public access stations are actually multiple channels. PEG (Public, Educational, and Government) is the standard for Local Access pretty much. You could record the station live from the past so many days and stream it online to catch recent programming.
Say you have a large tape archive (the station I work at has beein archiving for under a month and has over 300 tapes) and want to store in a digital media. You could use the captured video either to make DVDs or store in low-res on a server for preview. With IDE RAIDs becoming less and less expensive, a terrabyte fileserver is now an option in the four figures.
And thats just what I can think of off the top of my head...
Re:Eh? (Score:5, Informative)
There, three reasons, at least one of which will appeal to most people.
Use Canopus Boxes And Firewire Cards (Score:5, Informative)
Also, I am curious why you would want to use MPEG encoder cards to record your video. If you've ever tried this, you would quickly realize MPEG is a REALLY bad format to use if you plan on editing your video. I assume you will be editing your video right, I mean who and the hell would want to burn TV programs, commercials and all, straight to DVD with no editing. Anyway, editing MPEG video, no matter what you use is a bad proposition.
My system, which is two low power PCs with various large (300GB+) multidrive RAID arrays, firewire cards, 1 Canopus ADVC-100 on each system and Sony Satellite receivers. The Sony are important since they have a 9 pin serial connector which connect directly to the PC for changing channels and controlling the satellite receiver.
This system works flawless and I have recorded around 1,500 TV Shows since late 2001. My Linux based recording solution prior to this was moderately reliable but the quality was not good enough for DVD. With this setup the quality of the burned DVDs are almost indistinguishable from the broadcast source. In other words, very good. Oh by the way, my interface for scheduling is custom web interface using Mysql for storing data.
Now I suppose if you were hell bent on it, you could put multiple cards in a few machines and run multiple capture processes to grab your insane 16 channels, but that would be one busy machine. I would recommend a more sensible soultion, one like mine would probably work nice.
My setup includes 2 machines for grabbing video straight to disk in DV format (very high quality, does not degrade with editing like other lossy compression methods). Now these machines also double as mpeg encoders too, but don't do much else. They stay pretty busy with just those two tasks. I have another 3 machines that are dedicated MPEG encoders, using mjpegtools as the encoding software. My desktop machine is where I edit the video, using Kino. I also use my desktop to run dvdauthor, which masters the DVD-Video folders prior to burning them to disk. This machine sometimes encodes MPEG too. On some days I have as many as 6 or 7 MPEG encoder machines going. And I have yet another machines that actually burns the DVDs.
So I guess you could do it with a few machines, but you'll be sorry once you've got a bunch of video to encode or master and only a few CPU to do it. Make your capture machines the cheap, slow CPU type and your encoder, editing, mastering machines of the fast type and you might be all right. I'd still love to know why you would want to record 16 channels. Also, I assume you are doing this with Cable TV, which sucks for quality and regular cable too, since digital cable requires a box for each individual channel you need to watch at the same time. I can't see anyone paying for rental on 16 cable boxes. Even worse I can't see anyone spending that much money on 16 satellite reveivers. I have 6 satellite recievers and I almost cried when I had to pay for them.
Oh by the way, my system is 100% Linux end to end, so the poster who posted a comment above who says there is no Linux PVR solution that works, has no idea what he is talking about.
-Aaron.
Re:16-channels at once? (Score:3, Informative)
Re:And the answer, again, is "MythTV" (Score:3, Informative)
Re:Maybe he wants distributed capture (Score:3, Informative)
Of course, that is deopendant of the number of users, downloading the file. And a few other things. But it is an intersting concept.
Try doing a search on google for Bit Torrent, I THINK that comes up with the best results.
- Ice_Hole
Re:Maybe he wants distributed capture (Score:3, Informative)
i'm downloading something from torrent right now. 1394.1 MB, it was slow at first, but now i'm steady at around 22kb.
Thing thats cool about BT is it's very easy to become a seed node. I d/l the FBSD 5 iso's from a FTP source before finding the BT source. Since i'm such a nice guy I shared my ISO's simply by clicking the link on the FBSD BT page and saved it where my previously d/l iso's were. Whammo I was a BT seed for 24hrs.
Re:16-channels at once? (Score:4, Informative)
Total cost without the cameras and cabling, about $375. No video card needed after install, and you can get away with very little CPU power. A K6-2 350 with 32M of memory and a slow WD 2G drive is what I used to figure out if it was going to work, and it was able to deliver 2fps from three cameras and do the encode pass in under 20 minutes with 512x384 16bpp images.
Re:CPU Power (Score:1, Informative)
Specifically, IDE uses a lot of CPU power, up to 30% regardless of CPU speed because of the way its controlled. SCSI uses its own processor.
If you want to be an IDE bigot, use a SCSI controller for IDE drives the the sx4000 from promise. Its a $150 PCI SCSI card with 4 IDE channels. (Although that particular model is a high CPU user vs other in the roundup (but its cheap for raid 5/10)
RAIDs (Score:2, Informative)
That being said, you'd probably want to add a RAID Controller anyways. From my experience, they perform better than onboard chips which are usually stripped down. Either way though, you definately want to RAID the drives in at least RAID 0 if not RAID 5. Not only do you get a larger logical drive out of it, but the performance boost can help as well.
And, yes, as others have said, it varies VERY much by how much quality you want. Native DV (the defacto for "online" video editing) uses 40/3 GB/hr. That's roughly 30 Mbit/s based on my quick calculations. MPEG I/II/IV all offer various bitrates at various qualities. But, what you save at the harddrive you lose at the CPU there.
Something to remember is that many people are using theoretical maximum bandwidths when calculating the number of streams. When I run no-load write tests on my Video RAID, I usually only get 50-60 Mb/s. Granted the drives need some defragging and there are background processes running, but that's the real world.
We just got a Canopus DVStorm2 (roughly a $1200 real time editing card) at the station. It will allow you to simultaneous capture 3 streams into DV. I haven't tested it yet, but I'd assume I'd want to set each stream to its own drive to maximize performance. Probably could get away with two to a drive without headaches. I really wouldn't want to try all three without fear of losing a frame over an hour. Point is, be reasonable with your expectations from an IDE drive.
Re:Maybe he wants distributed capture (Score:2, Informative)
This thought occurred to me last night while doing some kazaa downloading. Maybe a better P2p capture system would involve each client downloading 1 frame per movie, and sharing that with the world. The clients could assemble the movie from a distributed network, much like a frame server does in premiere.
eDonkey [edonkey2000.com] does something similar for the files that it downloads. It divides the file into 9mb chunks and when you have one complete chunk, that part is shared on the network. It works really nicely for large files like movies and ISOs. eDonkey also has this neat feature of having urls that stores the file's hash value. So if you share a file, and wan't people to download that particullar file, you just publish the url on a web page. There are whole sites devoted to edonkey links. ShareReactor [sharereactor.com] and FileNexus [filenexus.com] are the two most common such sites. Check them out and see the power of this system! The eDonkey network is based on servers and anyone can set up one. The maker of eDonkey has now come up with a serverless P2P system called OverNet that is based on the same edonkey protocols for file transfers and link sharing
If you wan't to use edonkey, then get the open source eMule [emule-project.net] client. It is an edonkey clone with better features and it is open source. It has a lot of mods for various types of addon features. I personally use the eMule Plus [emuleplus.tk] MOD. It even has a web server that you can use to control the client remotely!