AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
6.71k stars 484 forks source link

Discard audio track from source RTSP #198

Closed felipecrs closed 1 year ago

felipecrs commented 1 year ago

I have some cameras which are actually CFTV and I take their stream from my Hikvision DVR. They don't have any microphone, but my DVR's RTSP output adds a blank PCMU audio track.

I'd like to discard them with something like #audio=0 (similar to backchannel=0):

my_cam: "rtsp://admin:123@192.168.1.12:554/Streaming/Channels/601#audio=0"

But instead I have to:

my_cam: "ffmpeg:rtsp://admin:123@192.168.1.12:554/Streaming/Channels/601#video=copy"

Which probably takes unnecessary CPU cycles as it has to spawn a ffmpeg process.

AlexxIT commented 1 year ago

Supported in master:

streams:
  camera-video: rtsp://admin:123@192.168.1.12:554/Streaming/Channels/601#media=video
  camera-audio: rtsp://admin:123@192.168.1.12:554/Streaming/Channels/601#media=audio
felipecrs commented 1 year ago

That's awesome!

AlexxIT commented 1 year ago

https://github.com/AlexxIT/go2rtc/releases/tag/v1.7.0