Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sa-akhavani/video-streamer
Node.js Video File Streamer
https://github.com/sa-akhavani/video-streamer
js node-video nodejs stream streamer streaming video video-streamer
Last synced: 3 months ago
JSON representation
Node.js Video File Streamer
- Host: GitHub
- URL: https://github.com/sa-akhavani/video-streamer
- Owner: sa-akhavani
- Created: 2017-12-14T08:43:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T17:06:09.000Z (5 months ago)
- Last Synced: 2024-06-27T20:24:21.837Z (5 months ago)
- Topics: js, node-video, nodejs, stream, streamer, streaming, video, video-streamer
- Language: JavaScript
- Homepage:
- Size: 3.24 MB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Video File Streamer
A Node js Video Streamer Which Uses Express Web Server And Raw HTTP Methods And Headers To Serve Videos.The `server` is responsible for streaming the video.
It contains two files.
- `app.js` launches a simple http server.
- `videoStreamer.js` is the core file that contains the API and the code that streams the video.The `client` is just a simple html page that casts the video for testing.
## Server:
### Running the server:
```bash
# Installing dependencies
npm install# Running the server
node ./server/app.js
```### Changing the default config:
Config file is located in `./server/config`
- Adding a video file to the server:
- Add the file to the `./server/video/` directory, or change the config file to use another directory for your video source.
- Change server listening port:
- Default port is `8583`. You can change it by editing the config file.## Testing the setup:
After running the server, send a `Get` Request to:
`http://localhost:/:videoName`Or just open the `./client/client.html` file in your browser
```bash
# Run the server using
node ./server/app.js# Open browser and type this in the url:
http://localhost:8583/stream/example.mp4# OR open the ./client/client.html file
```---
Written By: Seyed Ali Akhvani