Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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 jsmpeg
The 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 ####
The npm package jsmpeglive receives a total of 1 weekly downloads. As such, jsmpeglive popularity was classified as not popular.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.