Results 1 to 10 of 10
Like Tree3Likes
  • 2 Post By ArchonAdvisors
  • 1 Post By dkirker
  1.    #1  
    Note that this how-to may be very rough, so I hope in time to clean it up, and also to improve it as I find better solutions.

    The purpose of this how-to is to try and give a fundamental generic approach to accessing live feeds from a variety of IP cameras on your webOS device. In the absence of a dedicated app for your IP camera, the goal is to be able to access live a live feed using only the stock/free software on a webOS device (possibly along with Preware, for some of the setup). These instructions should work on any webOS device.

    This how-to will cover accessing a camera that outputs a stream in MJPEG format, which cannot be displayed natively by the stock video player on all webOS devices. If your camera already output's video in MP4 (h.264) format, I have written a separate how-to covering how to handle that here: How to: MP4/h.264 IP Camera Streaming to webOS devices

    Overview:
    1. Identify the direct stream URL for your camera model
    2. Set up VLC to transcode the camera video stream into an MP4/h.264 stream on-the-fly.
    3. Make a simple html file to open in the browser that loads the new transcoded stream
    4. Serve the html file to your webOS device(s) via web server).

    What you should have:
    -your webOS device (preferably with Preware installed)
    -a copy of VLC player <link here>
    -a computer running a tiny web server app, like Mongoose <link here>
    -a bit of knowledge of the command line

    Step 1: Find your direct stream URL

    This is probably the most crucial step. Most decent IP cameras on the market will, in addition to specialized apps, software, or web interfaces, also provide a way to directly access the camera's main video feed. This is sometimes called the "direct stream URL", "video stream URL", or something similar. It will usually start with "http://" (not the same as the web interface) or "rtsp://". If it is not provided in your camera's manual, another good resource for finding it is this support page for a product called iSpy that uses the same info as we are: Connecting iSpy to IP Cameras

    Once you are able to locate a URL for your camera's direct video stream, try it out in VLC player first to make sure you have the right one and that it works. Run VLC and click Media -> Open Network Stream. Enter the URL for your camera (substituting your specific info, like ip address, port, username, and/or password, where appropriate) and click Play. If the live feed from your IP camera shows up, give yourself a nice pat on the back...you're well on your way.

    Step 2: Use VLC for live transcoding

    The stock webOS video player does not support the MJPEG format, so what can be done is convert the MJPEG stream coming from the camera into an MP4 stream that the webOS player will recognize. VLC is an ideal tool for this purpose. It is free, and runs cross-platform on Windows, Linux, and OS X. It can also be run in the background from a command line script.

    With VLC installed, create an executable file (batch file in Windows, or shell script in Linux/OS X) to run a VLC command. The text below is the appropriate VLC command you can copy/paste into the file. Substitute your info where needed.


    <PATH TO VLC> -I http --stop-time 3600 --loop --clock-jitter=1000 --cr-average=1000 --clock-synchro=0 --sout-mux-caching=1000 --network-caching=1000 --live-caching=1000 --sout-rtp-caching=1000 --sout-rtp-proto=udp --postproc-q=6 "<DIRECT STREAM URL FOR CAMERA>" --sout-keep --sout='#transcode{vcodec=h264,vbvbvb=$1440$,$venc$=$x264${$aud$,$profile$=$baseline$,$level$=$21$,$keyint$=$2$,$bframes$=$1$,$thre$ $ads$=$1$,$ref$=$3$},$acodec$=$mp4a$,$ab$=$32$,$channels$=$1$}:$gather$:$rtp${$sdp$=$rtsp$://:$5554$/$stream$}'

    Helpful Notes-

    The <PATH TO VLC> will vary slightly depending on your OS:

    Windows:


    c:\program files (x86)\videolan\vlc\vlc.exe (64-bit Windows)

    or

    c:\program files\videolan\vlc\vlc.exe (32-bit Windows)

    Linux:

    /usr/bin/vlc

    OS X:

    /Applications/VLC.app/Contents/MacOS/VLC

    Advanced Notes (optional read)-

    The command above is what I have found to give consistent output after some testing. If you know you're way around VLC, feel free to tweak it for your particular setup. There is a lot of info on the VLC documentation and forums, but here is a brief look at some of the command line parameters I used:

    (--stop-time 3600 --loop): These two options together tell the VLC transcoder to restart every 30 minutes to keep things fresh.

    (--clock-jitter=1000 --cr-average=1000 --clock-synchro=0 --sout-mux-caching=1000 --network-caching=1000 --live-caching=1000 --sout-rtp-caching=1000): These are options that impact video buffering issues. I have them set lower to minimize delay between the camera stream and the output stream, since not much buffering is needed over a LAN connection.

    (--sout-keep): This tells the VLC transcoder to keep the output connection to webOS alive so that playback doesn't stop during momentary transcoder restarts.

    (#transcode options): These are somewhat conservative settings that will hopefully work for many cameras.

    Step 3: Create html file to open on webOS device

    The webOS browser will not load an rtsp:// address if you enter it directly into the address bar, but an easy workaround is to create a small html file that has a link to the rtsp address within it. Think of the html file created here very loosely speaking as your IP camera viewing "web app".

    To make this html file for loading the IP camera stream on your webOS browser, open notepad or another text editor, and paste the following code in, substituting your specific info where appropriate. Save the file as "ipcam.htm". (Note: The code below will actually auto-load a single video stream when the html file is opened. If you want to try adding more streams and have manual control over them, delete the portion that reads <meta http-equiv="REFRESH" content="0;url=rtsp://IP-ADDRESS-OF-PC:5554/stream"> ).

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>IP Camera</title>
    <meta http-equiv="REFRESH" content="0;url=rtsp://IP-ADDRESS-OF-PC:5554/stream">
    </HEAD>
    <BODY>

    <a href="rtsp://IP-ADDRESS-OF-PC:5554/stream">CLICK TO PLAY</a>

    </BODY>
    </HTML>

    Step 4: Loading the stream from your webOS device

    Once you have this html file that loads the stream, your best bet is to run a small http server program like Mongoose on the same computer as VLC, placing the ipcam.htm file whatever folder the web server makes available. The address to now open/bookmark the browser would be "http://IP-ADDRESS-OF-PC/ipcam.htm".

    Side note: If you're loading this on a TouchPad, you can actually save this browser bookmark as an icon on one of your launcher pages or in the quick launch bar for a more app-like experience.

    What you should see when you load this bookmark/"app" is a browser window pop up, which will almost immediately load the stock media player, which in turn will display your live camera feed.
    Last edited by ArchonAdvisors; 03/26/2013 at 10:24 AM.
    Shadowflank and bimmin like this.
  2. #2  
    Don't have a use for it currently but nice work man. Need more brains like you around here.
    Proud user of a Palm Pre+ on T-Mobile running 1.4.5 in New Orleans, Louisiana
    --
    Need some help getting Odamex on WebOS
    Remember the bombardment of letters WebOS users hopefully sent to HP? Well, we need you again loyal users. Click and sign to entertain the slight notion of this petition reaching LG. The numbers rise daily, we need to keep going! Even if its slim to none, its better than doing nothing and complaining!
  3. #3  
    ...please forgive my newbiness & pre-entry level knowledge (read: zero) ...I have 4 security cameras in each of 2 different locations (8 cameras, 2 systems) ...they are all visible via free apps in android or via web browser (M$IE) in windows. What I really wanna do, it is to view these cameras on my beloved HP Pre 3 ... Neither system needs the computer to be running at the location as they both are fitted out via a DVR which is directly connected to the internet. Is there a way? tia!
  4. #4  
    I'm also curious if creating a browser plugin to support MJPEG would work, too?
    Did you know:

    webOS ran on a Treo 800 during initial development.
  5.    #5  
    Quote Originally Posted by patapoof View Post
    ...please forgive my newbiness & pre-entry level knowledge (read: zero) ...I have 4 security cameras in each of 2 different locations (8 cameras, 2 systems) ...they are all visible via free apps in android or via web browser (M$IE) in windows. What I really wanna do, it is to view these cameras on my beloved HP Pre 3 ... Neither system needs the computer to be running at the location as they both are fitted out via a DVR which is directly connected to the internet. Is there a way? tia!
    Edit: I was actually starting to help you with this a while back in this thread any hope for internet surveillance camera software so take a look at what I found for you there.

    Again, to help answer your question, you will first and foremost you will need to give as much info about your cameras as possible. So as a pre-"Step 1" Do you at least have the exact brand and model of the cameras and DVRs? Also, If you still have the manuals handy, they might be a source of key info.

    Note that this has only been tested on independant freestanding cameras like the Foscam FI8910W. Depending on what multi-camera system you have, you could probably still adapt this method to work fine as long as your system gives you the ability to directly access the raw stream of each camera individually.
    Last edited by ArchonAdvisors; 10/13/2013 at 05:15 PM.
  6.    #6  
    Quote Originally Posted by dkirker View Post
    I'm also curious if creating a browser plugin to support MJPEG would work, too?
    You could probably speak to that better than me, but I suppose if it's possible to add MJPEG codec playback support to the browser through a plugin, that would help, at least for bringing through video, if you only need to see video of course.

    The other thing is though, I believe most cameras only provide a full audio/video stream by way of an rtsp URL, which will subsequently open up in the webOS media player. Ideally that is the level where native MJPEG playback support would go.
    Last edited by ArchonAdvisors; 10/13/2013 at 05:53 PM.
  7. #7  
    Quote Originally Posted by ArchonAdvisors View Post
    Edit: I was actually starting to help you with this a while back in this thread any hope for internet surveillance camera software so take a look at what I found for you there.

    Again, to help answer your question, you will first and foremost you will need to give as much info about your cameras as possible. So as a pre-"Step 1" Do you at least have the exact brand and model of the cameras and DVRs? Also, If you still have the manuals handy, they might be a source of key info.

    Note that this has only been tested on independant freestanding cameras like the Foscam FI8910W. Depending on what multi-camera system you have, you could probably still adapt this method to work fine as long as your system gives you the ability to directly access the raw stream of each camera individually.
    ok ...I am not able to go up and look at the cameras (physical challenge). The 4 cameras hook up by cables to a VmaxFlex DVR that hooks by cat5 to my router (2 cables, one for in &one for out I think) ... to locally view the camera output there's a screen on the DVR but also my windows8 computer uses an app DWACS ...to view online via android the app is DW VMax free on google play & I also can use MSIE10 to see the cameras which installs an activeX add on called ServiceCtrl & only works with that browser & the URL is to an address at dwddns.net which is digital watchdog ...I am able to see the DVR via web app and the video signal is NTSC & there is a wealth of configuration info but no camera models, etc. also...there is a second location where my 4 cameras are attached similarly to a DVR & thence to the internet by cat5 to the router info for which I also do not have (it is in a european country) ...the DVR is reached by me using a internet address ad dyndns.org and also installed an active x add-on (maybe only this one did that)... as far as android, the latter setup is visible via an app gDMSS HD Lite (also free) ...both systems have IR for night and do not have any pan/zoom or sound or alarm functions ...separate systems perform that at both places ...I would like to have more info for you and will try to get it ...thanks for having interest as this is a big sticking point for my Pre 3 which makes me sad not to have & brings me periodically to view the other devices ...however, with my physical challenge, the pre3 keyboard is sooo easy for my use, I don't want to change. my pre3 got messed up while in europe this past summer so I purchased a new one & paid plenty to stick with it... thanks!
    Last edited by patapoof; 10/13/2013 at 08:02 PM.
  8. #8  
    I was wondering if these mght be visible via web browser, but surely the activeX add on is the stumbling block ...I also wonder if there is any credence to some of the stuff speaking to running android apps on the pre3 as some kind of dependent window rather than installing the whole of an android mod...??? I am too ignorant to know the ins & outs of that...

    of course, none of this is involved for my touchpad inasmuch as CM9 is on it & the 2 apps (DW Max & gDMSS HD Lite work with aplomb showing both locations nicely)...
  9. #9  
    Quote Originally Posted by ArchonAdvisors View Post
    You could probably speak to that better than me, but I suppose if it's possible to add MJPEG codec playback support to the browser through a plugin, that would help, at least for bringing through video, if you only need to see video of course.

    The other thing is though, I believe most cameras only provide a full audio/video stream by way of an rtsp URL, which will subsequently open up in the webOS media player. Ideally that is the level where native MJPEG playback support would go.
    Yup. There is a GSM codec I believe in Preware. I don't believe that part would be hard. In fact, that should allow for embedded video. I may have to investigate! I believe that my Linksys cameras provide better quality over MJPEG. They apparently do 1-way audio, too. But it doesn't seem to be over MP4?....
    Did you know:

    webOS ran on a Treo 800 during initial development.
    ArchonAdvisors likes this.
  10.    #10  
    Quote Originally Posted by patapoof View Post
    ...I would like to have more info for you and will try to get it ...thanks for having interest as this is a big sticking point for my Pre 3 which makes me sad not to have & brings me periodically to view the other devices ...
    Sounds good. The more specific you can be, the better. It looks like there are several models of the VMAX Flex DVR, so knowing your actual model number will be important. As an aside, once you know your model number(s), you may want to just try briefly emailing the customer/technical support and simply ask them what rtsp url to use for direct access to each camera stream. That would avoid a whole lot of hassle if they provide you an answer.

    When you come back though, perhaps you want to reply in that other thread you started ( any hope for internet surveillance camera software ) on your unique situation and we can continue this discussion there.

    _
    Last edited by ArchonAdvisors; 10/14/2013 at 08:30 PM.

Similar Threads

  1. How to: MP4/h.264 IP Camera Streaming to webOS devices
    By ArchonAdvisors in forum webOS Tips, Info & Resources
    Replies: 0
    Last Post: 03/06/2013, 03:54 PM
  2. Media Streaming Tips & Tricks for the Touchpad and webOS devices
    By matteebee13 in forum webOS Tips, Info & Resources
    Replies: 22
    Last Post: 06/09/2012, 12:40 PM
  3. security camera streaming app like ASee
    By bckrupps in forum Palm Pre 2
    Replies: 2
    Last Post: 09/08/2011, 08:32 PM
  4. Develop WebOS apps, for newer devices and older devices.....
    By PalmPixi_User23 in forum webOS Development
    Replies: 2
    Last Post: 07/12/2011, 10:37 PM
  5. Patch Wanted: mJpeg support $50...
    By Dolio in forum webOS Patches
    Replies: 0
    Last Post: 09/22/2010, 03:06 AM

Posting Permissions