{"_id":"@file-type/av","_rev":"4-55e691d76328108691d5ae0bcc3b3a5d","name":"@file-type/av","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@file-type/av","version":"0.1.0","author":{"url":"https://github.com/Borewit","name":"Borewit"},"license":"MIT","_id":"@file-type/av@0.1.0","maintainers":[{"name":"borewit","email":"borewit@xs4all.nl"}],"dist":{"shasum":"037480ba49cf084cb01a13a47f41546b0aacb04b","tarball":"https://registry.npmjs.org/@file-type/av/-/av-0.1.0.tgz","fileCount":5,"integrity":"sha512-1Z1rkOQ/PBJ4f+fwJPSasUlAiFnbL0Je5wBsWr3H+YrZT1s6mopfUQ6o76iRzDeMkkPTQFSbG73gMTvpKvGOvQ==","signatures":[{"sig":"MEUCIE732bCFxgInHppBwOUJUMLPVcWEQ/pDLs8TQY/g6FEPAiEA/2gTGTVQPLQvBWQZkRJBqhb2dD4DVNoQGlF1rQ8KI0c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4806},"type":"module","types":"./lib/index.d.ts","exports":"./lib/index.js","gitHead":"1860981d74e93b9bec2de40c9ebf9bf237990ce9","scripts":{"test":"mocha","build":"npm run clean && npm run compile","clean":"del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts'","compile":"tsc -p lib","lint:ts":"biome check","biome:migrate":"biome migrate --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"borewit","actor":{"name":"borewit","type":"user","email":"borewit@xs4all.nl"},"email":"borewit@xs4all.nl"},"_npmVersion":"10.9.2","description":"file-type plugin for improved audio / video type detection","directories":{},"_nodeVersion":"22.17.0","dependencies":{"music-metadata":"^11.5.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^5.2.0","mocha":"11.1.0","del-cli":"^6.0.0","file-type":"^21.0.0","typescript":"^5.8.3","@types/node":"^24.0.7","@biomejs/biome":"2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/av_0.1.0_1751298334239_0.2844438068916817","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@file-type/av","version":"0.2.0","keywords":["mime","file","type","file-type","audio","video","matroska","media","music","mka","mkv","wma","wmv","ogg","speex","spx","m4a","mp4","MPEG4","vorbis","flac","ogv","theora"],"author":{"url":"https://github.com/Borewit","name":"Borewit"},"license":"MIT","_id":"@file-type/av@0.2.0","maintainers":[{"name":"borewit","email":"borewit@xs4all.nl"}],"homepage":"https://github.com/Borewit/file-type-av#readme","bugs":{"url":"https://github.com/Borewit/file-type-av/issues"},"dist":{"shasum":"d46d684487601f794a5d3b94c0d8d735b07196d0","tarball":"https://registry.npmjs.org/@file-type/av/-/av-0.2.0.tgz","fileCount":5,"integrity":"sha512-Su7VjPaPJjYIRKMMMVBct42sy5r62n4+OflyZBxZhWLuX/6iD6WPhQG31p9sAr+Uj/2wzHfP26Lw5R/1OcUdNQ==","signatures":[{"sig":"MEQCIH3PlmAfNCQ6EYCETKVUAGm2/zfjA4zRAhUTR1j5/U2/AiAIWLqiOehK1bgXNE8L3fHuSuEL/E5oCaFhoUXJjJGNXQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7113},"type":"module","types":"./lib/index.d.ts","exports":"./lib/index.js","gitHead":"6751f279db3ac34595f1bf08c6e6530978e90d11","scripts":{"test":"mocha","build":"npm run clean && npm run compile","clean":"del-cli lib/**/*.js lib/**/*.js.map lib/**/*.d.ts src/**/*.d.ts","compile":"tsc -p lib","lint:ts":"biome check","biome:migrate":"biome migrate --write","prepublishOnly":"npm run build"},"_npmUser":{"name":"borewit","email":"borewit@xs4all.nl"},"repository":{"url":"git+https://github.com/Borewit/file-type-av.git","type":"git"},"_npmVersion":"11.4.2","description":"file-type plugin for improved audio / video type detection","directories":{},"_nodeVersion":"22.17.0","dependencies":{"music-metadata":"^11.6.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^5.2.0","mocha":"11.1.0","del-cli":"^6.0.0","file-type":"^21.0.0","typescript":"^5.8.3","@types/node":"^24.0.7","@biomejs/biome":"2.0.6"},"_npmOperationalInternal":{"tmp":"tmp/av_0.2.0_1752595004130_0.9861088884422695","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@file-type/av","version":"0.3.0","keywords":["mime","file","type","file-type","audio","video","matroska","media","music","mka","mkv","wma","wmv","ogg","speex","spx","m4a","mp4","MPEG4","vorbis","flac","ogv","theora"],"author":{"url":"https://github.com/Borewit","name":"Borewit"},"license":"MIT","_id":"@file-type/av@0.3.0","maintainers":[{"name":"borewit","email":"borewit@xs4all.nl"}],"homepage":"https://github.com/Borewit/file-type-av#readme","bugs":{"url":"https://github.com/Borewit/file-type-av/issues"},"dist":{"shasum":"cd8b68a73626beea14914f97c138ceb09f51d79f","tarball":"https://registry.npmjs.org/@file-type/av/-/av-0.3.0.tgz","fileCount":5,"integrity":"sha512-ESXVFfsyhlJIn/fKPjbnt4qioJ0Q+bdv97w4gTUQfNMj/lb66BCgENjzSSB+wHCLqjWu8/UkhuoGDZoFNIk8lg==","signatures":[{"sig":"MEYCIQDk83lEkmku2idSNB5x+RUZH09g0NzELmTgMo5BNWM5bgIhAPbz3t8R/p4zS68HrmJE2SmSicHObw1s/swXxJfEDmGK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQChhxYmxRXCiToibAFr3ahrTqF3TG2rzUZJsyGHBazlAgIgTYwBAhFl+iRmybRPNpH6zNwno/lT/bTMSfDmlhgdD1Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9024},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":"./lib/index.js","gitHead":"9d5071ba61f379f04e9dd3063dfa39f9edaf946f","scripts":{"test":"mocha","build":"npm run clean && npm run compile","clean":"del-cli lib/**/*.js lib/**/*.js.map lib/**/*.d.ts src/**/*.d.ts","compile":"tsc -p lib","lint:ts":"biome check","biome:migrate":"biome migrate --write","prepublishOnly":"npm run build","test:dependabot":"node .github/scripts/dependabot/classify.test.cjs"},"_npmUser":{"name":"borewit","email":"borewit@xs4all.nl"},"repository":{"url":"git+https://github.com/Borewit/file-type-av.git","type":"git"},"_npmVersion":"10.9.2","description":"file-type plugin for improved audio / video type detection","directories":{},"_nodeVersion":"22.14.0","dependencies":{"music-metadata":"^12.1.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.3.0","mocha":"12.0.3","del-cli":"^7.0.0","file-type":"^22.1.1","typescript":"^7.0.2","@types/node":"^26.6.4","@biomejs/biome":"2.5.15"},"_npmOperationalInternal":{"tmp":"tmp/av_0.3.0_1791542742257_0.13510088135708642","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-06-30T15:45:34.154Z","modified":"2026-10-24T11:54:30.892Z","0.1.0":"2025-06-30T15:45:34.440Z","0.2.0":"2025-07-15T15:56:44.289Z","0.3.0":"2026-10-09T10:45:42.340Z"},"bugs":{"url":"https://github.com/Borewit/file-type-av/issues"},"author":{"url":"https://github.com/Borewit","name":"Borewit"},"license":"MIT","homepage":"https://github.com/Borewit/file-type-av#readme","keywords":["mime","file","type","file-type","audio","video","matroska","media","music","mka","mkv","wma","wmv","ogg","speex","spx","m4a","mp4","MPEG4","vorbis","flac","ogv","theora"],"repository":{"url":"git+https://github.com/Borewit/file-type-av.git","type":"git"},"description":"file-type plugin for improved audio / video type detection","maintainers":[{"email":"borewit@xs4all.nl","name":"borewit"},{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"readme":"[![NPM version](https://img.shields.io/npm/v/@file-type/av.svg)](https://npmjs.org/package/@file-type/av)\n[![Node.js CI](https://github.com/Borewit/file-type-av/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/file-type-av/actions/workflows/nodejs-ci.yml)\n[![npm downloads](https://img.shields.io/npm/dm/@file-type/av.svg)](https://npmcharts.com/compare/@file-type/av?start=365)\n\n# @file-type/av\n\nA plugin for [file-type](https://github.com/sindresorhus/file-type) that detects _audio_ and _video_ file formats.\nThis plugin helps differentiate between audio and video file types more precisely.\n\n## Installation\n\nRequires Node.js 22 or newer.\n\n```bash\nnpm install @file-type/av\n```\n## Usage\n\nHere’s how to use this plugin with `file-type` to detect audio/video formats:\n\n```js\nimport { fileTypeFromFile } from 'file-type';\nimport { detectAv } from '@file-type/av';\n\nconst fileType = await fileTypeFromFile('example.mka', {\n  customDetectors: [detectAv]\n});\n\nconsole.log(JSON.stringify(fileType, null, 2));\n```\n\n---\n\n## Supported Media Formats\n\n### Matroska\n- `audio/matroska` – `.mka`\n- `video/matroska` – `.mkv`\n\n### MP4\n- `audio/mp4` – `.m4a`\n- `video/mp4` – `.mp4`\n\n### Ogg\n- `audio/ogg; codecs=opus` – `.opus` (Opus)\n- `audio/ogg; codecs=speex` – `.spx` (Speex)\n- `audio/ogg; codecs=vorbis` – `.ogg` (Vorbis)\n- `video/ogg` – `.ogv` (Theora)\n\n### WebM\n- `audio/webm` – `.webm`\n- `video/webm` – `.webm`\n\n### ASF / Windows Media\n\nThe plugin inspects all tracks, giving video precedence over audio. Windows Media\ncodecs use `.wma` or `.wmv`; other codecs retain `.asf`.\n\n- `audio/x-ms-asf` – `.wma`\n- `video/x-ms-asf` – `.wmv`\n- `audio/x-ms-asf` – `.asf` (other audio codecs)\n- `video/x-ms-asf` – `.asf` (other video codecs)\n- `application/vnd.ms-asf` – `.asf` (no audio or video tracks)\n\n---\n\n## License\n\nLicensed under the [MIT License](LICENSE.txt).\nYou are free to use, modify, and distribute this project as needed.\n","readmeFilename":"README.md"}