@file-type/av
v0.2.0
Published
file-type plugin for improved audio / video type detection
Maintainers
Readme
@file-type/av
Detector plugin for file-type for audio and video files. This detector helps to distinct the difference between audio and video files.
Installation
npm install @file-type/avUsage
The following example shows how add the XML detector to file-type.
import {fileTypeFromFile} from 'file-type';
import {detectAv} from 'file-type/av';
const fileType = await fileTypeFromFile('example.mka', {customDetectors: [detectAv]});
console.log(JSON.stringify(fileType));Support media formats
- Matroska
audio/matroska,mkavideo/matroska,mkv
- MP4:
audio/mp4,m4avideo/mp4,mp4
- Ogg:
audio/ogg; codecs=opus,opus(Opus)audio/ogg; codecs=speex,spx` (Speex)audio/ogg; codecs=vorbis,ogg(Vorbisvideo/ogg,ogv(Theora)
- WebM:
video/webm,webmaudio/webm,webm
- Windows Media File:
audio/x-ms-asf,wmavideo/x-ms-asf,wmv
Licence
This project is licensed under the MIT License. Feel free to use, modify, and distribute as needed.
