Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ludovicm67/mp4-tools

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ludovicm67/mp4-tools

MP4 tools

  • 0.2.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

MP4 tools

Install this library

npm install @ludovicm67/mp4-tools

The following is exposed:

  • Buffer: Buffer that works on both Node.js and browsers
  • utils.blobToArrayBuffer: a function to convert a Blob to an ArrayBuffer
  • fix: the function to use to fix a chunk by using the previous one

MP4 structure

MP4 files are structured into several different box types, each serving a specific purpose:

  • ftyp (File Type Box): The first box in the file, declaring file type, compatibility, and specifications.
  • moov (Movie Box): Contains all metadata about the video, like tracks, duration, etc. It includes sub-boxes:
    • mvhd (Movie Header Box): Global information about the movie.
    • trak (Track Box): A container for a single track (audio, video, etc.), with sub-boxes like tkhd (Track Header) and mdia (Media).
  • moof (Movie Fragment Box): Contains all metadata about a single fragment of the movie, with sub-boxes like mfhd (Movie Fragment Header) and traf (Track Fragment).
  • mdat (Media Data Box): Contains the actual media data, such as video frames and audio samples.

Command line tool

The cli folder contains a command line tool that can be used to fix or merge chunks.

Have a look at the README of the CLI for more information.

FAQs

Package last updated on 09 Feb 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc