
There are two ways to change the configuration:īy editing the rtsp-simple-server.yml file, that isĪvailable in the root folder of the Docker image ( /rtsp-simple-server.yml) it can be overridden in this way: docker run -rm -it -network=host -v $PWD/rtsp-simple-server.yml:/rtsp-simple-server.yml aler9/rtsp-simple-serverīy overriding configuration parameters with environment variables, in the format RTSP_PARAMNAME, where PARAMNAME is the uppercase name of a parameter. Or FFmpeg: ffmpeg -i rtsp://localhost:8554/mystream -c copy output.mp4Īll the configuration parameters are listed and commented in the configuration file. ! application/x-rtp,media=audio ! decodebin ! audioconvert ! audioresample ! autoaudiosink ! application/x-rtp,media=video ! decodebin ! autovideosink s. Or GStreamer: gst-launch-1.0 rtspsrc location=rtsp://localhost:8554/mystream name=s s. For instance, you can open the stream with VLC: vlc rtsp://localhost:8554/mystream Or GStreamer: gst-launch-1.0 rtspclientsink name=s location=rtsp://localhost:8554/mystream filesrc location=file.mp4 ! qtdemux name=d d.video_0 ! queue ! s.sink_0 d.audio_0 ! queue ! s.sink_1 For instance, you can publish a video/audio file with FFmpeg: ffmpeg -re -stream_loop -1 -i file.ts -c copy -f rtsp rtsp://localhost:8554/mystream This issue can be avoided by disabling UDP and exposing the RTSP port: docker run -rm -it -e RTSP_PROTOCOLS=tcp -p 8554:8554 -p 1935:1935 aler9/rtsp-simple-server The -network=host flag is mandatory since Docker can change the source port of UDP packets for routing reasons, and this doesn’t allow to find out the publisher of the packets. Compatible with Linux, Windows and macOS, does not require any dependency or interpreter, it’s a single executableĭownload and extract a precompiled binary from the release page.ĭownload and launch the image: docker run -rm -it -network=host aler9/rtsp-simple-server.Reload the configuration without disconnecting existing clients (hot reloading).Run custom commands when clients connect, disconnect, read or publish streams.Redirect readers to other RTSP servers (load balancing).Serve multiple streams at once in separate paths.Each stream can have multiple video and audio tracks, encoded with any codec (including H264, H265, VP8, VP9, MPEG2, MP3, AAC, Opus, PCM, JPEG).Pull and serve streams from other RTSP / RTMP servers or cameras, always or on-demand (RTSP proxy).Publish live streams with RTSP (UDP or TCP mode) or RTMP.RTSP is a specification that describes how to perform these operations with the help of a server, that is contacted by both publishers and readers and relays the publisher’s streams to the readers. Rtsp-simple-server is a simple, ready-to-use and zero-dependency RTSP / RTMP server and proxy, a software that allows users to publish, read and proxy live video and audio streams.
