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
11.73k stars 1.48k forks source link

Usage as library #533

Open ItalyPaleAle opened 3 years ago

ItalyPaleAle commented 3 years ago

Would it be possible to use this server as a library inside another Go application?

I need to build an app (written in Go) that needs to spin up and destroy these servers on-demand (on a given port). Rather than forking new processes every time (inefficient), it would be much better for me to use this as a library. Right now, it doesn't seem possible as every package is in the "internal" folder.

connormckelvey commented 3 years ago

Came here to post the same thing. Would be awesome to have at least the high-level constructs available in a public pkg directory. I'm very interested in embedding this in another go application. Programmatic config changing and reloading would be great as well.

aler9 commented 3 years ago

Hello, the server is already built on a Golang RTSP library that allows to build servers, are you sure you need to embed rtsp-simple-server instead of the library?