go2rtc
go2rtc copied to clipboard
reuse stream in exec source
Hi, not really an issue sorry, but I'm trying to have a mosaic of my security cameras using xstack.
To keep the network traffic low, i would like to resume an existing stream. Is it possible to reference an existing stream in an "exec" source?
Something like that
streams:
sonoff_camera: rtsp://rtsp:[email protected]/av_stream/ch0
dahua_camera:
- rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
- rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=1
amcrest_doorbell:
- rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
mosaic: exec:ffmpeg -i sonoff_camera -i dahua_camera -vcodec libx264 -tune zerolatency -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]hstack=inputs=2" -f rtsp {output}
Don't use sonoff_camera. Use rtsp://localhost:8554/sonoff_camera.
@AlexxIT Sorry for bumping this issue, but could you elaborate on why you suggested that? Is it because this is being used as Incoming Source? I see in the docs that those don't get closed, but not sure if that's what/why you're suggesting.
For ffmpeg, a setting of this kind means nothing: ffmpeg -i sonoff_camera -i dahua_camera ...