Skip to content

Add ALSA support inside docker #403

@dbuezas

Description

@dbuezas

Since I didn't manage to get the audio stream from the microphone, I made a local addon that runs this command:

ffmpeg -f alsa -ac 1 -i default -c:a libopus -ar:a 16000 -ac:a 1 -af adelay=0ms -rtsp_transport tcp -f rtsp rtsp://localhost:8554/webcam

updated: had pasted the wrong command

And I have a stream called webcam in the go2rtc config with only video. When I open it i the webrtcard, it magically picks up both video and audio. Is this the right way of doing it?
I also tried creating the final stream with both video and audio from my addon, but then I don't have where to send it to (since no stream is defined in go2rtc)

What would be the right way of doing this?


Btw, in my local addon I have these packages:

RUN  apk add --no-cache \
        alsa-plugins-pulse=1.2.7.1-r0 \
        alsa-utils=1.2.8-r0 \
        pulseaudio-utils=16.1-r6 \
        ffmpeg 

and in the config.yaml, I added:

audio: true
video: true

Maybe adding alsa and pulseaudio to the go2rtc docker container would allow for using the mic?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions