{"id":19955402,"url":"https://github.com/homebackend/gowebrtc","last_synced_at":"2026-04-15T14:40:01.348Z","repository":{"id":250047507,"uuid":"833316962","full_name":"homebackend/gowebrtc","owner":"homebackend","description":"Setup Webrtc for video and audio streaming from local media devices","archived":false,"fork":false,"pushed_at":"2024-09-06T20:26:25.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-12T06:48:00.848Z","etag":null,"topics":["golang","raspberry-pi","service","webrtc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/homebackend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T19:43:10.000Z","updated_at":"2024-09-07T05:40:35.000Z","dependencies_parsed_at":"2024-08-13T07:53:50.068Z","dependency_job_id":"b05b58af-018a-4c0e-86cf-46f9a668f009","html_url":"https://github.com/homebackend/gowebrtc","commit_stats":null,"previous_names":["homebackend/gowebrtc"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homebackend%2Fgowebrtc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homebackend%2Fgowebrtc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homebackend%2Fgowebrtc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/homebackend%2Fgowebrtc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/homebackend","download_url":"https://codeload.github.com/homebackend/gowebrtc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241383932,"owners_count":19954244,"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":["golang","raspberry-pi","service","webrtc"],"created_at":"2024-11-13T01:27:15.874Z","updated_at":"2025-11-25T14:03:09.536Z","avatar_url":"https://github.com/homebackend.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n# gowebrtc\nSetup Webrtc for video and audio streaming from local media devices\n\n# Build and Install\n# Prerequisites\n\nInstall the following packages: **libgstreamer1.0-dev**, **libgstreamer-plugins-base1.0-dev**, **libunwind-dev**.\n\nDownload latest go lang from the following [link](https://go.dev/dl/). Specifically for Raspbian OS download: go1.22.5.linux-arm64.tar.gz.\n\n# Build\n\nTo build the code execute command `make build`. This will build executable: `bin/gowebrtc`. Executing command `./bin/gowebrtc` will print the command line usage instructions.\n\n# Installation\n\nTo build deb installer package (which can be installed on Debian, Ubuntu, Raspbian OS among others) execute the command `make debian`. The package gets built in the directory `build/debian/gowebrtc.deb`.\n\nTo install the above package using **sudo** execute the command `make debian-install`.\n\n# Configuring\n\nThe default configuration file resides in `/etc/gowebrtc/config.yaml`. \n\n## General configuration option\n\n| Option | Type | Default | Required | Description |\n| -- | -- | -- | -- | -- |\n| image_width | number | 640 | No | Specifies the video width |\n| image_height | number | 480 | No | Specifies the video height |\n| framerate | number | 30 | No | Specifies the fps value |\n| log_file | string | none | No | Log file location. Needs to be writable |\n| audio_device | string | | Yes | Gstream pipeline to be used for audio stream |\n| video_device | string | | Yes | Gstream pipeline to be used for video stream |\n\n## Signalling configuration\nEither REST HTTP API or websockets can be used for exchanging SDP and Candidates.\n\n| Option | Type | Default | Required | Description |\n| -- | -- | -- | -- | -- |\n| port | number | 8080 | No | Port to be used for running signalling service. |\n| url | string | /stream | No | Url path to be used by signalling service. |\n| signalling | string | websocket | No | The value can be one of http or websocket. |\n| signalling_uses_tls | bool | false | No | If you want to run signalling server in TLS mode. Currently only websocket supports this. |\n| signalling_tls_cert | string | | No | Server certificate |\n| signalling_tls_key | string | | No | Server certificate key |\n\n### Websocket specific configuration options\n\n| Option | Type | Default | Required | Description |\n| -- | -- | -- | -- | -- |\n| signalling_origin | string | | No | If provided allows requests from specific origin. Requests from other origina are denied. |\n| SignallingCredentials | array | | No | Array of credentials. Any of the given credentials must be provided. If no credentials is specified in configuration file, credential are not required. |\n\n#### Specifying credentials\n\n| Option | Type | Default | Required | Description |\n| -- | -- | -- | -- | -- |\n| user | string | | Yes | Credential user name |\n| password | string | | Yes | Credential user password |\n\n## Turn server configuration\nWebrtc requires turn servers to function in some scenarios. Gowebrtc service has internal turn server. Also it supports using Open Relay and other turn servers.\n\n| Option | Type | Default | Required | Description |\n| -- | -- | -- | -- | -- |\n| use_internal_turn | bool | false | No | Use internal turn server of external turn server |\n\n### Internal turn server options\n\nFollowing is sample configuration portion for internal turn server configuration:\n\n```yaml\nuse_internal_turn: true\nturn_configuration:\n  public_ip: \u003cpublic-ip\u003e\n  port: \u003cturn-port\u003e\n  users:\n    - user: \u003cturn-user\u003e\n      password: \u003cturn-password\u003e\n```\n\n### Open Relay turn server options\n\nIf **open_relay_config** attribute is defined, Open relay will be used as turn server.\n\n```yaml\nopen_relay_config:\n  app_name: \u003capp-name\u003e\n  api_key: \u003capi-key\u003e\n```\n\n### Other turn servers\n\nUsing **ice_servers** any other ice server(s) can be used.\n\n```yaml\nice_servers:\n  - urls:\n    - \"stun:\u003cserver\u003e\"\n  - urls:\n    - \"turn:\u003cserver\u003e:80\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turn:\u003cserver\u003e:80?transport=tcp\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turn:\u003cserver\u003e:443\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turns:\u003cserver\u003e:443?transport=tcp\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n```\n\n## Samples\n### Running the service with internal turn server\nIf you have public and IP and would like to host your own turn server, the following configuration can be used:\n\n```yaml\nport: 8080\nurl: /ws\nimage_width: 640\nimage_height: 480\nframerate: 30\nlog_file: /var/log/gowebrtc.log\naudio_device: alsasrc device=plughw:CARD=I930,DEV=0\nvideo_device: autovideosrc\nuse_internal_turn: true\nsignalling: websocket\nturn_configuration:\n  public_ip: \u003cpublic-ip\u003e\n  port: \u003cturn-port\u003e\n  users:\n    - user: \u003cturn-user\u003e\n      password: \u003cturn-password\u003e\n```\n\n### Runnig the service with external turn server\nExternal turn server configuration is specified by providing relevant information in the config file. Relevant section is as follows:\n\n```yaml\nport: 8080\nurl: /stream\nimage_width: 640\nimage_height: 480\nframerate: 30\nlog_file: /var/log/gowebrtc.log\naudio_device: alsasrc device=plughw:CARD=I930,DEV=0\nvideo_device: autovideosrc\nsignalling: http\nopen_relay_config:\n  app_name: \u003capp-name\u003e\n  api_key: \u003capi-key\u003e\nice_servers:\n  - urls:\n    - \"stun:stun.relay.metered.ca:80\"\n  - urls:\n    - \"turn:global.relay.metered.ca:80\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turn:global.relay.metered.ca:80?transport=tcp\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turn:global.relay.metered.ca:443\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n  - urls:\n    - \"turns:global.relay.metered.ca:443?transport=tcp\"\n    username: \u003cusername\u003e\n    credential: \u003cpassword\u003e\n```\n\n# Running and Enabling Service\n`sudo systemctl start gowebrtc` will start the service.\n`sudo systemctl enable gowebrtc` will configure service startup on each reboot.\n\n# APIS\n\n| URL | Method | Payload | Description | Response | Error Response |\n| -- | -- | -- | -- | -- | -- |\n| /stream | POST | `{\"sdp\": \"localSessionDescription\"}` | This API call initiates SDP exchange more generally known as Signalling. In response the API returns the Remote SDP. In case of error error message is returned with status code as 500. | `{\"sdp\": \"remoteSessionDescription\"}` | `{\"error\": \"error message\"}` |\n| /stream | DELETE | `none` | This API call terminates any existing streaming session. | `none` | `{\"error\": \"error message\"}` |\n\nRemember at any given time only one webrtc streaming is possible. An attempt to initiate another streaming will result in an error.\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/homebackend/gowebrtc.svg?style=for-the-badge\n[contributors-url]: https://github.com/homebackend/gowebrtc/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/homebackend/gowebrtc.svg?style=for-the-badge\n[forks-url]: https://github.com/homebackend/gowebrtc/network/members\n[stars-shield]: https://img.shields.io/github/stars/homebackend/gowebrtc.svg?style=for-the-badge\n[stars-url]: https://github.com/homebackend/gowebrtc/stargazers\n[issues-shield]: https://img.shields.io/github/issues/homebackend/gowebrtc.svg?style=for-the-badge\n[issues-url]: https://github.com/homebackend/gowebrtc/issues\n[license-shield]: https://img.shields.io/github/license/homebackend/gowebrtc.svg?style=for-the-badge\n[license-url]: https://github.com/homebackend/gowebrtc/blob/master/LICENSE\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/neeraj-jakhar-39686212b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomebackend%2Fgowebrtc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomebackend%2Fgowebrtc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomebackend%2Fgowebrtc/lists"}