Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backchannel support for rtsp server #1432

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

seydx
Copy link

@seydx seydx commented Nov 3, 2024

Currently, there is no way for clients to send audio data to go2rtc via RTSP backchannel, as the RTSP server lacks a backchannel implementation.

This PR adds a backchannel to the stream (when backchannel=1) and thus allows clients to send audio data to go2rtc.

Tested streams so far:

  • webrtc:ws://
  • tapo://
  • rtsp:// with backchannel

I think other streams with backchannel should also work

@AlexxIT AlexxIT self-assigned this Nov 4, 2024
@felipecrs
Copy link
Contributor

@seydx, out of curiosity, what use case this enables? Connecting a go2rtc server to another?

@seydx
Copy link
Author

seydx commented Nov 4, 2024

@seydx, out of curiosity, what use case this enables? Connecting a go2rtc server to another?

This implementation allows me to send audio data directly to go2rtc using my RTSP client. The data is sent interleaved over the connected socket

Since go2rtc offers two-way audio for some cameras, e.g. tapo etc, the rtsp client can connect to the go2rtc rtsp link of the tapo camera and send audio data directly

This functionality is natively available in WebRTC, where you can send audio directly from the browser to the camera. With this implementation, virtually anyone can do it, regardless of the programming language​​​​​​​​​​​​​​​​ and environment, since rtsp ist just a tcp connection

@SVilgelm
Copy link

SVilgelm commented Jan 8, 2025

This is great, I would really like to this feature, hopefully it will allow me to have two-way audio with my kasa cameras via scrypted.

I'm using go2rtc to capture the videos and transcode audio from kasa cameras, then i connect the cameras to scrypted via rtsp to have motion detection and then to HomeKit :)

@SVilgelm
Copy link

SVilgelm commented Jan 8, 2025

@AlexxIT could you please review this PR?

@AlexxIT
Copy link
Owner

AlexxIT commented Jan 9, 2025

It's marked as assigned, which means it's in the plans. But now I have over 100 of these markings.
https://github.com/AlexxIT/go2rtc/issues?q=is%3Aopen+assignee%3AAlexxIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants