
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
jsmpeglive is a MPEG1 Live Video Decoder, written in JavaScript.
It receives a live stream, via WebSocket.
It is prepared to use any other Transport method available. It just needs to follow the same interface as the included built-in WebSocketClient.
This WebSocketClient has the logic to reconnect every 5 seconds
TODO: add some logarithmic/fibonacci/exponential back-off method
Run npm install and then npm start to start the HTTP and WebSockets server.
In an other terminal, Then, to start streaming, you can use a camera that provides a RTSP feed, or your own laptop
# Laptop Web cam feed
./start_ffmpeg_stream.sh /dev/video0
or
# Camera Feed
./start_ffmpeg_stream.sh "rtsp://192.168.1.54:554/axis-media/media.amp?videocodec=h264&resolution=640x480"
To build, just run npm build
var player = new jsmpeglive(uri[, options])
The uri argument accepts a WebSocket address for streaming playback.
The options argument to jsmpeglive() supports the following properties:
benchmark whether to log benchmark results to the browser's consolecanvas the HTML Canvas element to use; jsmpeglive will create its own
Canvas element if none is providedondecodeframe a function that's called after every frame that's decoded
and rendered to the canvasThe best example is just checking the source code. Feel free to review stream-example.html.
Note that you have to include both WebSocketClient and jsmpeglive
var player = new jsmpeglive('ws://localhost:8084/', {canvas:canvas});
jsmpeglive and jsmpegThe Transport layer was removed from the main jsmpeg decoding object. Also, as I didn't need recording, it was removed, as well as all the functions for playing local video files.
You can use FFmpeg to encode videos in a suited format. Check start_ffmpeg_stream,sh, it has the parameters needed to crop the size to a multiple of 2, omit B-Frames and force a raw video stream.
It is based on the work of Dominic Szablewski's jsmpeg
jsmpeg is based on Java MPEG-1 Video Decoder and Player by Korandi Zoltan and inspired by MPEG Decoder in Java ME by Nokia.
FAQs
#### An MPEG1 Live Stream Video Decoder in JavaScript ####
We found that jsmpeglive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Security News
TypeScript 6.0 will be the last JavaScript-based major release, as the project shifts to the TypeScript 7 native toolchain with major build speedups.