bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
10.71k stars 1.4k forks source link

Add GET/POST/DELETE Record on demand API #3293

Closed yelodevopsi closed 2 months ago

yelodevopsi commented 2 months ago

Describe the feature

First off - fantastic work @aler9 and all contributing developers . This is a really wonderpiece of a media-stack ๐Ÿ‘

I see that the record to disk on apparently all active streams are the only way to activate recording, and is great for surveillance.

However we have a bit different need:

image

Its important that it don't interfere with the global settings ofc.

I'm thinking of extending the current Recordings API with a POST and PUT

Needed configs for mediamtx.yml

# This is the max time if /start is triggered but not /stop
recordTriggeredMaxDuration: 1h

If this is currently not in progress, could anyone direct me to where the triggering of recording is being done in the code, so I maybe have time create a PR in the future? ๐Ÿ™

eravellaSC commented 2 months ago

Isn't this already possible by changing the single path configuration, setting record to true / false?

yelodevopsi commented 2 months ago

Isn't this already possible by changing the single path configuration, setting record to true / false?

I was just going to test/suggest this myself ๐Ÿ™ƒ i use runOnDemand param with a gstreamer pipeline attached.

Should the runOnDemandRestart param be set to yes/no if this record changes?

yelodevopsi commented 2 months ago

This is fantastic ๐Ÿ˜… Works as intended. Thanks.

Closing this <3