Hikri Kobi | 24 Jul 15:14 2016

Manage (open / close) connection to camera with openRTSP and consume RTP via mobile client

Hi all,

 

I’m examining the suitability of openRTSP for my needs.

It looks very promising!

 

My question:

 

Is it possible to use openRTSP to initiate an RTP stream from an RTSP camera - and consume the stream from another device?

 

This is what I’ve done this far:

 

1. My client sends a SIP message which contains an SDP to a proxy service. I currently do nothing with this SDP.

2. The proxy service invokes openRTSP and captures it’s output SDP.

            Here is the invocation line: 

    openRTSP -p 60000 -u dev dev rtsp://192.168.123.135:554/live/ec49fc08-e751-4a95-be0e-5f5e29a9bbc7

3. The proxy returns a 200OK message to the client with the returned SDP.

 

The client is not able to play the stream.

 

Here is the returned SDP (reported by openRTSP):

 

v=0

o=- 1469382999019782 1 IN IP4 127.0.0.1

s=libttrtspserver

c=IN IP4 0.0.0.0

t=0 0

a=tool:libttrtspserver 1.0.0

a=range:npt=now-

m=video 0 RTP/AVP 96

a=framerate:1.000000

a=rtpmap:96 H264/90000

 

How do I instruct openRTSP to return the correct camera address and port?

 

Any assistance will be highly appreciated :-),

 

Best regards,

Kobi.

 

 
The information in this e-mail transmission contains proprietary and business
sensitive information.  Unauthorized interception of this e-mail may constitute
a violation of law. If you are not the intended recipient, you are hereby
notified that any review, dissemination, distribution or duplication of this
communication is strictly prohibited. You are also asked to contact the sender
by reply email and immediately destroy all copies of the original message.
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
bearded_admin | 18 Jul 06:54 2016
Picon

Pipe streaming - read freeze

Hi,

When I run code testOnDemandRTSPServer for live h264 streaming (read data from linux pipe), streaming stops until at least one client not connected. My app opens pipe to writing, after that Live555 doesn’t open pipe for reading while no clients connected. Thats why my app freezes. So, how I can force live555 testOnDemandRTSPServer to don’t waiting for clients for start reading from pipe immediately?

--
Thanks in advance.

Roman
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Ahmadi | 17 Jul 11:34 2016

help for changing static var eventtriggerId to non-static (multi instance of rtsp server)

Hi
I use live555 to stream webcams with using ffmpeg for encoding them.
I use project in below link that it uses ffmpeg + live555 for encoding and streaming :
 
I want to stream multiple webcams at the same time and so, I create new thread  for each of them.
Because of using static variable eventtriggerId , program will be aborted.
I searched in google and I found that I must convert static var to non-static variable and for each instance of threads ,
I should use different eventtriggerId .
The code of DeviceSource.cpp should be changed for this .but I don't know how to change it .
I have some questions , Please help me :
1) If I use different eventtriggerId (not equals to zero) , in DeviceSource constructor where code is :
if (eventTriggerId == 0) {
    eventTriggerId = envir().taskScheduler().createEventTrigger(deliverFrame0);
}
in if statement : Should I use eventtriggerId value that I set for each thread instead zero or it must be zero ?
 
2)When I convert static variable eventtriggerId to non-static var , how I get access to it in other class like FFMPEGClass that accessed to it ?

Is there a project or help link to expalins details of changing static var  eventtriggerId to non-static and other next changes in external thread?
 
Thanks
Best Regards
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Pavel Aronov | 15 Jul 16:46 2016

Crash inside RTSPServer destructor

Hi everyone

I have a problem in my application (implementation of proxy server) when I try to close RTSPServer. Application immediately crashes. Backtrace shows that it happens inside RTSPServer.

(gdb) bt
#0  0x00007f47500024e0 in ?? ()
#1  0x0000000001023976 in RTSPServer::RTSPClientConnection::~RTSPClientConnection() ()
#2  0x00000000010239d9 in RTSPServer::RTSPClientConnection::~RTSPClientConnection() ()
#3  0x000000000101f8cf in GenericMediaServer::cleanup() ()
#4  0x00000000010201e0 in RTSPServer::~RTSPServer() ()

Further investigations showed that it crashes on the following line: fOurRTSPServer.fClientConnectionsForHTTPTunneling->Remove(fOurSessionCookie). So the reason seems to be simple, we call "delete fClientConnectionsForHTTPTunneling" in RTSPServer, and after that we call cleanup, which deletes RTSPClientConnection and it makes a call to our already deleted fClientConnectionsForHTTPTunneling. If I place "delete fClientConnectionsForHTTPTunneling" after cleanup and recompile live555, there is no crash. If RTSP client doesn't use RTSP-over-HTTP tunneling, there is also no crash.

Is it a bug in RTSPServer? Or maybe there should be some steps, that I should take before call to "Medium::close(rtspServer)"?

Best regards,

Pavel

This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Ben Rush | 13 Jul 20:38 2016
Picon

recommended way of running two instances of RTSPServer in a single process

I'd like to have a single process expose two separate RTSP addresses: 

rtsp://<myip>:<myport1>/endpoint1
rtsp://<myip>:<myport2>/endpoint2

...as opposed to having multiple video subsessions from one server media session, I'd like two separate servers on different port numbers, etc. For management (for us, anyway), it'll be easier if it's hosted in a single process. 

I assume what I'd have to do is literally create two separate instances of BasicTaskScheduler and BasicUsageEnvironment, and attach two separate instances of RTSPServer to each, and so forth. Or is this overkill? Can a BasicTaskScheduler be reused? Basically I'm looking for the "best" way to do this (and most supported moving forward). 

...I also know that I could create multiple video streams under a single media session ("video tracks"), but I'd like different endpoints altogether. 

Thanks. 
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Nathan | 13 Jul 10:35 2016

RTSP client: handle connection header

Hello Ross
 
Using LIVE555 as a client to receive RTSP/RTP/MPEG2-TS streams from a 3rd party RTSP server, I've encountered a problem which I'm hoping can be easily fixed.
 
Sequence for reproducing is as follows...
 
1. Use LIVE555 RTSP client to send a SETUP request:
 
SETUP rtsp://172.31.0.1:554/stream1760952/ RTSP/1.0
CSeq: 2
User-Agent: LIVE555 Streaming Media v2015.07.31
Transport: RTP/AVP;unicast;client_port=62392-62393

2. The 3rd party server responsds:
 
RTSP/1.0 200 OK
CSeq: 2
Session: 3621155123
Blocksize: 15452
Transport: RTP/AVP;unicast;client_port=62392-62393;server_port=5001-5002
Server: DOTS 2.0 UPnP/1.0 ATI TV Wonder OpenCable Receiver (37F0), Unit #1/(null)
CONNECTION: Close
CACHE-CONTROL: no-cache

So far so good.
 
3. Attempt to use LIVE555 RTSP client to send a PLAY request:
 
PLAY rtsp://172.31.0.1:554/stream1760952/ RTSP/1.0
CSeq: 3
User-Agent: LIVE555 Streaming Media v2015.07.31
Session: 3621155123
Range: npt=0.000-

 
==> LIVE555 returns error code -10057 (-WSAENOTCONN).
 
 
After some investigation I think I've discovered the cause of the problem.
 
The connection header in the SETUP response indicates that the server expects LIVE555 to close its socket on reception of that response. However LIVE555 currently does not handle the connection header, and therefore doesn't close its socket. When asked to send the PLAY request, LIVE555 almost always attempts to reuse the same [closed] socket. Since the server has closed its end of the socket, the PLAY request fails. Occasionally when LIVE555 coincidentally sends the PLAY request on a newly connected socket, the request succeeds and the RTP stream can connect.
 
The following patch seems to be an effective solution:
(RTSPClient.cpp line 1745)
    } else if (checkForHeader(lineStart, "Connection:", 11, headerParamsStr)) {
      if (_strncasecmp(headerParamsStr, "Close", 5) == 0) {
        resetTCPSockets();
      }
    }
 
 
If you consider this solution to be appropriate, please would you consider accepting this patch.
 
Thanks and regards,
Nathan
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Ben Rush | 6 Jul 23:05 2016
Picon

Is there a mechanism for telling a client to switch streams?

I realize that, if there is a supported mechanism, that it's largely the responsibility of the client (and therefore that this may not be a Live555 server concern), but I'm also curious about what it would take on the server to implement stream switching. 

Here is our scenario. I'm using Live555 to create a RTSP server for audio/video streaming. Works great. Love it. 

One of the things we're looking at is offering what, I suppose, could be seen as "adaptive streaming". Different clients with different bandwidths are going to be requesting our stream(s) in the future, and we're looking for ways to have one bitrate stream playing and let the client switch, seamlessly, to a different stream (higher or lower bitrate). Alternatively it'd be nice for the SERVER to also TELL the client to switch to a different stream (it's a long story, but our server will have the ability to identify it should serve higher or lower bitrate streams too). Rather than switching the bitrate of the stream I'm serving from the server, it might be easier to just have multiple streams (different bitrates) playing, and letting the clients bounce between them. 

A cursory glance at the protocol has lead me to believe that the ANNOUNCE method might be the way to tell clients to change streams (resending the SDP, right?) Is this something I can easily roll out using Live555, or is this going to likely require a lot of custom code to do? 

As always, thanks in advance and much respect to the brains in this group. 
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Kate Thomas | 5 Jul 21:40 2016
Picon

debugging video quality/corrupt issues

hi Everyone

I'm trying to troubleshoot a video quality problem on a local network.

Live & playback on some videostreams has 'tears' in the image, and I'm trying to determine in the video stream has lost packets, or whether the VMS is receiving corrupt video images.
I've tested the network itself, which looks fine, and believe the next step is to correlate at the application layer, from camera to VMS. 

I know I can use OpenRTSP to look at incoming faults, however, the effect is intermittent. Is there a way of analysing stored video files after they've been received to see if/when they suffered packet loss which corrupted the video? A bit like using the 'Q' option in an offline way. 

If I can validate no packet loss, this would suggest something in the encoding at the camera end. I should add that not all cameras seem to be effected.... 

I've had a good search & google for tools, and perhaps to my inexperience I've missed something that is out there, or how to do this. 

Many thanks,

Kate <at> UK.
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Jannik Schacht | 29 Jun 16:38 2016

http://live555.com/liveMedia/#config-windows with Visual Studio 2015 Pro.

Dear Live555 Support,

 

I am interested in using the openRTSP program for some scheduled video streaming tasks. My problem is now that I have no idea how to open it in Visual Studio 2015 Professional to compile me a .exe.

First I opened “win32config” and changed TOOLS23 to “C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC”.  Then I created the makefiles like written in http://live555.com/liveMedia/#config-windows .

Then I searched for some open/import functionality in Visual Studio 2015 to open these but didn’t find it. Then I read about nmake and tried to “nmake <projdir>\UsageEnvironment\UsageEnvironment.mak”.

After reading that “ntwin32.mak” and ”win32.mak” were missing and adding them (Out of Microsofts Windows 7.1 SDK) I hit my current problem which is “NMAKE : fatal error U1073: don't know how to make 'include/UsageEnvironment_version.hh'”

I didn’t change anything about the makefile (I use live555-latest.tar.gz last edited 26.06.2016) and the include/UsageEnvironment_version.hh file is present.

So I don’t know why I get that error.

Could you please explain how I can import the necessary files for openRTSP into Visual Studio 2015 or make the makefiles working with nmake or send me a compiled exe version of the openRTSP program?

 

 

Best Regards,

 

Jannik schacht

Software Engineer KM Embient

Subsea Monitoring

 

Jannik.Schacht <at> km.kongsberg.com

www.km.kongsberg.com

 

 

 

LOCATIONS

Kongsberg Maritime AS, Subsea Division, Strandpromenaden 50, NO-3183 Horten Norway, P.O.Box 111, NO-3191 Horten, Norway, Enterprise number 979750730

 

My location: Kongsberg Maritime Embient GmbH, a limited liability company according to German company law located at Gewerbering 10-14, 25469 Halstenbek, Germany, Handelsregister | Place of registration: Amtsgericht Pinneberg, Registernummer | Registration number: HRB 8422 PI, USt.-IdNr. | VAT ID-No.: DE269017722, Sitz | Registered office: Gewerbering 10-14, 25469 Halstenbek, Geschäftsführer | Managing Director: SörenThemann

 

Kongsberg Maritime Contros GmbH, a limited liability company according to German company law located at Wischhofstrasse 1-3 Bld.: 2, 24148 Kiel, Germany, Handelsregister | Place of registration: Amtsgericht Kiel, Registernummer | Registration number: HRB 8587 KI, USt.-IdNr. | VAT ID-No.: DE252286218, Sitz | Registered office: Wischhofstrasse 1, 24148 Kiel, Geschäftsführer | Managing Director: SörenThemann

 

CONFIDENTIALITY

This communication (including the e-mail and its attachments) contains KONGSBERG information that may be proprietary, confidential or subject to export regulations, and is meant only for the intended recipient(s). Any disclosure, copying, distribution or use of this communication is prohibited, unless and to the extent such disclosure, copying, distribution or use is explicitly agreed in advance with KONGSBERG. If this communication is received in error, please delete it immediately from your system and notify the sender promptly.

 

 

_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
Maxim P. DEMENTIEV | 29 Jun 17:54 2016
Picon
Gravatar

ServerMediaSession::numSubsessions() and fNumStreamStates in RTSPServer::RTSPClientSession::handleCmd_SETUP()

Hi,

A cycle with ServerMediaSubsessionIterator is used in
RTSPServer::RTSPClientSession::handleCmd_SETUP() to calculate the value
of fNumStreamStates.

I wonder why ServerMediaSession::numSubsessions() isn't used for it?
Could they have different results?

Regards,
Max
Ben Rush | 27 Jun 23:20 2016
Picon

Is it valid to call startPlaying on a MediaSink AFTER TaskScheduler->doEventLoop()?

I hope I'm not asking too many questions on this group. I *am* searching through the archives, but I'm not always finding the answers I need. 

Anyway, standard setup: 

_taskScheduler = BasicTaskScheduler::createNew();
    _usageEnvironment = BasicUsageEnvironment::createNew(*_taskScheduler);
.....
_taskScheduler->doEventLoop(&_volatile);

I have walked through the server code some, and I think the answer is yes, but is it valid to "attach" a RTPSink (SimpleRTPSink, for example) by calling 

_sink->startPlaying(...)

AFTER the doEventLoop has been called? So long as its been initialized with the same BasicUsageEnvironment which was passed my BasicTaskScheduler, it should then be hooked up and start executing. Correct? 

And if that's okay to do, are there certain points in the pipeline where doing so would result in the sink NOT playing correctly? I'd like to start sending RTP packets to the source AFTER I start receiving packets from said source. So in MediaSink, in afterGettingFrame, I check that I haven't done so already, and then I spin up an instance of a SimleRTPSink and then call ->startPlaying (to stream back to the source).

Am I doing this in the right points of the pipeline? 
_______________________________________________
live-devel mailing list
live-devel <at> lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Gmane