[Live-devel] How to use SimpleRTPSource for transferring metadata?
Steve Ha
steveha at u2sr.com
Tue Apr 12 00:34:26 PDT 2022
Dear Ross,
I made it work in a way similar to your guidelines except that I had to set
payloadType to a fixed value (107) for the metadata because the
'rtpPayloadTypeIfDynamic' always starts from 96.
*"If, on the other hand, you are trying to receive metadata from some other
RTP source, and then retransmit it with your server, then things get more
complicated (unless the RTP source has its own RTSP server, in which case
you should be able to use the existing “LIVE555 Proxy Server”, as is.)"*
Yes, I have tested the Proxy Server with streams received from cameras, it
works with some cameras and does not work with others, the video stream of
some cameras that goes through the proxy could not be decoded in my client
(though the origin stream can be decoded).
Thank you for the support.
On Tue, Apr 12, 2022 at 5:54 AM Ross Finlayson <finlayson at live555.com>
wrote:
> Are you trying to implement a RTSP server that serves (transmits) metadata
> from some local source? If so, then you don’t call
> "SimpleRTPSource::createNew()” at all. “SimpleRTPSource” is for
> *receiving* RTP streams, not transmitting them.
>
> What you need to do is:
> 1/ Implement a “FramedSource” subclass that delivers - in real
> time - individual “KLVunits” (i.e., one “KLVunit” at a time), each with an
> appropriate “presentationTime” (aligned with ‘wall-clock time’, i.e., the
> time that you’d get by calling “gettimeofday()”).
> 2/ Implement the "createStreamSource()” virtual function, which
> would create a new instance of your “FramedSource” subclass each time it’s
> called.
> 3/ Implement the “createNewRTPSink()” virtual function, as follows:
>
> RTPSink* MyServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock,
> unsigned char rtpPayloadTypeIfDynamic,
> FramedSource* /*inputSource*/) {
> return SimpleRTPSink::createNew(envir(), rtpGroupsock,
> rtpPayloadTypeIfDynamic,
> 90000, // rtpTimestampFrequency
> “application”, // sdpMediaTypeString,
> “smpte336m”, // rtpPayloadFormatName,
> 1, // numChannels,
> 0, // allowMultipleFramesPerPacket
> 1 // doNormalMBitRule (see the comments in
> “liveMedia/include/SimpleRTPSink.hh”)
> );
> }
>
>
> If, on the other hand, you are trying to receive metadata from some other
> RTP source, and then retransmit it with your server, then things get more
> complicated (unless the RTP source has its own RTSP server, in which case
> you should be able to use the existing “LIVE555 Proxy Server”, as is.)
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20220412/2abd0699/attachment.htm>
More information about the live-devel
mailing list