Update README.md

This commit is contained in:
2020-12-20 23:37:56 -05:00
committed by GitHub
parent bd5c206ca5
commit 54319e78ea

View File

@@ -1,24 +1,65 @@
# nodejs-video-streamer
# NodeJS-Video-Streamer
A simple web video streamer built on the MEVN stack.
## Project setup
![Video Player](https://raw.githubusercontent.com/jslightham/NodeJS-Video-Streamer/master/images/Video.png)
### Features
- Automatic transcoding through Handbrake
- Video.js video player
- Video streaming from NodeJS backend
- Automatic thumbnail generation through FFmpeg
- Store video metadata in MongoDB
- Video uploader
- Video search tool
- Video comments and likes
### Installation
#### Backend
The backend code is found in the `API` directory. You will need to have NodeJS and FFmpeg installed and properly configured on your system before proceeding.
Start by installing all backend dependencies
```
npm install
```
### Compiles and hot-reloads for development
Change the DB settings to your MongoDB database in the `API/DB.js` file
```
npm run serve
module.exports = {
DB: 'mongodb://127.0.0.1:27017/videoStreamer' // Connection to DB
}
```
### Compiles and minifies for production
Run the backend server
```
node index.js
```
Or, if you want to run the backend development server instead
```
nodemon run
```
The backend will automatically run on port 8000, if you want to change this you can edit the port on line 29 of the `index.js` file.
#### Frontend
Run in the root directory of the project to install all frontend dependencies
```
npm install
```
You will now need to edit line 9 of the `main.js` file found in `src/main.js`. Set this to the IP and port of your backend server.
```
Vue.prototype.$apiIp = "http://127.0.0.1:8000"
```
Building the application for production minifies all the files, and removes unnecessary checks. To build the app run
```
npm run build
```
The generated files will be placed in the ```dst``` directory, these can be run on any static file server.
### Lints and fixes files
Or, to run the development server, you can run
```
npm run lint
npm run serve
```
###Interface
![Transcoding](https://raw.githubusercontent.com/jslightham/NodeJS-Video-Streamer/master/images/Transcoding.png)
![Home](https://raw.githubusercontent.com/jslightham/NodeJS-Video-Streamer/master/images/Home.png)
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).