mediamtx icon indicating copy to clipboard operation
mediamtx copied to clipboard

Allow a publisher to reconnect without disconnecting readers

Open aler9 opened this issue 1 year ago • 11 comments

Describe the feature

When a publisher has not connected yet or has disconnected, a blank stream or a fallback stream should be shown to readers. As soon as the publisher reconnects, its stream is routed to readers again.

The original stream, the fallback stream and the blank screen screen must have the same number of tracks and the same codecs, therefore this feature requires some kind of configuration:

paths:
  mypath:
    alwaysAvailable: yes
    alwaysAvailableTracks:
    - codec: h264
    - codec: opus

All streams (main one and fallback) are checked for codecs before being activated.

aler9 avatar Aug 16 '23 19:08 aler9

This feature could be very useful to me. Is its implementation in progress? At the moment, with the latest release (builded from main branch code), i get alwaysAvailable field not existing. Thank you.

rnuck2 avatar Aug 23 '23 09:08 rnuck2

This feature seems very useful!

sz55net avatar Oct 22 '23 05:10 sz55net

It would also be good if there is an option to wait until a timeout is reached to check if the publisher reconnects and continue sending frame. Currently all the readers are disconnected immediately.

mrasvialpha avatar Nov 13 '23 12:11 mrasvialpha

any news on this feature?

efraimjer avatar Dec 19 '23 17:12 efraimjer

Also curious if there are any plans to make it happen anytime soon :)

xaionaro avatar Jan 20 '24 01:01 xaionaro

Are there any updates regarding this feature?

JoLoZ avatar Apr 25 '24 20:04 JoLoZ

If I understand this correct, this would give the user the ability to have a stream and insert a "No Video.' or "No Input Available" type message into the stream itself?

winkmichael avatar May 17 '24 23:05 winkmichael

If I understand this correct, this would give the user the ability to have a stream and insert a "No Video.' or "No Input Available" type message into the stream itself?

Yes

sz55net avatar Jun 03 '24 15:06 sz55net

This would be an incredibly good feature, currently the only thing I need to get my gold standard home RTSP server

epunter avatar Jun 21 '24 13:06 epunter

I would like to implement this feature, because I am looking for a way how to acheive exactly this behavior for RTMP ingest. While my research I found out that liquidsoap has already something experimental like this issue and there is a way how to acheive it with gstreamer in rust.

@aler9 is there any idea / hints from your side how to implement this freatue? Some information that would be beneficial for me to know before I fork this repository and start tinkering with possible solutions? Thanks.

m1k1o avatar Jun 26 '24 21:06 m1k1o