elsampsa / valkka-core

Valkka - Create video surveillance, management and analysis programs with PyQt
GNU Lesser General Public License v3.0
186 stars 35 forks source link

Subscribing to an RTP Stream and Re-publishing It Through an RTSP Server #63

Closed jonathanleinola closed 5 months ago

jonathanleinola commented 5 months ago

Question Regarding RTP Stream Handling and RTSP Republishing with Valkka

Background:

I have been working on a project where the goal is to subscribe to an RTP stream, potentially provided via an SDP file, and then re-publish this stream through an RTSP server. Previously, I utilized GStreamer for this purpose, but encountered several challenges that were difficult to debug.

Question:

Does Valkka support the functionality to directly handle and republish RTP streams as described above? Specifically, I'm interested in:

-Subscribing to an RTP stream using details from an SDP file. -Republishing that stream via an RTSP server using Valkka.

If Valkka supports these features, could you also provide some insights or examples on how this could be implemented?

Thank you for your assistance!

elsampsa commented 5 months ago

Never tried this exact permutation myself, but in principle, it should work.

Your starting point is this tutorial example.

You should first test that one, i.e. get stream from a local IP camera and then see if the established RTSP server (that forwards the said stream) works OK.

After that, you would change the source type in LiveConnectionContext from RTSP camera into SDP file: LiveConnectionContext accepts two type of connections: rtsp and sdp (see here).

After you have completed your code :) feel free to reopen this issue and attach it as a file into this ticket. We could even add it to the tutorial.

A word of warning: there was some issues with libValkka's RTSP server as described in here that still seem unresolved.