View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 20 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Feb 25, 2005 4:01 am 
Offline
Joined: Fri Feb 25, 2005 3:14 am
Posts: 5
I had an old tv capture card that I thought didnt work, turns out only the tuner didnt work.. the composite input worked fine. So i bought a cheap $30 security camera from harbor freight put it on my front porch and hooked it to my myth box.. Ive got it setup pretty well with myth so I thought I would share..

First of all, i have my camera setup to record motion.. I use a free program called ZoneMinder, get it at http://www.zoneminder.com/ it works great and I can also watch live images of the cam through its web interface.. so I can also have a little window open up on my computer in my bedroom.

The next task was picture-in-picture, ya I know myth has built in picture and picture for multiple cards but the problem is that it only works when watching tv.. dosent work when listening to music or watching a video file or movie.
so I wrote some scripts so no matter what I am doing I can pull up the camera.

here is what I added to .lircrc so when I press the EAX button my remote it either opens or closes the window.
You will need "irexec" installed.
Code:
begin
        prog = irexec
        button = eax
        repeat = 4
        config = /usr/local/bin/security_cam.sh&
end


and here is security_cam.sh, i'll explain it below

Code:
#!/bin/sh

scampid=(`ps aux|grep mplayer|grep geometry|sed s/"mythtv   "//`)
if [ "$scampid" != "" ];then
        kill -9 $scampid
        scampid=(`ps aux|grep mplayer|grep geometry|sed s/"mythtv   "//`)
        kill -9 $scampid
fi
if [ "$scampid" == "" ];then
        mplayer -tv driver=v4l:norm=ntsc:input=1:width=352:height=240 \
        -double -display :0.0 -geometry 100%:0% tv://
fi


that may need edited, what the first line does is very ugly but simple.. you will need to change "mythtv" to the username you run myth under, dont take out any of the remaining white space. Then do the same for the other line like the first one.

Basically what it does is check to see if the security camera window is already open, if so it kills it and exits. If the window is not open it opens a window in the top right corner of the screen tuned into the composite input from my capture card.

Its an ugly hack but it works great for me,
If im listning to music I can instantly open a live feed from my camera without interupting listening to my music.. The same goes for watching video files, tv, dvd's or anything else..

One last tip, you can setup ZoneMinder so it will play a sound when an alarm goes off, I have it setup to play a file that sounds like someone knocking on a door.. The only trick is that it only works on a machine monitoring it via web interface.. so what I do is always keep the window open on my pc in my room since those speakers are always on. So in effect when someone comes walking up to my door I am notified in advance and I can quickly popup a window to see who it is. But wait until you have ZoneMinder tweaked enough that you dont get many if any false alarms.

I am working on a script to watch motion events from inside mythtv and I might find a way to get an alarm to sound on the mythbox.

So thats my expierence, I'll be happy to answer any questions.

-Ryan


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 24, 2005 5:33 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
I read somewhere a while back about piping the camera feed back into the houses cable coax network. the person could tune to a channel (say 3) and view the video.

any thoughts on this....any way to do this AND monitor via zoneminder. I would like to be able to view camera from myth frontend (either the channel 3 trick or via the mplayer script) and browser and non-myth connected tvs in the house.

thanx
chris

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 1:48 pm 
Offline
Joined: Fri Feb 25, 2005 3:14 am
Posts: 5
zoneminder is capable of coaxal input and tuning to a specific channel, you just need a dedicated video4linux compatable device..
you will want a device simular to this: Digital Video Modulator to convert the input into a channel on all of your TV's.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 6:16 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
is a "dedicated video4linux compatable device" a non-tuner capture board?

Im a little confues to the arrangment of the physical connections. If I have an ethernet camera w/ integrated webserver, I see how to pull it into zoneminder. I also understand how this will will provide web access to the stream and the event recordings.

What I'm not seing is what is the input to the modulator you pointed to. Were you saying that zoneminder can output somehow to the modulator? or does the pc that is running the ZM software send a stream out its video vga....im a little lost.

guess I should post on ZM forum as well....im just coming from the direction of a working myth system and I feel the love here :P

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 1:41 pm 
Offline
Joined: Fri Feb 25, 2005 3:14 am
Posts: 5
ahh, you have a network camera.. that wont work with what you want to do..
to convert the camera signal to a channel on your coax network you need to have a regular camera like mine that has a composite hookup (can be hooked directly to a TV w/out a PC, like you would your PlayStation2)

here is a simple diagram

Code:
 [CAMERA]=======[MODULATOR]-------+-----------+------------+------*CABLE INPUT*
                                                                            |                |                  |
                                                                         [TV]          [TV]  [ZONEMINDER]- - - - \
                                                                                                                                          |
                                                                                                                           ~NETWORK~


the modulator takes the camera input and lets say broadcasts it on cable channel 99, then like a CCTV every TV in your house can tune to channel 99 and view the camera.

Then you have your MythTV server also hooked up and you want it to record motion on your camera, so you get a cheap tv tuner card that is dedicated to watching only channel 99, zoneminder then monitors the video stream for motion and triggers alarms as specified.

there is a 4 input version of that modulator, with that you could hookup 4 cameras (tho zoneminder could only record one unless you got more capture cards)

This isint how I do it because I only have 1 TV and my mythbox is hooked up to it.. so I dont use the modulator and instead plug the camera directly into the capture device.

this is basically the same kinda camera I found at a local hardware store for $30.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:12 am 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
excellent! you cleared up alot. I see now that myth really isnt integrated excepting that it, like every other tv in the house can tune to modulator's channel. guess, I can head to the ZM forums for the rest, i do have a couple more questons if you dont mind.

1) are you running myth and zoneminder on the same box (versions)

2) which 'cheap' capture card are you using

3) are there any modulator differneces I should worry about, which do you use?

I think this is where I am headed...do I have this accurate? With this I can view the non-webcams on all tvs, (myth or not) and I can all cams, including webcam via web

Image

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:22 am 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
That seems likely to generate all sorts of signal reflection distortion on some channels, but I could be wrong.

I've seen some catv wiring boxes that are inline channel inserters: the standard analog cable goes through them and they filter out and then add one or more RF modulated A/V sources on user specified channel(s).

e.g. items on this page:

http://www.infinity-cable.com/icp_home_ ... n_catv.htm

[edit: whoops, my bad, that's just the combiner w/o the modulator, I think. but you get the point.]

There's also some magical set of rules used to architect cable runs and splitters...I'd have to do more googling, though. The general rule, I think, is to always use a star topology and that the cable runs from the center to the outlets should be the same length (with amps being used on longer segments that can't be helped).

Oh, and always use screw-on CATV cabling, never push-on. :)

-brendan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 2:04 pm 
Offline
Joined: Fri Feb 25, 2005 3:14 am
Posts: 5
1. Yes, its a debian testing box running latest myth, zoneminder and 2.4 kernel, however if I wanted to record at a full 30fps and do multiple camera's it would be much better to have this done on a dedicated machine.
2. Brooktree Corporation Bt848 Video Capture, you can pickup cards with this chip for as little as $20
3. You will want to get a 2 channel modulator (http://www.smarthome.com/av_mod.html) if you are running two camera's, and to reduse any interference from your cable you will want to put a filter on your catv feed, like one of these: http://www.smarthome.com/7822.html

you could still use my popup script to view your camera while playing music and stuff in mythtv, even if the ZM box is seperate.. you just have to set the ZM streaming codec from jpeg to mpeg and then you can stream video to mplayer or simular software. (I can watch my security camera on my PDA from any place with Wifi, such as my bathroom)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 2:21 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
Note to self: do not borrow dreadlock's PDA.

:)

-brendan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 7:51 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
brendan wrote:
That seems likely to generate all sorts of signal reflection distortion on some channels, but I could be wrong.

I suspect you're dead on. It immediately struck me as a recipe for all sorts of cross talk and interference... As a matter of fact I'm not even sure it'd work, I'm not an EE (although I can fake it in a crowd of MIT "Core 6" types if I have to), but isn't the whole point of a splitter to have a diode facing the right direction to prevent signal reflection from causing interference?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:15 pm 
Offline
Joined: Fri Feb 25, 2005 3:14 am
Posts: 5
tjc, putting a filter on the cable tv source should prevent crosstalk.. here is the first store that came up on google http://www.smarthome.com/7822.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 8:53 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Filters aren't magic. At least not for any reasonable definition of magic i.e. a technology too advanced to understand.

A "low pass" filter selectively "de-emphasizes" certain frequencies via a tuned (oh crap, I REALLY must have had too much ale at NERAX http://www.nerax.org/home.htm tonight, I can't remember the conventional letters for for induction and capacitance... "h" and "c" maybe?) resonance circuit (the associated math is really quite beautiful). What they're good for is things like keeping your cable modem signal from interfering with your TV reception. If you're using the modulators to encode the image from the camera onto the carrier for say channel 3 or 4, it's already in the right frequency range to pass.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 9:24 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
OBTW - brendan mentions the right piece of equipment a "combiner", which might look like a splitter externally but which has the diodes "facing the other direction".


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 27, 2005 11:46 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
tjc wrote:
...but isn't the whole point of a splitter to have a diode facing the right direction to prevent signal reflection from causing interference?


Um, diodes aren't so good for AC reflections, and RF is AC. Diodes are useful for preventing reflection/feedback in DC applications only. Diode networks can be used to filter AC or DC from a signal of course.

I believe that RF splitters are essentially shielded boxes containing a traceboard that has been engineered (shape of traces and/or materials used) to transfer RF signal at somewhat low loss. The ones I have typically have different amounts of dB loss on some connectors vs. others.

I'd stick with the general comments I made about star topo, use a real distribution block, and keep all cable runs to each room the same length. If you need to do splitting in a room, make sure the splitter is high quality (and lists the dbs down for each output) and the cables/connectors are high quality too.

If you're going to inject video and/or filter, those should all be done in the central wiring closet at the center of the star before splitting...

(...he says knowing that there's a super crappy crimped connection in the hallway drop ceiling of his apartment that he needs to completely redo by recutting and getting better screw on terminals, and that it is most likely the cause of horrible video on channels 2-6...)

tjc wrote:
OBTW - brendan mentions the right piece of equipment a "combiner", which might look like a splitter externally but which has the diodes "facing the other direction".


I suspect that the high quality 'combiners' have somewhat convoluted circuitry to prevent injection of the new channel signals back into the cable system.

e.g. The front end might consist of an initial amplifier that provides a standard 75ohm load to the incoming cable and outputs a known signal level to the next stage. That would essentially disconnect the output to that stage from the external cable input. From there, filtering of unwanted channels and replacement with injected channels could be performed with the knowledge of the exact impedance characteristics of the output of the amp, etc. in the equation, which would allow for better behavior regardless of the outside cable's shortcomings.

Of course, distortion also rises on amplification, but there's always a trade off.

-brendan (KD4YJS)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 28, 2005 6:50 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
See I knew if I said something silly enough we'd get an EE or a ham on the job. ;-)

Sadly it's been so long since I actually worked on a bread board box, etched a circuit board, or even used a soldering iron that most of the relevent brain cells have been recycled to deal with stupid software issues...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu