[Live-devel] Adding UDP Video to an Audio RTSP URL coming from an AXIS encoder in the same stream doesn't work
Ross Finlayson
finlayson at live555.com
Mon Nov 6 17:54:59 PST 2023
> On Nov 2, 2023, at 10:20 AM, Eric Eastman <Eric.Eastman at AITEngineering.com> wrote:
>
> I'm trying to combine video and audio in the same stream. I do see posts were you just add a subsession, but it doesn't work if the subsession is an rtsp url.
Sorry for the delay in responding to this. I haven’t tried adding a “ServerMediaSubsession” that’s not a “ProxyServerMediaSubsession” to a “ProxyServerMediaSession”, but off the top of my head, I don’t know of any reason why that wouldn’t work.
But my first question is: What specifically are you trying to do? Your audio appears to come from a ‘back-end’ RTSP server (embedded in an Axis camera). But where is your video coming from? If it’s coming from the same camera, then why do you not also use its RTSP stream? Or are you processing the video in some way before sending it to the proxy server? Note that it you do this, you have little chance of properly synchronizing audio and video. (To get A/V synchronization, both the audio and video substreams should use RTP.) Is it possible that the proxy server is actually sending both audio and video to your 'front-end' RTSP client (media player), but that it’s not able to render it because the timestamps are messed up? You can test this by using “openRTSP” <http://www.live555.com/openRTSP> as your front-end RTSP client.
An alternative would be to do the media processing/transcoding inside the proxy server, using the optional ’transcoding’ mechanism that’s provided with the “ProxyServerMediaSubsession” class. This isn’t well-documented, but you can see it by noting the optional “transcodingTable” parameter to the “ProxyServerMediaSubsession” constructor.
Also, why are you trying to reimplement the “OnDemandServerMediaSubsession” class (but calling it “OnDemandMediaSubsession”)? What’s wrong with the “OnDemandServerMediaSubsession” class that we already give you? If you find yourself duplicating a lot of the code that we've already given you, then you’re likely doing something wrong.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list