https://github.com/rmja/mjpegrelay
Mjpeg stream relay
https://github.com/rmja/mjpegrelay
mjpeg relay rtsp streaming
Last synced: 12 months ago
JSON representation
Mjpeg stream relay
- Host: GitHub
- URL: https://github.com/rmja/mjpegrelay
- Owner: rmja
- Created: 2022-01-13T22:30:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T14:31:19.000Z (almost 3 years ago)
- Last Synced: 2024-12-01T05:26:06.895Z (over 1 year ago)
- Topics: mjpeg, relay, rtsp, streaming
- Language: C#
- Homepage:
- Size: 22.5 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Motion JPEG Relay
This is yet another implementation of a mjpeg relay/forwarder/proxy.
This time in C#. It should be reasonably fast and support many clients without any issues. It consumes approximately 60mb of ram and does not use any significant cpu resources.
It makes a single connection to a camera stream (either rtsp or mjpeg),
and provides a stream endpoint which can be used for many clients without any burdon on the camera.
It has the following command line switches:
* `--source` must be either `rtsp` or `mjpeg`.
* `--rtsp:streamurl` the url of the rtsp source stream.
* `--rtsp:transport` the rtsp transport method, default is `tcp`.
* `--mjpeg:streamurl` the url of the mjpeg source stream.
An example is
```
dotnet run -- --source=rtsp --rtsp:streamurl=rtsp://camera/stream
```
This will start a server on port `5000` and the relayed stream is available at http://localhost:5000/stream.
## Docker
The program is readily available on [docker hub](https://hub.docker.com/r/rmjac/mjpeg-relay).
The same command line switches apply, for example:
```
docker run --network=host rmjac/mjpeg-relay --urls=http://+:9000 --source=rtsp --rtsp:streamurl=rtsp://some/stream
```
This will start a server on host running on port 9000 that connects to the rtsp stream and serves a relayed mjpeg stream on http://localhost:9000/stream.
## Build Instructions
```
docker build -t rmjac/mjpeg-relay -f src\MjpegRelay\Dockerfile .
docker push rmjac/mjpeg-relay
```