Skip to content

Issues with simple (?) setup for WebRTC stream with backchannel #1975

@adriancable

Description

@adriancable

Hi @AlexxIT - I am sure I am doing something wrong here but what should be a simple setup has got me bewildered and I wonder if you can help.

Hardware: an RTSP camera which produces H264 video, AAC audio, PCMU backchannel (let's say rtsp://1.2.3.4/stream). I need to have only a single connection to the camera's RTSP endpoint.

What I want from go2rtc:

  • A WebRTC stream which copies video & backchannel, and transcodes audio to Opus.

If I do something like:

streams:
  camera:rtsp://1.2.3.4/stream

Then WebRTC video and backchannel works, but audio doesn't - fair enough since there's no transcoding to Opus. So now if I try:

streams:
  camera:ffmpeg:rtsp://1.2.3.4/stream#video=copy#audio=opus#backchannel=1

Then WebRTC video and audio work, but backchannel doesn't work (WebRTC track is absent). So now if I try:

streams:
  camera:
    - ffmpeg:rtsp://1.2.3.4/stream#video=copy#audio=opus
    - rtsp://1.2.3.4/stream

Then now everything "works" (WebRTC video & audio & backchannel) but I end up with two RTSP connections to the camera.

Also tried this, but this also gives WebRTC video & audio, but no working backchannel:

streams:
  base_stream:rtsp://1.2.3.4/stream
  camera:
    - ffmpeg:rtsp://1.2.3.4/stream#video=copy#audio=opus
    - streams:base_stream

So the question is: how do I get a WebRTC stream with video copied, backchannel copied and audio transcoded to Opus (i.e. so it's WebRTC compatible) without go2rtc making two RTSP connections to the camera?

Thank you so much!

-Adrian

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions