go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Inbound audio as ffmpeg stream

Open oischinger opened this issue 3 years ago • 7 comments

I'm trying to implement 2-way audio for Eufy's Doorbells which support only P2P. For that I would need to route the webrtc audio stream to an ffmpeg process that trancodes the audio and sends it to a tcp socket.

Is something like that possible with go2rtx?

oischinger avatar Aug 31 '22 16:08 oischinger

Well. First. How do you plan to get video and audio from P2P?

AlexxIT avatar Aug 31 '22 16:08 AlexxIT

I have a little process that provides audio and Video from the camera via 2 socket inputs which I defined in the go2rtc yaml. Works like charm

oischinger avatar Aug 31 '22 16:08 oischinger

Do you have open example, how do you do it?

AlexxIT avatar Aug 31 '22 16:08 AlexxIT

This is the project:

It's an HA addon based on your docker Container plus a python process to deal with the eufy camera via a websocket: https://github.com/oischinger/eufyp2pstream

oischinger avatar Aug 31 '22 16:08 oischinger

Well. WebRTC > go2rtc > ffmpeg > python > nodejs. Very complicated. Needs time to understand all of this :)

AlexxIT avatar Aug 31 '22 17:08 AlexxIT

Yes, the stack is a bit crazy. The stack needs some work ;) So far this is just a proof of concept. A/V worked fine. But I'm not sure if a backchannel is possible the way I think about it. Since my SDP from ffmpeg doesn't include the backchannel information I wonder if it's possible to establish a stream for it at all

oischinger avatar Aug 31 '22 17:08 oischinger

I thinks audio back to ffmpeg is possible. But not a priority in near future. Have other nice things to do.

AlexxIT avatar Aug 31 '22 18:08 AlexxIT

Exec source now support backchannel https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.0

AlexxIT avatar May 28 '24 14:05 AlexxIT