I am working on a project that uses the live555 proxy server to receive 4K 
video streams from a H.265 IP camera sent over a radio link to efficiently 
redistribute them over RTSP. I am able to connect a VLC client and play the 
RTSP stream from the proxy server. An additional customer requirement however 
is to also be able receive the video stream as MPEGTS over multicast UDP (not 
RTP) for compatibility with some legacy SW. I reviewed the many articles on the 
live555 forum. Here is what I came up with. It is not clear to me if this is 
the right approach.

First I modified the RTSP client to request RAW-UDP from the proxy server as 
described here:
http://lists.live555.com/pipermail/live-devel/2011-November/014016.html

I verified that the SETUP command is sending out transport header as 
RAW/RAW/UDP. Next I use a BasicUDPSink to send out the data instead of the 
DummySink in that example. I wrote a quick multicast client (test code) to join 
the multicast group and dump the data. It see a whole bunch of frames beginning 
with the the same sequence of bytes. I am thinking these are raw H.265 frames.

Next I added a MPEG2TransportStreamFramer to the incoming data and then send it 
to the BasicUDPSink as described here:
http://lists.live555.com/pipermail/live-devel/2015-April/019234.html
like this ...

    struct in_addr outputAddress;
    outputAddress.s_addr = our_inet_addr(outputAddressStr);
    portNumBits outputPortNum = 4444;
    Port const outputPort(outputPortNum);
    unsigned char const outputTTL = 255;
    outputGroupsock = new Groupsock(env, outputAddress, outputPort, outputTTL);
    unsigned const maxPacketSize = 65536; // allow for large UDP packets
    scs.subsession->sink = BasicUDPSink::createNew(env, outputGroupsock, 
maxPacketSize);

                FramedSource* videoES = scs.subsession->readSource();
                videoSource = MPEG2TransportStreamFramer::createNew(env, 
videoES);

                scs.subsession->sink->startPlaying(*videoSource, 
subsessionAfterPlaying, scs.subsession);

Here is what I observe ...
1. I see frames beginning with 0x47 0x01 (as I understand that this is the 
MPEGTS header) coming into my multicast test client.
2. VLC is unable to play the MPEGTS video stream. I use the URL 
udp://@<multicast-group-ip-addr>:<portnum>. I do not see any video.
3. Also the frames stop coming into my test multicast client program. The RTSP 
client seems blocked on select call on the socket inside
BasicUDPSink. I am looking further into why this is happening.

Questions:
1. Am I pursing the right strategy to accomplish my final objective - namely, 
playing MPEGTS stream over multicast UDP, the video source being the proxy 
server.
2. If yes, what is the best way to verify that the RAW-UDP data I receive in my 
RTSP client are indeed H.265 frames ?
3. Also, what the best way to verify that the MPEGTS framing is being sent to 
the multicast group?

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to