Skip to content

Commit

Permalink
simplify rpi / microphone instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Aug 13, 2024
1 parent 1e7a7d1 commit 5b7abf5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,19 +544,20 @@ default:CARD=U0x46d0x809
Default Audio Device
```

Find the audio card of the microfone and take note of its name, for instance `default:CARD=U0x46d0x809`. Then use GStreamer inside `runOnReady` to read the video stream, add audio and publish the new stream to another path:
Find the audio card of the microfone and take note of its name, for instance `default:CARD=U0x46d0x809`. Then create a new path take takes the video stream from the camera and audio from the microphone:

```yml
paths:
cam:
source: rpiCamera
runOnReady: >
cam_with_audio:
runOnInit: >
gst-launch-1.0
rtspclientsink name=s location=rtsp://localhost:$RTSP_PORT/cam_with_audio
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/$MTX_PATH latency=0 ! rtph264depay ! s.
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/cam latency=0 ! rtph264depay ! s.
alsasrc device=default:CARD=U0x46d0x809 ! opusenc bitrate=16000 ! s.
runOnReadyRestart: yes
cam_with_audio:
runOnInitRestart: yes
```

The resulting stream will be available in path `/cam_with_audio`.
Expand Down

0 comments on commit 5b7abf5

Please sign in to comment.