Skip to content

edaniels/gostream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3f9f10d · Feb 5, 2024
Jan 24, 2024
Jan 24, 2024
Apr 7, 2023
Oct 17, 2022
Aug 23, 2022
Jan 24, 2024
Jan 24, 2024
Nov 6, 2023
Aug 11, 2022
Nov 6, 2023
Jan 3, 2022
Jan 4, 2021
Nov 6, 2023
Nov 6, 2023
Aug 25, 2022
Nov 6, 2023
Sep 6, 2022
Aug 11, 2022
Aug 22, 2022
Feb 5, 2024
Feb 5, 2024
Sep 30, 2022
Apr 24, 2023
Feb 3, 2023
Aug 26, 2022
Jan 24, 2024
Sep 10, 2022
Jan 30, 2023
Aug 11, 2022
Oct 17, 2022
Aug 22, 2022
Aug 23, 2022
Apr 8, 2023
Feb 3, 2023
Aug 25, 2022
Apr 20, 2023
Aug 25, 2022
Aug 22, 2022

Repository files navigation

gostream

gostream is a library to simplify the streaming of images as video and audio chunks to audio to a series of WebRTC peers. The impetus for this existing was for doing simple GUI / audio/video streaming to a browser all within go with as little cgo as possible. The package will likely be refactored over time to support some more generalized use cases and as such will be in version 0 for the time being. Many parameters are hard coded and need to be configurable over time. Use at your own risk, and please file issues!

PkgGoDev Go Report Card License: MIT


TODO

  • Support multiple codecs (e.g. Firefox macos-arm does not support h264 by default yet)
  • Verify Windows Logitech StreamCam working
  • Reconnect on server restart
  • Check closes and frees
  • Address code TODOs (including context.TODO)
  • Documentation (inner func docs, package docs, example docs)
  • Version 0.1.0
  • Tests (and integrate to GitHub Actions)
  • Support removal of streams
  • Synchronize audio with video

With NixOS (Experimental)

nix-shell --pure

Examples

  • Stream current desktop: make stream-desktop
  • Stream camera: make stream-camera
  • Stream microphone: make stream-microphone
  • Stream microphone and camera: make stream-av
  • Playback microphone from browser: make playback-microphone

Notes

Building

Prerequisites

  • libvpx

Linux: libvpx-dev

macOS: brew install libvpx

  • x264

Linux: libx264-dev

macOS: brew install x264

  • opus

Linux: libopus-dev libopusfile-dev

macOS: brew install opus opusfile

Development

Linting

make lint

Testing

make test

Acknowledgements

If I somehow took code from somewhere without acknowledging it here or via the go.mod, please file an issue and let me know.