Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianlesko/http-and-hls
https://github.com/brianlesko/http-and-hls
Last synced: about 20 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/brianlesko/http-and-hls
- Owner: BrianLesko
- Created: 2024-05-17T19:13:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-06T14:55:00.000Z (4 months ago)
- Last Synced: 2024-07-06T16:04:14.500Z (4 months ago)
- Language: HTML
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# HLS stream from http stream
Stream a camera and its sliding window history. This method has around 10 seconds of latency
access via 127.0.0.1 or CORS policy prevents access
## Dependencies
This code uses the following libraries:
- `ffmpeg`: for handling the live stream to video chunking HLS protocol
- `hls.js`: for serving the index.m3u8 file using html 5
- `opencv`: for the video capture device
## Setup
1. create a python virtual environment using venv, activate it, make sure the python requirements are downloaded
```
python3 -m venv my_env
source my_env/bin/activate
pip install -r requirements.txt
```2. install the javascript dependency with
```
npm install
```## Usage
1. Pick the scope of where you'll serve the video.a. local network. You want your video accessible my the local area network (wifi or wired).
- set the IP in start.sh to 0.0.0.0b. local only, on your device
- set the IP in start.sh to 127.0.0.12. run start.sh
```
./start.sh
```
## About
HLS streaming was introduced by Apple and since its creation has been one of the most popular ways to stream video. It allows adaptive quality and low latency. The setup here is more cumbersome than a simple http live server, but allows viewing the history of the stream and allows the client to buffer content. Written by Brian Lesko for learning purposes. For other software projects related to robotics engineering, mechanical engineering, and software engineering see my other repositories. Currently working as a robotics engineer - 2024.
╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯
follow all of these for pizza :)