Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brianlesko/http-and-hls


https://github.com/brianlesko/http-and-hls

Last synced: about 20 hours ago
JSON representation

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.0

b. local only, on your device
- set the IP in start.sh to 127.0.0.1

2. 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.

 


 

╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯

 

X Logo             GitHub             LinkedIn

follow all of these for pizza :)