Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thinkski/berrymse
BerryMSE: Simple low-latency live video streaming from a Raspberry Pi via Media Source Extensions
https://github.com/thinkski/berrymse
h264 low-latency media-source-extensions mse raspberry-pi realtime streaming video
Last synced: 2 months ago
JSON representation
BerryMSE: Simple low-latency live video streaming from a Raspberry Pi via Media Source Extensions
- Host: GitHub
- URL: https://github.com/thinkski/berrymse
- Owner: thinkski
- License: agpl-3.0
- Created: 2020-03-16T10:14:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-10T08:14:59.000Z (over 4 years ago)
- Last Synced: 2023-03-23T03:16:35.166Z (almost 2 years ago)
- Topics: h264, low-latency, media-source-extensions, mse, raspberry-pi, realtime, streaming, video
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🍓 BerryMSE
Simple low-latency live video streaming from a Raspberry Pi™ via the [Media Source Extensions API](//developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API).
Note: As of March 2020, Safari on iOS devices still does not support this API (excluding iOS 13 on iPad devices, which do support the API).
## Overview
H.264 Network Abstraction Layer (NAL) units are read from `/dev/video0`, a
Video4Linux2 compatible camera interface. Each unit corresponds to one frame.
Frames are packaged into MPEG-4 ISO BMFF (ISO/IEC 14496-12) compliant
fragments and sent via a websocket to the browser client. The client appends
each received buffer to the media source for playback.## Quickstart
This demo requires a Raspberry Pi with Camera Module (USB Video Class devices
not currently supported). As it uses the Video4Linux2 interface to access the
camera, the Broadcom v4l2 driver must be installed and the camera must be
enabled in `/boot/config.txt`.To fetch dependencies:
GOOS=linux go get -v ./...
go get github.com/markbates/pkger/cmd/pkgerTo build:
make
To run, copy the appropriate `berrymse` executable to the Raspberry Pi and run:
./berrymse -l :2020
For example:
./berrymse -l 192.168.2.1:2020
The Raspberry Pi Zero uses the `armv6l/berrymse` executable. Other models use
the `armv7l/berrymse` executable.The webpage will show a live video stream with approximately 200ms of latency.
The browser will buffer frames, providing a lookback window.