flickr

Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation Oregon Coast Vacation 

twitter

    Jun 18 2008

    Live Video on the Go: How To Do It!

    Posted by blackice912

    Notice: If you crash your car/injure yourself/land in a lake/etc because you were trying the idea below out, it’s not my fault.

    The last couple times I drove down from Everett to Tacoma, I broadcast the drive from my car. There was really no point to this except to see if I could do it. I am going to share with you today the secrets on how to run live video stream on the go!

    Hardware Basics: Needs

    Before we get into the details, let me list some of the must have items you’ll need to pull this off:

    • A laptop or carputer with a decent amount of power (depending on how interactive you want to be)
    • An external webcam (I like the Xbox Live camera for this)
    • Mobile internet (Anything but EDGE)
    • Power inverter (trust me, you’ll need it)

    The above four items are the bare minimum you’ll need in order to stream video on the go. Before my recent laptop upgrade, I used an Inspiron 600m (old) which allowed me to stream basic video. Anything more caused the system to crawl. Here is my hardware setup:

    You can start streaming the basic raw feed right from your webcam with the above hardware and an account with a video streaming service like uStream or Mogulus (note: Mogulus is not very friendly with low end hardware). But basics is boring, and this article would already be over.

    Hardware Basics: Internet

    To actually stream your video, you’ll need an internet service that works on the road. No you can’t hack your wireless router to give you a signal on the road.

    All the big mobile internet services offered by cell phone providers are going to offer you around 5GB of bandwidth a month. While the cap is small, it is highly unlikely you are going to hit the cap while streaming video — unless you decide to stream every day from your mobile internet connection and not jump over to WiFi when it is an option.

    For my mobile internet, I chose Sprint (5GB/mo data cap — $60/mo). The broadband card is small, has a built in GPS chip, has a spot for an external antenna, and doubles as a memory stick when you insert a Micro-SD card in it.

    The GPS in this chip is nearly flawless outdoors in my car. In my apartment, not so much. As I write this, the GPS just told me (via Google Earth) that I somehow jumped from my apartment, past work (I live right across the street from work), and landed over near Interstate 5. It’s not like I really need to know the GPS coordinates for my apartment, though.

    Software Selections: Text/Effects/Other

    Once you have your hardware figured out, it’s time to move on to software selections. If you’re interested in adding special effects, text, or other data into your video stream, you’ll need an extra program to help manage your video.

    There are various applications out there to handle the video coming from your webcam and you are welcome to test run them all. If you want a program that is guaranteed to give you results, I recommend trying WebcamMax (Win 2000/XP/Vista 32bit - $29.95). This program pretty much has everything - Picture in Picture, text, special effects, and doodling (do not doodle and drive!). You could easily overlay your own custom logo, greeting text, video clip, or another application with the features built into WebcamMax.

    Software Selections: GPS

    If you want to add an extra level of data to your live video stream, why not go with a live view of your location in Google Earth? It looks neat and gives people an idea (keep the Google Earth window small so it stays an idea and not an exact point) of where you’re at.

    So what is needed to pull this off? Well you already have your GPS built into the mobile broadband card and WebcamMax. The only two missing items are Google Earth and Earth Bridge.

    You hopefully have an idea of what Google Earth is and maybe even have it installed on your computer. It is highly likely that the version of Google Earth you downloaded does not support GPS out of the box (the free version doesn’t). And even if it does, the implementation is limited. This is where Earth Bridge steps in.

    Earth Bridge (free) is an application “designed to bridge the gap between Google Earth and your GPS receiver”. With this tool you have the ability to “see your location on Google Earth in real-time and easily control your view”.

    Integration between your GPS and Google Earth is really a snap with Earth Bridge. All you have to do is plug your GPS/mobile broadband card in, activate the GPS feature (if using mobile broadband card), and tell Earth Bridge where to look for the GPS data (if using Sprint, it will tell you the COM port to look at). All you have to do from there is tell Earth Bridge to start sending the data over to Google Earth. Within seconds you will see Google Earth begin its desent on the Earth as it zooms in on your location in the map.

    With Earth Bridge and Google Earth setup, you can stream that data as a Picture in Picture window via WebcamMax. Just enable PnP, change the mode to “Specific Area”, and move/adjust the selection box around your Google Earth window (but make sure to get the window borders outside the selection area). I would also recommend keeping your Google Earth window small (maybe 400px X 200px) so that your exact location isn’t clear as day. Unless you prefer that, of course.

    Video Streaming

    As mentioned earlier, there are a couple of options for streaming your video on the internet. Feel free to try some of the various services out there, but make sure you try uStream. Why? The window that opens up to stream video is nice and compact, it supports IRC chat, and can handle large amounts of viewers. I am in no way saying other video services don’t support these, only that I have tried only a few services and decided to settle with uStream at this time.

    There really isn’t much to getting this going (create account, open up stream window, select webcam, start stream), so I’m not doing to go into extreme detail. uStream does allow you to chat with those who are watching your feed, but I wouldn’t suggest reaching over to your laptop to type while you’re on the freeway going 70+ MPH. If you do decide to be negligent in driving, please record your stream (there is an option in uStream) so the internet can remind you how dumb that was.

    Suggestions and the Future

    If you decide to try this out and want people to watch your stream, remember that there are now other eyes on the road in your car. If you do something stupid, they will see it. If you’re speeding and have Earth Bridge setup with the default settings, it will broadcast your speed (with a -/+ 5MPH variance I have found).

    I am also looking into a way for you to safely communicate to your video viewers as if they were passengers in the car. uStream supports IRC chat, so all it should require is a plugin for one of the various IRC clients that can perform text to speech. I’ll be sure to update this post if I find a solid way of performing that.

    Update: Looks like mIRC has text to speech built right into the application. Neat!

    Stay safe on the road!

    Filed under : Projects | 5 Comments »
    Mar 07 2008

    iPhone Dashcode Updates - First Impressions

    Posted by blackice912

    Today I looked at the new iPhone features built into Dashcode, Apple’s development environment that was originally created for Dashboard Widgets. Upon loading the application, I was presented with three new iPhone development options: Custom, Browser, and RSS.

    Development

    Snippets Mobile in Dashcode

    While Custom is going to give you a blank template to work with and Browser gives you a basic list view for you to fill in with your own content, the RSS template provides you a pre-coded environment to add your RSS feed and publish to your website. Today I decided to make my own iPhone version of this website.

    Just like creating a Dashboard widget, you have the ability to change fonts, colors, image, and much more. Using the predefined template, I modifed the colors and background to match the look and feel of the full site you’re probably viewing this on right now. Having only used Dashcode once before to create a Podcast widget for OS X, I found no issues creating a mobile website for the iPhone. All the menus and toolbars are the same, though the library of items you can add to your mobile site are different (for good reason, of course).

    As you develop your iPhone mobile RSS page, you can test it inside of the Aspen Simulator — an iPhone running on your computer (I mentioned this in the last entry). Each time I made a major change to the operation of the mobile page, I would click on the Run button, view it inside the Simulator, and operate it just like it’s on my mobile phone.

    Deployment

    Snippets in Aspen SimulatorOnce I was satisfied with my changes, I went to the file menu inside Dashcode and clicked on the Deploy option. I then chose to save it to my desktop where I would be able to take it and upload it to my website.

    After upload it to the labs.blackice912.net site, I decided to launch it on my actual iPhone to see the results. It turns out the results were pretty bad. No news loaded at all. I then tested it inside the Simulator and got the same results. Why was it working on my computer but not once I published it to the internet?

    Well after activating the debug mode inside of Mobile Safari, I found out why. As I should have remembered, you cannot have JavaScript on one site grab data from another site. It is cross site scripting and can be considered dangerous. Realizing this, I moved the code over to blackice912.net and launched it with success.

    So are there ways to use a RSS feed that is hosted on another site and use it? With the addition of PHP, yes you could do this and not run into that issue.

    Conclusion

    Apple has really done a lot of things right with this new SDK. While I still need to do some more investigation into the native application side of it, I am impressed with what I have seen today. You can really create a powerful web application with the SDK today and an even better one once the 2.0 firmware hits phones in June.

    If you’re interested in seeing the mobile site I created, visit blackice912.net/mobile on your iPhone/iTouch or in Safari. It will not load properly in any other browser!

    Mar 04 2008

    Trixbox: Intercoms, spooking intruders, and scaring friends

    Posted by blackice912

    While I’m not writing this to inform you about ways to scare friends and family, the title could be true if the following idea was used in a sinister way.I am working on creating a very clever security system in my apartment. This is mostly for fun, but it does have practical applications. More on that when I spend more money on the project.

    As a part of this security system, I want the ability to talk (or spook) to whoever is in my apartment. If I get a message that my door has been opened, I want to give the intruder the sense that there is someone around and completely aware of what is going on. There are other practical applications too, such as monitoring kids while you’re away to make sure they aren’t in a yelling match or make sure the babysitter isn’t being a bad example.

    I figured the best way to provide an example of this was to show it in action. I have recorded a video which shows me calling a telephone number and Trixbox kicking into action. I will explain how this is done after the video:

    (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

    So how does one pull off something like this? Well first you need to make sure that your Trixbox has an inbound telephone number (you can get a cheap 800 number from sites such as Vitelity) so that you can actually interact with your system. Once you have that figured out, you need to add a custom extension in the extensions_custom.conf file. An example entry would look something like this:

    [custom-intercom]
    exten => s,1,Set(__SIPADDHEADER=Call-Info: \;answer-after=0)
    exten => s,2,Set(__ALERT_INFO=Auto Answer)
    exten => s,3,Set(__SIP_URI_OPTIONS=intercom=true)
    exten => s,4,ChanIsAvail(SIP/4587&SIP/9321,js)
    exten => s,5,Macro(user-callerid,)
    exten => s,6,Dial(Local/4587@from-internal,,A(beep),)
    exten => s,105,Macro(vm,4587,BUSY)
    exten => s,106,Wait(5)
    exten => s,107,Macro(hangupcall,)
    exten => s,hint,SIP/4587&SIP9321

    In the above example (which was originally posted on the Trixbox forums by another user), 4587 is the extension I am calling and putting into speakerphone/intercom mode, while 9321 is the extension I am calling from.

    After you have the code added to extensions_custom.conf, you must add a Custom Destination. If you were to use the above code, your custom destination would be something such as:

    custom-intercom,s,1

    Now you can finish up by adding a new inbound trunk and setting the Caller ID Number to your mobile phone number and setting the call destination to your new Custom Destination you just setup. This will make sure that calls will only go to intercom/speakerphone mode when you call and allow all other calls to route normally.

    The above method is pretty secure unless someone figures out your mobile number and the phone number associated with Trixbox, as many VoIP services allow you to enter fake caller id information (which can be useful in the correct and honest conditions).

    If you have questions or corrections to this entry, please let me know by leaving a comment. Also if you’re tempted to call the number listed in the video: I registered it for this video and it has since been decommissioned.

    Filed under : Code, Projects, Services | 2 Comments »
    Mar 02 2008

    You don’t need dedicated hardware for Trixbox

    Posted by blackice912

    Trixbox TerminalOn a previous entry I spoke about Trixbox and how you can turn it into a weapon to protect yourself against unwanted calls (see: Trixbox can help stop those annoying calls). Though Trixbox excels at disrupting incoming calls from telemarketers on dedicated equipment, it also works decently well in a shared environment.

    As my cell phone is all I need for making calls these days, I don’t have a standard telephone connection in my apartment. Regardless, it can be nice to have the functionality of Trixbox so I currently have it installed on a Windows XP box that acts both as a casual gaming computer and a Trixbox PBX using Microsoft Virtual PC 2007.

    Usability

    If you have no need to keep your PBX server running 24 hours a day, a shared computer is a cost effective way to go. While the hardware you’re running it on and amount of free memory can provided mixed results for the response time to your commands on the web-based interface and playback of built in audio files/voicemails, the actual call quality is just like any other installation - crystal clear.

    To actually handle my calls. I have an Aastra 480i CT and a few cordless handsets. This phone is a great multi-line device with a full screen that can pull up custom designed web pages (once used to remotely control my iTunes software). I had no issues with getting this device to talk to the virtual installation of Trixbox, as Virtual PC 2007 acts like it’s just another computer out on the network by having a unique IP address that is not affected at all by the host computer’s firewall. The 480i CT also excels at plug and play in a Trixbox environment — I just had to tell Trixbox to assign the phone’s MAC address to a specific phone extension. After that I just plugged the phone in, waited a minute for it to boot up, and watched as it gathered the configuration data from the server.

    So a question in my mind as I write this is: Would a software based phone provide the same amount of quality? I can’t see why not. As long as computer resources don’t put an intense amount of strain on both the host computer and the virtual PBX server, it should be fine. Or you can pick up a cheap GS-101 if you don’t need a fancy phone, but prefer using a handset over a computer microphone.

    Connections

    When I had a full PBX server, I had a FXO card so I could interface with the standard POTS (phone company) line and a VoIP link so I could get to the outside world when the POTS line was in use. In my current setup I just have a VoIP link.

    Could the FXO card work in a virtual server setup? I can’t really answer that since I don’t have the FXO card installed in the computer, but I tend to be thinking that it could not work. Virtual PC 2007 shares various types of hardware - keyboards, mice, audio cards, and display adapters…but it does it in a way that you have to use specific Virtual PC drivers to access some of that hardware to get the most use out of it.

    Virtual PC 2007 comes with special drivers if you install a Windows based operating system inside of it that will improve the speed and functions of that virtual operating system. As Trixbox runs in Linux, we do not have the option to take advantage of those drivers. Thankfully Trixbox is aware enough to access the virtual network card and other basic essentials.

    So until I have the chance to install the FXO card again, that will be a mystery…but not an issue. My VoIP link is all I will ever need for this system.

    Right now I have VoIP service through a company called Vitelity Communications. While their initial startup cost is higher than many other providers, their call and telephone number rates are some of the best I’ve found. The initial cost (as of this post) that gets turned into an account credit is $35. You can also add an 800 number for around $0.50 a month.

    Setting up Vitelity inside of Trixbox is the same as configuring any other VoIP service. You add a trunk (SIP or IAX) with the specific login information that your VoIP provider supplies you and route calls through that trunk.

    Issues & Reliability

    Now, as I mentioned earlier, there are issues with the output of voice prompts and voicemail messages. When you play back a voicemail or try to navigate through an IVR, the audio is playing back at about half the speed it should be. I recorded an example that you can listen to below:

    (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

    Other issues, such as internet latency and issues with your host operating system, could also cause issues with your call quality and VoIP server performance. If you’re going to use a PBX server for full time use, I would recommend dedicated equipment and a FXO card to connect your system to the local POTS service.

    Virtual PC 2007, while an excellent free application from Microsoft, is not without fault. While so far I haven’t run into any serious issues, I did notice that if I interact with the application (right click on its icon, for instance), the virtual operating system will stop processing any functions. This can cause some issues (such as with the system time), but hasn’t been something that I have had to worry about yet.

    Summary

    If you’re interested in testing the waters of VoIP and Trixbox, this is the cheapest way to do it. You’re not going to get the best setup and you may run into issues like I have spoken about above, but it could be a good starting point to see if you’re at all interested in building a dedicated box and routing your calls full time over Trixbox.

    Also the best support you are going to get for your Trixbox installation is at the official forums. There are many highly skilled and certified Trixbox users there who know more about the system and how it works than I ever will.

    If you have any questions or corrections to something I have mentioned in this piece, please leave a comment and let me know.

    Filed under : Projects, Services | 4 Comments »