[Live-devel] live-devel Digest, Vol 147, Issue 13 "Convert A camera stream without saving it in a file, how to directly take an rtsp stream convert it and send it to, a client without big delay of conversion"

Ismail Ouchatti iouchatti at otonomy-aviation.com
Mon Feb 22 08:59:24 PST 2016


Hello
Thank you very much for the response i tried to do what you asked me on 
your last email but i am a bit confused so please tell me if i 
understood well your response any more detailed code will help us so 
much so don't hesitate if it is easy for you to give me an example for 
one camera for something that could work and i will begin with it to 
understand and  develop with live555 and we will be happy to get a 
solution to our problem by using live555 :

Our cameras :

====CAMERA 1 
================================================================
My camera stream to be converted is  : 
rtsp://192.168.50.41:8601/wxHdSdiStreaming/2?videoCodecType=H.264

My conversion to Transport stream

My converted stream output : rtp://192.168.50.22:5041
==============================================================================
====CAMERA 2 
================================================================
My camera stream to be converted is  : 
rtsp://192.168.50.42:8601/wxHdSdiStreaming/2?videoCodecType=H.264

My conversion to Transport stream

My converted stream output : rtp://192.168.50.22:5042
==============================================================================
.
.
.
====CAMERA 8 
=================================================================

My second camera Stream to be converted  : 
rtsp://192.168.50.48:8601/wxHdSdiStreaming/2?videoCodecType=H.264

My conversion to Transport stream

My converted stream output : rtp://192.168.50.22:5048
=============================================================================== 


On  ?testH264VideoToTransportStream.cpp?

1/ Change inputFileName from ?in.264? to ?stdin?, and
2/ Change outputFileName from ?out.ts? to ?stdout?.
==========================================================

Results : do i have to put stdin definition or really "stdin" like i did 
in the following code?

==testH264VideoToTransportStream.cpp======================


#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"

char const* inputFileName = "stdin";
char const* outputFileName = "stdout";

==========================================================


On  ?testMPEG2TransportStream.cpp?

3/ Change inputFileName from ?test.ts? to ?stdin?, and
4/ Change destinationAddressStr and rtpPortNum from built-in constants to command-line arguments.


==testMPEG2TransportStream.cpp==============================

UsageEnvironment* env;
char const* inputFileName = "stdin";
FramedSource* videoSource;
RTPSink* videoSink;

void play(); // forward

int main(int argc, char** argv) {
   // Begin by setting up our usage environment:
   TaskScheduler* scheduler = BasicTaskScheduler::createNew();
   env = BasicUsageEnvironment::createNew(*scheduler);

   // Create 'groupsocks' for RTP and RTCP:
   char const* destinationAddressStr
#ifdef USE_SSM
     = "232.255.42.42";
#else
   = "239.255.42.42";
   // Note: This is a multicast address.  If you wish to stream using
   // unicast instead, then replace this string with the unicast address
   // of the (single) destination.  (You may also need to make a similar
   // change to the receiver program.)
#endif
   const unsigned short rtpPortNum = argv[6] ; //Server PORT NUM to send 
the stream it does change for each caméra 5040 to 5048 for 9 caméras
   const unsigned short rtcpPortNum = 8601; //caméra port Num ( doesn't 
change from a caméra to an other one, only the ip address does change )
   const unsigned char ttl = 3; // low, in case routers don't admin scope

==========================================================

Commande line :

openRTSP -v rtsp://192.168.50.41:8601/wxHdSdiStreaming/2?videoCodecType=H.264 | testH264VideoToTransportStream | testMPEG2TransportStreamer 192.168.50.22 5041 &
openRTSP -v rtsp://192.168.50.42:8601/wxHdSdiStreaming/2?videoCodecType=H.264 | testH264VideoToTransportStream | testMPEG2TransportStreamer 192.168.50.22 5042 &
openRTSP -v rtsp://192.168.50.43:8601/wxHdSdiStreaming/2?videoCodecType=H.264 | testH264VideoToTransportStream | testMPEG2TransportStreamer 192.168.50.22 5043 & ..... &
openRTSP -v rtsp://192.168.50.48:8601/wxHdSdiStreaming/2?videoCodecType=H.264 | testH264VideoToTransportStream | testMPEG2TransportStreamer 192.168.50.22 5048


do i have to change this :  ifdef USE_SSM= "232.255.42.42"; ?

Thank you in advance

Le 19/02/2016 21:00, live-devel-request at ns.live555.com a écrit :
> Send live-devel mailing list submissions to
> 	live-devel at lists.live555.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.live555.com/mailman/listinfo/live-devel
> or, via email, send a message with subject or body 'help' to
> 	live-devel-request at lists.live555.com
>
> You can reach the person managing the list at
> 	live-devel-owner at lists.live555.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of live-devel digest..."
>
>
> Today's Topics:
>
>     1. Re: Convert A camera stream without saving it in a	file,	how
>        to directly take an rtsp stream convert it and send it to a
>        client without big delay of conversion (Ross Finlayson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 19 Feb 2016 06:54:07 -0800
> From: Ross Finlayson <finlayson at live555.com>
> To: LIVE555 Streaming Media - development & use
> 	<live-devel at ns.live555.com>
> Subject: Re: [Live-devel] Convert A camera stream without saving it in
> 	a	file,	how to directly take an rtsp stream convert it and send it to
> 	a	client without big delay of conversion
> Message-ID: <1631C348-CE2E-4E08-B2C0-1FE5E0B02660 at live555.com>
> Content-Type: text/plain; charset=windows-1252
>
>> I installed Live555 as discribed in your response but i need a commade ligne wich allow me to convert live streaming from multiple cameras : i have RTSP_Stream and a client who need mpegts stream format.
>>
>> The need  that we have somthing like this for example  :   OpenRTSP <RTSP_STREM_FROM_CAMERA_SERVER>   Convert_RTSP_STREM_TO_TS <Client_RTP_ADDRESS_:_CLIENT_PORT>
>>
>> Can i do this with live555 tools?
> Yes.  The easiest way to do this is to modify the ?testH264VideoToTransportStream.cpp? code to:
> 1/ Change inputFileName from ?in.264? to ?stdin?, and
> 2/ Change outputFileName from ?out.ts? to ?stdout?.
>
> Then modify the ?testMPEG2TransportStreamer.cpp? code to:
> 3/ Change inputFileName from ?test.ts? to ?stdin?, and
> 4/ Change destinationAddressStr and rtpPortNum from built-in constants to command-line arguments.
>
> Then run, for each camera:
> 	openRTSP -v camera-rtsp-url | your-modified-testH264VideoToTransportStream | your-modified-testMPEG2TransportStreamer client-rtp-address client-rtp-port &
> I.e., for each camera, you run ?openRTSP? on it, piping its H.264 video output to (your modified) ?testH264VideoToTransportStream?, then piping the Transport Stream output of that to (your modified) ?testMPEG2TransportStreamer?.
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
> ------------------------------
>
> End of live-devel Digest, Vol 147, Issue 13
> *******************************************



More information about the live-devel mailing list