I got it working but I had to use VLC to restream the video in order to support HLS.
I'm using an
Axis M1011-W IP Camera.
I'm using Ubuntu with Apache as web server and the latest (nightly build) version of VLC. As I understand it, this funcionality can only be done with version 1.2 of VLC (which as of this writing is not released yet so you need the nightly builds)
Basically I run VLC from a computer (I may install it on a server later) to get the rtsp stream from the camera and I save it on a web server.
Basically the steps are:
1- VLC - Get the video stream from the camera, prepare the files for http live streaming
2- Save those files on a directory accesible by a Web Server
3- Use the web address of the stream within the Roku application
The steps with a little more detail:
Steps 1 and 2On my IP Camera I can access the video stream this way:
rtsp://root:password@192.168.1.5:554/axis-media/media.amp
So I run VLC this way:
vlc -I dummy --mms-caching 0 rtsp://root:password@192.168.1.5:554/axis-media/media.amp vlc://quit --sout='#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mywebserver/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}'
Where:
/var/www/streaming/ is the directory where I'm saving the stream files
http://mywebserver/streaming/ is web address of the location of the stream
The link http://mywebserver/streaming/mystream.m3u8 will get you access to the HTS stream.
Step 3To test it I used the program 'customvideoplayer' from the RokuSDK and I only changed the line of the stream url on the
main.brs to
http://mywebserver/streaming/mystream.m3u8
And it worked!
I'm still testing it but I'm thinking if I have a lot of people watching my IP camera I will run out of bandwidth very soon.
Does anyone know a way I could upload the video stream to Livestream or UStream using VLC (I have done it before) and then get the video directly from a Roku application? This way Livestream or UStream will handle the bandwidth.
To get it working I used as a reference :
-
http://wiki.videolan.org/Documentation:Streaming_HowTo/Streaming_for_the_iPhone- How to stream anything on your hard drive to your roku
http://forums.roku.com/viewtopic.php?f=28&t=38551&p=258686#p252994