Sign up here and you can log into the forum!

RTSP Stream

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

RTSP Stream   

Postby satraver » Thu May 06, 2010 8:11 am

Hi All, i was hoping i can get some input from the group

Ive been chipping away at getting the WD to connect to an IP camera thru the UMSP with either a RTSP or HTTP stream.

The IP camera can put out MJPEG, MPEG4 and H264 streams with the following strings from the camera log

MJPEG client request: 'PLAY' 'rtsp://192.168.0.102:554/mjpg/video.mjpg?resolution=qqvga/' 'RTSP/1.0'
MPEG4 client request: 'PLAY' 'rtsp://192.168.0.102:554/mpeg4/media.amp?resolution=qvga/' 'RTSP/1.0'
H264 client request: 'PLAY' 'rtsp://192.168.0.102:554/h264/media.amp?resolution=qqvga/' 'RTSP/1.0'

I put a link " CCTV" in the /umsp.php file which does appear on the screen and tries to connect.

If i change the MJPEG link to a simple string of ( http://192.168.0.102/mjpg/video.mjpg ) it will connect into VLC. and stream a picture, but the same string in the /umsp.php file will connect but i get a black screen and no streaming pictue.

Below is my /umsp.php file

Code: Select all
<?php

global $myMediaItems;

$myMediaItems[] = array(   
   'id'         =>  'umsp://plugins/revision3',  #Attribute of item
   'parentID'      => '0',                     #Attribute of item
   'restricted'   => '0',                     #Attribute of item
   'dc:creator'   => 'myCreator',
   'dc:title'      => 'CCTV Channel 1 TEST',
   'dc:date'      => '2009-12-30',
   'upnp:author'   => 'myAuthor',
   'upnp:artist'   => 'myArtist',
   'upnp:album'   => 'myAlbum',
   'upnp:genre'   => 'myGenre',
   'upnp:length'   => '2:10:20',
   'desc'         => 'myDesc',
   'upnp:class'   => 'object.item.videoItem',
   'upnp:album_art'=> '',
   'res'         =>'http://192.168.0.102/mjpg/video.mjpg',
   'duration'      => 'myDur3',            #Attribute of res
   'size'         => 'mySize3',            #Attribute of res in bytes
   'bitrate'      => 'myBitr',            #Attribute of res
   'protocolInfo'   =>'*:*:*:*',      #Attribute of res
   'resolution'   => 'myReso',            #Attribute of res
   'colorDepth'   => 'myColor',            #Attribute of res
);
?>


Any advice would be great.

thnks
Last edited by satraver on Thu May 06, 2010 9:07 am, edited 1 time in total.
satraver
n00b
 
Posts: 5
Joined: Tue May 04, 2010 7:19 am

Re: RTSP Stream   

Postby rezmus » Thu May 06, 2010 8:19 am

wdtv does support mjpg codec just not it's stream container from ip cams. u need to mux it to other container like mov for example. i tried to piped wget mjpg stream to ffmpeg to mux on the fly, but i was not able to play it during download (when i stop wget output file plays fine). i haven't done much testing, but it's probably the road you should follow and investigate.

have u tried mpeg4 or h264 streams?
rezmus
Developer
 
Posts: 111
Joined: Mon Apr 05, 2010 8:40 pm

Re: RTSP Stream   

Postby satraver » Thu May 06, 2010 8:46 am

when i first started testing i was trying the h.264 and mpeg4 streams but was getting " check supported formats" so i dropped the back to mjpeg as even with cctv equipment mjpeg will record on anything.

I just read about a loose MJPEG support thru the MOV format but hadnt tried it yet.

The other part of this which i think might be a prob is the newish IP cameras can allow multiple users to log in with different resolution settings for each user so the res setting is in the string below. i thinks this is where hte WD might also be confused.

rtsp://192.168.0.102:554/mjpg/video.mjpg?resolution=qqvga/
protocol://camera ip address:port/codec/ resolution = qqvga (120x168 @ 1 fps)

But like i mentioned earlier cutting the stream syntax down to http://192.168.0.102/mjpg/video.mjpg it at least got a connection but thats all.
satraver
n00b
 
Posts: 5
Joined: Tue May 04, 2010 7:19 am

Re: RTSP Stream   

Postby satraver » Mon Jun 28, 2010 6:33 am

Hi All just like to put this out there and see if anyone else has tried this or can give me some guidence
Im calling the IP camera from the UMSP.php with this

$myMediaItems[] = array(
'id' => strval(count($myMediaItems)+1), #Attribute of item
'parentID' => '0', #Attribute of item
'restricted' => '0', #Attribute of item
'dc:creator' => 'myCreator',
'dc:title' => 'CCTV TEST MPEG4',
'dc:date' => '2009-12-30',
'upnp:author' => 'myAuthor',
'upnp:artist' => 'myArtist',
'upnp:album' => 'myAlbum',
'upnp:genre' => 'myGenre',
'upnp:length' => '2:10:20',
'desc' => 'myDesc',
'upnp:class' => 'object.item.videoItem',
'upnp:album_art'=> '',
'res' => 'http://192.168.0.211:554/mpeg4/media.amp?resolution=vga/',
'duration' => 'myDur3', #Attribute of res
'size' => 'mySize3', #Attribute of res in bytes
'bitrate' => 'myBitr', #Attribute of res
'protocolInfo' => 'http-get:*:video/mp4:*', #Attribute of res
'resolution' => 'myReso', #Attribute of res
'colorDepth' => 'myColor', #Attribute of res


this is the result from the camera log
Jun 28 22:20:16 ICA-HM130 user.debug rtsp-svr: accepted connection from 192.168.0.144:54783
Jun 28 22:20:16 ICA-HM130 user.debug rtsp-svr: client request: 'HEAD' '/mpeg4/media.amp?resolution=vga' 'HTTP/1.0'
Jun 28 22:20:16 ICA-HM130 user.debug rtsp-svr: accepted connection from 192.168.0.144:54784
Jun 28 22:20:16 ICA-HM130 user.debug rtsp-svr: client request: 'GET' '/mpeg4/media.amp?resolution=vga' 'HTTP/1.0'


A successfull connection to the camera from web page or vlc is as follows

Jun 28 22:02:47 ICA-HM130 user.debug rtsp-svr: client request: 'PLAY' 'rtsp://192.168.0.211:554/mpeg4/media.amp?resolution=vga/' 'RTSP/1.0'
Jun 28 22:02:47 ICA-HM130 user.debug rtsp-svr: starting streaming for session 1759255017 at position 0.0000
Jun 28 22:02:47 ICA-HM130 user.debug rtsp-svr: RTP-Info:url=rtsp://192.168.0.211:554/mpeg4/media.amp?resolution=vga/trackID=1;seq=60458;rtptime=1547210646;ssrc=1809640087,url=rtsp://192.168.0.211:554/mpeg4/media.amp?resolution=vga/trackID=2;seq=17406;rtptime=436362459;ssrc=418141244
Jun 28 22:02:47 ICA-HM130 user.debug AVControl: profile[4] running 1
Jun 28 22:02:47 ICA-HM130 user.debug AVControl: audio[201] running 1

Im not sure how how the WD will allow me to call the stream with a PLAY command?
satraver
n00b
 
Posts: 5
Joined: Tue May 04, 2010 7:19 am

Re: RTSP Stream   

Postby PaulF » Mon Jun 28, 2010 10:41 am

It looks like the camera is a UPNP device. Does the the WD Live "discover" it under the "Media Servers" menu? Just curious and still learning. You can change the GET to play with a proxy, I think. See IPTV thread for an example proxy.
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: RTSP Stream   

Postby satraver » Mon Jun 28, 2010 4:54 pm

thnx, Yes the ip cam is a upnp but not discovered in the media servers. Ill look at the proxy way to do it and see what i can find.
satraver
n00b
 
Posts: 5
Joined: Tue May 04, 2010 7:19 am

Re: RTSP Stream   

Postby Kurtois » Sun Sep 12, 2010 9:15 am

I am interested in this work. I have three Axis Cameras (2x 207w, 1x 1011-w). They are UPnP capable. Has anyone made any progress?
Kurtois
Donor
 
Posts: 9
Joined: Mon Sep 06, 2010 11:43 am

Re: RTSP Stream   

Postby mad_ady » Thu Nov 01, 2012 8:54 am

Sorry to revive this old thread, but maybe you'll be interested in this new plugin: http://forum.wdlxtv.com/viewtopic.php?f=53&t=7500&amp;
User avatar
mad_ady
Developer
 
Posts: 4562
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania


Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 3 guests

cron