Pitfalls of
running an Online Audio/Video Scanner
Before charging off to setup a Online Scanner, make sure you have the WILL & the MEANS to provide a stable environment for hosting an online scanner that users can come and enjoy. One that is online the majority of the time when users attempt to connect barring your ISP is not having problems. That should also be considered. If you do not have a reliable ISP, then you probably should not be trying to host an online scanner. So, here are some things you will need to consider: You will need to dedicate a fairly strong computer 24 hours per day , 7 days per week, 365 days per year to running the scanner. You can not use it for other things. At least interactively as anything that overlays the Visual Display window of the Scanner will be seen by connected users, hence you pretty much have to keep off the computer unless you use it as a network file server, ftp server, web server, etc. Also the way I host streaming audio/video is to encode/compress it before it is sent out on-demand via Windows Media Encoder, which is a VERY resource intense application. So, it likes a strong CPU and plenty of memory. If you want to be able to provide plenty of concurrent streams to users then your upload bandwidth needs to be reasonable. Ie. If you are encoding using Multi-Bit Rates encoding for both audio and video at 44KB/sec (good choices for quality), that compresses to about 4KB/sec when encoded for a single upload stream. If your ISP provides you with 512Kbit/sec upload cap = 64KByte/sec cap then you will theoretically be able to host up to 16 streams concurrently. Obviously, you are limited by your ISP max upload rate. Also, if you are doing this out of your home and are using Digital Phone VOIP, then you may want to budget a little headroom so the folks you talk to can understand you conversations as packet fragmentation WILL become a problem with the more concurrent connections you support. Some Digital Phone providers like Vonage provide Bandwidth savers to help with this, but it will not eliminate it. Remember, the better your service, the more folks will be frequenting your site and eating away at your bandwidth.
Scanner
Requirements
You will need a Scanner that will allow a RS-232 connection and the ability to read the display and software that will provide the Visual Display of the Scanners display or query the scanner via commands to get statuses with enough information to build your own display, which is what I did. I wrote my own software to drive the scanner, query its status via Bearcat commands and change the crappy cryptic display of the BC 796D XLT into something that humans can understand. It looks similar to what the BC 780 XLT display. I don't recommend this approach for most people. There is 3rd party software for the more popular Bearcat scanners that is great for this which is cheap. ~$40 from Butel and can be downloaded via the internet. However, it just passes what is on the scanners display through to the Visual Display of the computer, so if the scanner has a poor design from the manufacture then that is what you get. Ie. My original BC 780 XLT was great from Uniden, then I switched to the APC 25 digital scanner BC 796D XLT and they really did a poor job with the display. My request of Butel (Gomert) to enhance their (ARC250) software was ignored, so I wrote my own in about 10 hours. I do not sell or provide my software. You computer will also need a sound card and you will need a audio cable connect the scanner to the computer.
Setup
At this point, I assume you have purchased your scanner,
connected it to your computer and have software running which is displaying the
Scanner’s display on the computer. If so, great! Now, you only need one more
piece of software which is free.
You will need to download and install Windows Media Encoder here
When you install WME (Windows Media Encoder), by default it limits out going
streams to 5, so you have to manually edit the registry to bump up the maximum
number of out going streams that it will allow. I set mine to 30 connections, but have never
seen more than 28 concurrent users connected at once.
Registry Key
[HKEY_CLASSES_ROOT\Software\Microsoft\Windows Media Tools\Encoder\MaxClientConnections]
String Value
30
After you download WME you will need to set it up for encoding the Scanners
Virtual Display for on-demand streaming.
You will need to start a new session, so I suggest after launching WME, letting it walk you through the new session, by selecting BROADCAST LIVE EVENT wizard
· You will only be able to select audio from the DEVICE OPTIONS screen (Pick you audio device from the drop down list), click next
· Ensure “Pull from the Encoder (the server or player initiates the connection)” radio button is selected as the BROADCAST METHOD, click next
· Use the default port 8080 for the BROADCAST CONNECTION, click next
· Leave audio as “Multiple Bit Rates audio (CBR)” ENCODING OPTIONS, click next --- You will be addressing this later
· Make sure Archive File is deselected, click next
· Fill in any Display Information you wish to broadcast to viewers which scrolls during Window Media Player playback of your online broadcast, click next
· Review settings and go back and correct any mistakes if needed, click finish
· You will get a message box about being able to restrict which clients can connect to broadcast by IP. Feel free to check the box to “Do not show me this again”, click OK
· Now, click the PROPERTIES button or ALT+ENTER and click the SOURCES tab and ensure VIDEO and AUDIO are checked.
o Ensure “Sources from devices” radio button is selected, not “file” or “both device and file”.
o Select the drop down box by VIDEO and select Screen Capture. Then click the Configure button. It will bring up another modal window where you can select the screen capture source. Here you click on the drop down box search for your Virtual Display application that you want to broadcast, click OK. Ie. ARC250 Virtual Display
NOTE - I’m going to have you CLICK APPLY now. To save the property changes because WME is very picky and does not give very good error messages when it does not like some change you make.
· click the OUTPUT tab and ensure “Pull from encoder” is checked and the default port of 8080 is selected which is what you want so it gets through most businesses firewalls as HTTP traffic. Click APPLY
· click the COMPRESSION tab: the Video drop down should be Screen Capture (CBR) and Audio should be (This is up to you) I was running Multiple Bit Rates Audio CBR, but the audio quality was not too good as more folks connected, so I switched to FM Quality audio (CBR). Then under Bit Rates, make sure everything is unchecked except 47Kbps. WME will compress streams much smaller, more on the order of 4-5 Kbps when feeding a connected user, so it equates to about 3 fps and decompresses on their end, hence you are able to feed several users over a smaller bandwidth, but it requires the CPU for WME to do the encoding. Click APPLY
· click the PROCESSING tab, no video interlacing required
· click the PLUG-INS, SECURITY, or ADVANCED tabs - nothing required to be set.
· click the ATTRIBUTES tab, complete the fields you want, that is info streamed out and shows on the bottom of Windows Media Player when one is watching the feed.
·
click the VIDEO SIZE
tab. Here is the time consuming part to figure out initially. Not too bad
actually, but takes a little patience., There is Crop (based on method which should
be set to “CUSTOM”, and values entered
for : top, left, bottom, right) all those fields will need to be filled in
order to only display the BLACK Display section of the ARC250 Virtual Display
(Shown at bottom of page). Which BTW you can quickly activate via
F12. My crop values I used for the ARC780 was 598x551,
your cropping method must be CUSTOM. Top is the number of pixels down on
the ARC250 application window to crop off, hence you are trying to clip off the
window border and part of the grey region. Left is how far from the left of
application window you are clipping, in this case it is a good bit, all those
control buttons. You get the idea.
Let me stress a point here. As you make these changes in WME properties. Click
okay under each section until you get to the VIDEO SIZE tab. certain things
will cause the application the through stupid errors to the screen and you will
think that it will just not work. Trust me, patience and kewl
heads will prevail. It is the fact the application is pretty lame and does not
tell you why it does not like other setting that you have made with the
settings you are currently making. So, getting you cropping and setting
your top, left, bottom, and right will take trial and error. You will have to
do it, start the encoding process and fire up your browser and see what you are
passing through. You can do it on the same machine if you have enough display
real-estate. Remember if you overlay the ARC250 Virtual Control Display,
then it will get encoded and sent out with the feed. I always am careful
to keep the mouse pointer and other things I do off to the side.
*** At this point you are ready to perform on-demand streaming for users, but now you need to get your Site out there in a persistent way. You need a webpage and a “LISTEN NOW” link for folks to click on that will start the streaming process for them. Well, I will let you figure out how to create your own webpage and where you want to host it for folks to be able to always have 24x7 access to it.. I will show you the slick stuff of the “LISTEN NOW” link that you will need to include on your webpage.
You need a link on your page LISTEN NOW or what ever you want to call it that links to an <filename.asx> file. Which looks like this:
<ASX Version="3.0">
<Entry>
<ref HREF="http://71.69.164.14:8080"/>
<ref HREF="offline.wmv"/>
</Entry>
</ASX>
As you can see from above, my NCSCANNER.ASX file contains 2 HREF’s, the 1st one points to the IP address inside my home WAN which my cable router is assigned and the 8080 port which traffic is to come in on. I have set my Firewall up perform Port Forwarding to the server which WME is actually running on and servicing the requests. The 2nd HREF is the timeout HREF, so if the 1st does not respond, the user connection will failover to the offline.wmv file that I have uploaded to my ftp space provided by my ISP. So, my main webpage is hosted by Roadrunner at http://home.nc.rr.com/exithere/ncscanner.htm and they are also hosting the http://home.nc.rr.com/exithere/ncscanner.asx as well as http://home.nc.rr.com/exithere/offline.wmv
The trick is that I have the offline.wmv
and the ASX file on my Road Runner web space, so it is always available and
where folks come in from initially. Then they get routed to my internal site at
my home by the first HREF. If it is down, then it launches the offline.wmv.
It has been a few years since I created the offline message, so I don't recall
exactly how I did it. I do recall that I MS Paint and created a BMP with a fill
color that you see and text with the words you read and then downloaded
shareware or freeware to create a AVI using the Image
file. I may have converted the BMP to a GIF or JPG first, I don't recall.
Good Luck!!!
NCScanner
Screen shot from ARC250 for BC795D
