Here's Something Different That I'm Doing With My Server - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 20 Old 03-08-2013, 08:10 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
At first I thought this would be off-topic, but it has Audio, Video, and Science (AVS) so I'll post about it. In hindsight I would have paid myself $50 for this post. biggrin.gif It also has very high WAF since it was her idea to have it.

She wanted an owl box cam.

Details below or skip to the bottom for the links to the end result...

I agreed to make one even though we don't have many, if any, owls in the yard. It is sort of like a chicken before the egg thing, but anyway... First was the camera research and most of the solutions involve those "old-fashioned" RCA connected cameras requiring a connection to a DVR or capture card. I decided on an IP cam and Foscam (now running the FI8910W http://www.amazon.com/Foscam-FI8910W-Network-Camera-Two-Way/dp/B006ZP8UOW ) was the cheapest with the most features. Even though it is an indoor cam, I figured I'd try it anyway and went on to design a housing for it that would mount to a typical sized owl box. I build the box and mounted the cam and everything worked great. Sharing was done with a few people, friends and family, proving simple port forwarding to the cam software running on the server. It also monitors for motion and saves video clips to the server and sends email alerts with jpg captures. This was fine for a couple people here and there.

Then we waited and waited and had a few visitors (various birds, squirrel, opossum, more birds...), but no owls and no nesters other than Starlings that we ran off. So finally after about 2.5 years we get two White-Breasted Nuthatches interested a couple days after running off another pair of Starlings. I went and got the "hole" that I cut out of the box and cut a nuthatch size hole in it and plugged the larger owl/starling hole.

Now that they are nesting it was time to share it. After posting a link on her Facebook page the local bird watching supply store that my wife spends too much money in wanted to add it to their monthly newsletter. First thought from her was great, first thought from me was bandwidth. So I went searching for options and decided that a streaming site such as ustream.tv was the best solution. That means one stream out from me can be shared to an unlimited number of people, and my server is more secure since nobody is connecting through my forwarded port and deciding to snoop around for other openings. However, to stream to these sites isn't as easy as pointing it to my camera. First of all the cam is MJPEG. If it was RTSP then it would be very easy, but the cam would be about $900 instead of $70.

First solution that I got to barely work was using H264 Webcam which creates a RTSP stream with a .sdp file to access. Using VLC I was able to transcode it to the proper format using some batch file that isn't fun to learn. Then there is another program JTVLC that uploads that transcoded stream to justin.tv. Now the video is being transcoded twice and picture quality takes a huge it and is macroblocked and laggy. The plus to this was that it also transmitted audio.

The next solution that is typically used on these sites is Adobe Flash Media Live Encoder (FMLE). Both Ustream.tv and Justin.tv provide preconfigured .xml files for FMLE streaming to your channel. However, this program wants a webcam type of device which the IP cam is not. The solution here is to use WebcamXP or Webcam7 which links your IP camera as a webcam device which then shows up in FMLE. This works great for the picture quality because it isn't being transcoded. Whatever FMLE does with its video input it looks the same to me on its output. But this solution has no audio because FMLE wants one of the Windows microphone devices. I spent another two days trying to solve this issue until I stumbled upon the hidden device Stereo Mix which takes what plays on your computer and runs it through a microphone device. Now I just had to play the audio on my server using the first program, H264 Webcam, and have FMLE linked to the WebcamXP video and the Stereo Mix audio. Worked on my laptop when I tested the idea, but not on my server. After a few hours of trying and Google I discovered you had to have SOMETHING plugged into a speaker jack. I took an old 3.5mm mono plug that was cut with nothing on the other end and plugged it in, it worked! Done!

The VLC crappy video method took a day to figure out. The better picture, but no audio took another day to discover WebcamXP with FMLE. The better picture with audio took another two days. My Intel Core2Duo E8400 with 8GB RAM uses about 16% CPU running each FMLE session and about 5% running the H264 Webcam program for audio and monitoring. That is about 40% CPU usage 24/7 and about 2Mbps internet bandwidth. The same 16% CPU process used only 6% on my 3rd gen i7 laptop.

Here are the links to the end result. Both sites have the same quality feed.
http://justin.tv/baaojenkins
http://www.ustream.tv/channel/white-breasted-nuthatch-nesting-cam


The site can be seen at http://www.nuthatchcam.com
Pictures:
*
Box without the camera housing
*
Foscam in the camera housing
*
Bird's eye view

bryansj is offline  
Sponsored Links
Advertisement
 
post #2 of 20 Old 03-08-2013, 10:19 AM
Advanced Member
 
macks's Avatar
 
Join Date: Jan 2013
Posts: 714
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 31
So, what cam software did you run?
macks is offline  
post #3 of 20 Old 03-08-2013, 10:57 AM
AVS Special Member
 
TornadoTJ's Avatar
 
Join Date: Jan 2008
Location: Dallas, TX
Posts: 3,919
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 34
I also use my server for camera data. I'm running 4 Foscam cameras and using Blue Iris ($50 for unlimited cams) on the WHS 2011 box.
TornadoTJ is offline  
post #4 of 20 Old 03-08-2013, 11:16 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Quote:
Originally Posted by macks View Post

So, what cam software did you run?

H264 Webcam http://www.h264soft.com/ for the audio part

WebcamXP http://www.webcamxp.com for the video part

Adobe FMLE http://www.adobe.com/products/flash-media-encoder.html to bring them together and stream to the net.
Quote:
Originally Posted by TornadoTJ View Post

I also use my server for camera data. I'm running 4 Foscam cameras and using Blue Iris ($50 for unlimited cams) on the WHS 2011 box.

Blue Iris works fine until you have to break out of the port forwarded direct server access. Both of the other programs I used could be replaced with Blue Iris until it comes time to stream to ustream. I could probably replace H264 Webcam with Blue Iris for my current setup, but WebcamXP was the key because it converted the Foscam feed into a local webcam device for FMLE.

bryansj is offline  
post #5 of 20 Old 03-08-2013, 11:21 AM
Advanced Member
 
macks's Avatar
 
Join Date: Jan 2013
Posts: 714
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 31
Quote:
Originally Posted by bryansj View Post

H264 Webcam http://www.h264soft.com/ for the audio part

WebcamXP http://www.webcamxp.com for the video part

Adobe FMLE http://www.adobe.com/products/flash-media-encoder.html to bring them together and stream to the net.
Blue Iris works fine until you have to break out of the port forwarded direct server access. Both of the other programs I used could be replaced with Blue Iris until it comes time to stream to ustream. I could probably replace H264 Webcam with Blue Iris for my current setup, but WebcamXP was the key because it converted the Foscam feed into a local webcam device for FMLE.

Sorry you said that above I must have missed it. Good work on this project, I'm sure it was a pain.
macks is offline  
post #6 of 20 Old 03-08-2013, 11:26 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Quote:
Originally Posted by macks View Post

Sorry you said that above I must have missed it. Good work on this project, I'm sure it was a pain.

It actually still is a pain. Now that I turned on the audio to my server it is bringing back a problem where the server wants to reboot every couple days. I turned off the audio and anything else I didn't need in the BIOS and the rebooting went away. I assume it is due to the fact the board is no longer supported and there is some sort of leak. It is an Nvidia based board from the Vista days.

bryansj is offline  
post #7 of 20 Old 03-08-2013, 11:26 AM
AVS Special Member
 
Dark_Slayer's Avatar
 
Join Date: May 2012
Posts: 2,579
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Quoted: 196 Post(s)
Liked: 309
How does your storage buffer work?
Dark_Slayer is offline  
post #8 of 20 Old 03-08-2013, 11:37 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Quote:
Originally Posted by Dark_Slayer View Post

How does your storage buffer work?

It is real-time. Adobe FMLE receives the signal and transmits it. I guess it is just dumped after that. It has a low storage footprint.

bryansj is offline  
post #9 of 20 Old 03-08-2013, 03:47 PM
AVS Special Member
 
oman321's Avatar
 
Join Date: Sep 2005
Location: MASS
Posts: 4,738
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 29 Post(s)
Liked: 37
Very cool project and great job!! Your wife should be proud, I don't know if I would have had the patience to sort that all out. Will keep this thread in mind if I need to do something like this.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

oman321 is offline  
post #10 of 20 Old 03-08-2013, 06:48 PM
AVS Special Member
 
JerryW's Avatar
 
Join Date: Aug 2001
Location: Location, Location
Posts: 1,023
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 6 Post(s)
Liked: 33
FWIW, you could probably replace every piece of software in your current setup with just FFmpeg.

FFmpeg can do a million things it is like the swiss-army knife of multimedia on stereoids, but these three would apply here:

1) Read audio and video directly from the IP camera
2) Optionally transcode audio and video into other formats (i.e. convert MJPEG to h264 if required)
3) Transmit audio and video in an RTMP stream directly to ustream.tv

The downside is that if you thought figuring out VLC command-line options was painful, FFmpeg will give you a permanent migraine.

On the plus side, once you get it working it should be a lot more stable since no sound card is required and it is only a single program instead of that rube goldberg thing you got going on now.

You can find windows binaries of FFmpeg here: http://ffmpeg.zeranoe.com/
FFmpeg home page is http://www.ffmpeg.org/

If I were going to try to get FFmpeg working for this, I would take it one step at a time:
(1) figure out how to record from camera to a file that you can play in VLC
(2) figure out how to transcode that file to the codecs that ustream requires and save that output as a new file to test with VLC
(3) figure out how to send the new file to ustream via RTMP (might try streaming it to VLC through RTMP first)
(4) figure out how to put all three steps into one FFmpeg command-line

Copyright is not property, it is merely a temporary loan from the public domain.
JerryW is offline  
post #11 of 20 Old 03-08-2013, 07:04 PM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
I saw some guides that used ffmpeg instead of VLC. Most of them hit a dead end somewhere or they don't support my camera.

1. The camera can send a .asf file directly, but I didn't have good results feeding it into VLC without using H264 Webcam software to create the initial RTSP.
2. I had that going with the VLC command line, but never liked the quality after trying all sorts of different settings
3. That was a problem. Justin.tv has JTVLC, for Ustream it was the xml file or Ustream Producer
4. I'm too beat down to even begin another option...

bryansj is offline  
post #12 of 20 Old 03-09-2013, 05:50 PM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Wife wanted to focus all the visitors to a single site so I disabled the ustream.tv feed. Gained back 17% CPU! But now she wants a cam pointing to the outside of the box...

bryansj is offline  
post #13 of 20 Old 03-18-2013, 05:26 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Well now I've built a new VMWare ESXi server and have this whole streaming thing set up on a simple Win7 x86 VM. The only trick was to use VAC (Virtual Audio Cable) for the audio streaming.

In addition to that I created a website for her because the justin.tv ads were a bit much and not really appropriate for elementary school age children. It simply embeds the justin.tv stream and I added our own chat and Facebook interface (wife created a page for the birds).

I think she is about to lay the first egg now...

http://www.nuthatchcam.com

bryansj is offline  
post #14 of 20 Old 03-18-2013, 05:57 AM
AVS Special Member
 
oman321's Avatar
 
Join Date: Sep 2005
Location: MASS
Posts: 4,738
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Quoted: 29 Post(s)
Liked: 37
Very cool, seems like you've become a pro at setting this up.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

oman321 is offline  
post #15 of 20 Old 03-18-2013, 06:15 AM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Now that I put all this in an ESXi VM then I can tweak with my server and not incur a WAF downgrade when I would need to stop the feed for a reboot or something. It is a simple single Vcpu with 2GB RAM. Seems to work fine.

I got the website created from nothing to 90% of what it now looks like in less than a day. Probably spent four hours on it. The last 10% is adding stuff my wife decides she wants to see on the page such as the visitor map. The last 10% will never be finished...

bryansj is offline  
post #16 of 20 Old 04-22-2013, 02:07 PM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Update: The FI8910 messed after only a couple weeks of service so I replaced it with a backup FI8918. I was able to repair it, but I don't want to mess with the nest to swap it back out. These cams are cheap for a reason. Too bad the quality cams are in the $500+ range.

I'm also using at least 10GB of upstream bandwidth a day. Good thing Comcast has suspended their cap enforcement. Eight birds have hatched and are probably another week or so from leaving the nest.

bryansj is offline  
post #17 of 20 Old 03-07-2014, 01:00 PM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Well the birds are back so the cam is back up. Unfortunately Comcast now has a bandwidth cap again. I've got 300GB per month and $10 per 50GB chunk. According to my calculations if I stream at 200kbps then I should only be using about 2GB per day which is around 60GB per month. I guess I can live with 240GB per month for "other" or pay $10 after I use up my remaining free passes.

Anyway, if you want to see the stream it is at http://nuthatchcam.com connected to a Ustream.tv feed.

bryansj is offline  
post #18 of 20 Old 03-07-2014, 05:22 PM
AVS Special Member
 
Dark_Slayer's Avatar
 
Join Date: May 2012
Posts: 2,579
Mentioned: 5 Post(s)
Tagged: 0 Thread(s)
Quoted: 196 Post(s)
Liked: 309
They count both up / down?
Dark_Slayer is offline  
post #19 of 20 Old 03-07-2014, 06:12 PM - Thread Starter
AVS Special Member
 
bryansj's Avatar
 
Join Date: Feb 2004
Location: Atlanta, GA
Posts: 6,302
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 50 Post(s)
Liked: 180
Quote:
Originally Posted by Dark_Slayer View Post

They count both up / down?

Of course they do. Comcast isn't going to give a free ride.

bryansj is offline  
post #20 of 20 Old 03-08-2014, 06:03 PM
Senior Member
 
dfkimbro's Avatar
 
Join Date: Aug 2013
Location: Franklin, TN (mostly)
Posts: 225
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 23 Post(s)
Liked: 39
Thank you for sharing this.
dfkimbro is offline  
Reply Home Theater Computers

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off