Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdilshan/simple-mjpeg-decoder-js
A simple MJPEG decoder created with vanilla javascript
https://github.com/mdilshan/simple-mjpeg-decoder-js
javascript javascript-generators mjpeg-decoder mjpeg-stream streaming teaching-materials
Last synced: 3 days ago
JSON representation
A simple MJPEG decoder created with vanilla javascript
- Host: GitHub
- URL: https://github.com/mdilshan/simple-mjpeg-decoder-js
- Owner: mdilshan
- License: mit
- Created: 2023-09-03T11:03:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-03T11:05:34.000Z (about 1 year ago)
- Last Synced: 2023-09-04T14:05:15.571Z (about 1 year ago)
- Topics: javascript, javascript-generators, mjpeg-decoder, mjpeg-stream, streaming, teaching-materials
- Language: JavaScript
- Homepage:
- Size: 91.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
### A Simple MJPEG decoder created with vanilla javascript.
> Note: This decoder is created to teach javascript to beginers so it might not production ready and may have performance issues.
#### Content
- `/server` contains a express server which serve mjpeg stream.
- `/server/media30fps` contains frames from a sample video. I used ffmpeg to generate the frames from a mp4 video.You can also generate frames using,
```ffmpeg -i input.mp4 -vf "fps=10" -q:v 1 output_%04d.jpg```
You can get the fps of the video using,
```ffprobe -select_streams v:0 -show_entries stream=r_frame_rate sample.mp4```
#### Run the project
To start the project, run the `server/server.js` file using node,
```node server/server.js```
Then start the client side code using `live-server` or using any other development server.