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

[Feature Request] API to detect if camera supports backchannel audio #998

Closed
NickM-27 opened this issue Mar 13, 2024 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@NickM-27
Copy link
Contributor

As a client showing a webrtc stream I'd like to offer a microphone button only if the camera supports backchannel audio. Currently the streams info API can work for this but only if the stream that offers backchannel audio is already active.

For example, in a case where my config is

streams:
  front_cam:
    - rtsp://user:pass@address/streaming/channels/102#backchannel=0
    - isapi://user:pass@address:80/ # two-way talk

the streams info is

 "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://192.168.50.152/streaming/channels/102/",
      "remote_addr": "192.168.50.152:554",
      "user_agent": "go2rtc/1.8.5",
      "sdp": "v=0\r\no=- 1710317105064857 1710317105064857 IN IP4 192.168.50.152\r\ns=Media Presentation\r\ne=NONE\r\nb=AS:5100\r\nt=0 0\r\na=control:rtsp://192.168.50.152/streaming/channels/102/\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\nb=AS:5000\r\na=recvonly\r\na=x-dimensions:1920,536\r\na=control:rtsp://192.168.50.152/streaming/channels/102/trackID=1\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z0IAM4qKUDwCK8v/gACAALZAAAD6AAAdTAE=,aM48gA==\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\nb=AS:50\r\na=recvonly\r\na=control:rtsp://192.168.50.152/streaming/channels/102/trackID=2\r\na=rtpmap:0 PCMU/8000\r\na=Media_header:MEDIAINFO=494D4B48010300000400000110710110401F000000FA000000000000000000000000000000000000;\r\na=appversion:1.0\r\n",
      "medias": [
        "video, recvonly, H.264 Baseline 5.1",
        "audio, recvonly, PCMU/8000"
      ],
      "receivers": [
        "0 PCMU/8000, bytes=9692480, senders=1",
        "96 H264, bytes=368629271, senders=0"
      ],
      "recv": 381906816
    },
    {
      "url": "isapi://frigate:@[email protected]:80/"
    }
  ],

so we are not able to tell if backchannel audio is supported.

It would be very helpful if there was a separate api or perhaps a query arg on the streams api that would allow the ability to get info for all producers

@AlexxIT AlexxIT added the enhancement New feature or request label Mar 14, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Mar 14, 2024

Go2rtc will run some dummy consumer for this. And run all of sources until get one with backchannel

@AlexxIT AlexxIT self-assigned this Apr 23, 2024
AlexxIT added a commit that referenced this issue May 15, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 15, 2024

Check this http://192.168.1.123:1984/api/streams?src=rtsp-dahua1&video&audio&microphone
You can add codec filters to stream info query. video/audio/microphone with codec names or without.

@AlexxIT
Copy link
Owner

AlexxIT commented May 18, 2024

@AlexxIT AlexxIT closed this as completed May 18, 2024
@AlexxIT AlexxIT added this to the v1.9.2 milestone May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants