{"id":20110631,"url":"https://github.com/deepch/rtsptoweb","last_synced_at":"2025-05-15T11:02:00.580Z","repository":{"id":37586543,"uuid":"285822193","full_name":"deepch/RTSPtoWeb","owner":"deepch","description":"RTSP Stream to WebBrowser","archived":false,"fork":false,"pushed_at":"2025-04-08T12:20:18.000Z","size":5155,"stargazers_count":1468,"open_issues_count":218,"forks_count":332,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-15T05:18:44.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"supportFunc.go","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-07T12:20:14.000Z","updated_at":"2025-04-13T05:16:07.000Z","dependencies_parsed_at":"2024-04-19T13:44:09.610Z","dependency_job_id":"5da8dc3d-f2ec-4cd7-b4f2-7fcd1d56b806","html_url":"https://github.com/deepch/RTSPtoWeb","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2FRTSPtoWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2FRTSPtoWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2FRTSPtoWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepch%2FRTSPtoWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepch","download_url":"https://codeload.github.com/deepch/RTSPtoWeb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010341,"owners_count":21197818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:12:49.386Z","updated_at":"2025-04-15T05:18:51.250Z","avatar_url":"https://github.com/deepch.png","language":"JavaScript","funding_links":["https://www.paypal.me/AndreySemochkin"],"categories":[],"sub_categories":[],"readme":"# RTSPtoWeb share you ip camera to world!\n\nRTSPtoWeb converts your RTSP streams to formats consumable in a web browser\nlike MSE (Media Source Extensions), WebRTC, or HLS. It's fully native Golang\nwithout the use of FFmpeg or GStreamer!\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Command-line](#command-line)\n- [API documentation](#api-documentation)\n- [Limitations](#limitations)\n- [Performance](#performance)\n- [Authors](#authors)\n- [License](#license)\n\n## Installation\n\n### Installation from source\n\n1. Download source\n   ```bash\n   $ git clone https://github.com/deepch/RTSPtoWeb\n   ```\n1. CD to Directory\n   ```bash\n    $ cd RTSPtoWeb/\n   ```\n1. Test Run\n   ```bash\n    $ GO111MODULE=on go run *.go\n   ```\n1. Open Browser\n    ```bash\n    open web browser http://127.0.0.1:8083 work chrome, safari, firefox\n    ```\n\n## Installation from docker\n\n1. Run docker container\n    ```bash\n    $ docker run --name rtsp-to-web --network host ghcr.io/deepch/rtsptoweb:latest \n    ```\n1. Open Browser\n    ```bash\n    open web browser http://127.0.0.1:8083 in chrome, safari, firefox\n    ```\n\nYou may override the \u003ca href=\"#example-configjson\"\u003econfiguration\u003c/a\u003e `/PATH_TO_CONFIG/config.json` and mount as a docker volume:\n\n```bash\n$ docker run --name rtsp-to-web \\\n    -v /PATH_TO_CONFIG/config.json:/config/config.json \\\n    --network host \\\n    ghcr.io/deepch/rtsptoweb:latest \n```\n\n## Configuration\n\n### Server settings\n\n```text\ndebug           - enable debug output\nlog_level       - log level (trace, debug, info, warning, error, fatal, or panic)\n\nhttp_demo       - serve static files\nhttp_debug      - debug http api server\nhttp_login      - http auth login\nhttp_password   - http auth password\nhttp_port       - http server port\nhttp_dir        - path to serve static files from\nice_servers     - array of servers to use for STUN/TURN\nice_username    - username to use for STUN/TURN\nice_credential  - credential to use for STUN/TURN\nwebrtc_port_min - minimum WebRTC port to use (UDP)\nwebrtc_port_max - maximum WebRTC port to use (UDP)\n\nhttps\nhttps_auto_tls\nhttps_auto_tls_name\nhttps_cert\nhttps_key\nhttps_port\n\nrtsp_port       - rtsp server port\n```\n\n### Stream settings\n\n```text\nname            - stream name\n```\n\n### Channel settings\n\n```text\nname            - channel name\nurl             - channel rtsp url\non_demand       - stream mode static (run any time) or ondemand (run only has viewers)\ndebug           - enable debug output (RTSP client)\naudio           - enable audio\nstatus          - default stream status\n```\n\n#### Authorization play video\n\n1 - enable config\n\n```text\n\"token\": {\n\"enable\": true,\n\"backend\": \"http://127.0.0.1/file.php\"\n}\n```\n\n2 - try\n\n```text\nrtsp://127.0.0.1:5541/demo/0?token=you_key\n```\n\nfile.php need response json\n\n```text\n   status: \"1\" or \"0\"\n ```\n\n#### RTSP pull modes\n\n  * **on demand** (on_demand=true) - only pull video from the source when there's a viewer\n  * **static** (on_demand=false) - pull video from the source constantly\n\n### Example config.json\n\n```json\n{\n  \"server\": {\n    \"debug\": true,\n    \"log_level\": \"info\",\n    \"http_demo\": true,\n    \"http_debug\": false,\n    \"http_login\": \"demo\",\n    \"http_password\": \"demo\",\n    \"http_port\": \":8083\",\n    \"ice_servers\": [\"stun:stun.l.google.com:19302\"],\n    \"rtsp_port\": \":5541\"\n  },\n  \"streams\": {\n    \"demo1\": {\n      \"name\": \"test video stream 1\",\n      \"channels\": {\n        \"0\": {\n          \"name\": \"ch1\",\n          \"url\": \"rtsp://admin:admin@YOU_CAMERA_IP/uri\",\n          \"on_demand\": true,\n          \"debug\": false,\n          \"audio\": true,\n          \"status\": 0\n        },\n        \"1\": {\n          \"name\": \"ch2\",\n          \"url\": \"rtsp://admin:admin@YOU_CAMERA_IP/uri\",\n          \"on_demand\": true,\n          \"debug\": false,\n          \"audio\": true,\n          \"status\": 0\n        }\n      }\n    },\n    \"demo2\": {\n      \"name\": \"test video stream 2\",\n      \"channels\": {\n        \"0\": {\n          \"name\": \"ch1\",\n          \"url\": \"rtsp://admin:admin@YOU_CAMERA_IP/uri\",\n          \"on_demand\": true,\n          \"debug\": false,\n          \"status\": 0\n        },\n        \"1\": {\n          \"name\": \"ch2\",\n          \"url\": \"rtsp://admin:admin@YOU_CAMERA_IP/uri\",\n          \"on_demand\": true,\n          \"debug\": false,\n          \"status\": 0\n        }\n      }\n    }\n  },\n  \"channel_defaults\": {\n    \"on_demand\": true\n  }\n}\n```\n\n## Command-line\n\n### Use help to show available args\n\n```bash\n./RTSPtoWeb --help\n```\n\n#### Response\n\n```bash\nUsage of ./RTSPtoWeb:\n  -config string\n        config patch (/etc/server/config.json or config.json) (default \"config.json\")\n  -debug\n        set debug mode (default true)\n```\n\n## API documentation\n\nSee the [API docs](/docs/api.md)\n\n## Limitations\n\nVideo Codecs Supported: H264 all profiles\n\nAudio Codecs Supported: no\n\n## Performance\n\n```bash\nCPU usage ≈0.2%-1% one (thread) core cpu intel core i7 per stream\n```\n\n## Authors\n\n* **Andrey Semochkin** - *Initial work video* - [deepch](https://github.com/deepch)\n* **Dmitriy Vladykin** - *Initial work web UI* - [vdalex25](https://github.com/vdalex25)\n\nSee also the list of [contributors](https://github.com/deepch/RTSPtoWeb/contributors) who participated in this project.\n\n## License\n\nThis project licensed. License - see the [LICENSE.md](LICENSE.md) file for details\n\n[webrtc](https://github.com/pion/webrtc) follows license MIT [license](https://raw.githubusercontent.com/pion/webrtc/master/LICENSE).\n\n[joy4](https://github.com/nareix/joy4) follows license MIT [license](https://raw.githubusercontent.com/nareix/joy4/master/LICENSE).\n\n## Other Example\n\nExamples of working with video on golang\n\n- [RTSPtoWeb](https://github.com/deepch/RTSPtoWeb)\n- [RTSPtoWebRTC](https://github.com/deepch/RTSPtoWebRTC)\n- [RTSPtoWSMP4f](https://github.com/deepch/RTSPtoWSMP4f)\n- [RTSPtoImage](https://github.com/deepch/RTSPtoImage)\n- [RTSPtoHLS](https://github.com/deepch/RTSPtoHLS)\n- [RTSPtoHLSLL](https://github.com/deepch/RTSPtoHLSLL)\n\n[![paypal.me/AndreySemochkin](https://ionicabizau.github.io/badges/paypal.svg)](https://www.paypal.me/AndreySemochkin) - You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepch%2Frtsptoweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepch%2Frtsptoweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepch%2Frtsptoweb/lists"}