
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
isobmff-audio
Advanced tools
Library that wraps audio in the ISO Base Media File Format (MPEG-4 Part 12)
isobmff-audio
is a library that wraps audio into the ISO Base Media File Format (MPEG-4 Part 12) (commonly referred to as Fragmented MP4 or fmp4).
icecast-metadata-js
ISOBMFFAudioWrapper
https://github.com/eshaz/isobmff-audio/tree/master/src/ISOBMFFAudioWrapper.js
A class that takes in audio (MP3, AAC, OGG Flac, or OGG Opus) and outputs fragmented ISOBMFF.
To use ISOBMFFAudioWrapper
, create a new instance of the class by passing in the mimetype of your audio data.
Note: For directly converting from an HTTP response, use the mimetype contained in the Content-Type
header
import ISOBMFFAudioWrapper from "isobmff-audio"; const headers = myHTTPResponse.headers; const mimeType = headers.get('Content-Type'); const fmp4Wrapper = new ISOBMFFAudioWrapper(mimeType);
To wrap audio into ISOBMFF, pass in the raw audio data into the instance's .iterator()
. Iterate over this iterator using a for ...of
or for await...of
loop. Repeat this step until all audio data has been read.
const audioData = response.body; for (const fMP4 of fmp4Wrapper.iterator(audioData)) { // Do something with the wrapped data }
ISOBMFFAudioWrapper will store any partial data until a full audio frame can be appended as ISOBMFF.
Note: Any data that does not conform to the instance's mimetype will be discarded.
Once enough data has been received to form at least 4 complete audio frames, and 1022 bytes of audio data, the initial segment will be returned along with a movie fragment containing the audio data. These values are user configurable using the options
parameter in the constructor.
1st Iteration
"initial segment" --ftyp [file type] --moov [movie] "fragment" --moof [movie fragment] --mdat [audio data]
Subsequent iterations will only return movie fragments.
nth Iteration
"fragment" --moof [movie fragment] --mdat [audio data]
const wrapper = new ISOBMFFAudioWrapper("audio/mpeg", {minFramesPerFragment: 2, minBytesPerFragment: 576});
constructor
mimetype
required Format of the audio to wrap into ISOBMFF
audio/mpeg
audio/aac
, audio/aacp
audio/flac
application/ogg
, audio/ogg
application/ogg
, audio/ogg
options
optional
options.minFramesPerFragment
optional Minimum audio frames to store before returning a fragment
4
options.minBytesPerFragment
optional Minimum audio bytes to store before returning a fragment
1022
wrapper.iterator(data)
for ...of
loop to return ISOBMFFdata
Uint8Array of audio data to wrapwrapper.mimeType
audio/mp4;codecs="flac,opus
before that first page is read.audio/mp4;codecs="mp3"
audio/mp4;codecs="mp4a.40.2"
audio/mp4;codecs="flac"
audio/mp4;codecs="opus"
isobmff-audio
is used in the demo for icecast-metadata-js
to allow for Icecast metadata support in Firefox (mp3, aac, flac) and Chrome (flac) by wrapping the streaming audio in ISOBMFF so it can be used with the MediaSource API.
https://github.com/eshaz/icecast-metadata-js/tree/master/src/demo
FAQs
Library that wraps audio in the ISO Base Media File Format (MPEG-4 Part 12)
We found that isobmff-audio 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.