Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noblesamurai/mpeg4-mimetype
Get the RFC 6381 mimetype string for mediasource usage
https://github.com/noblesamurai/mpeg4-mimetype
Last synced: about 1 month ago
JSON representation
Get the RFC 6381 mimetype string for mediasource usage
- Host: GitHub
- URL: https://github.com/noblesamurai/mpeg4-mimetype
- Owner: noblesamurai
- Created: 2018-09-18T03:45:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T03:52:44.000Z (over 3 years ago)
- Last Synced: 2023-03-11T05:29:48.100Z (almost 2 years ago)
- Language: JavaScript
- Size: 1.13 MB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mpeg4-mimetype
Get the RFC 6381 mimetype string for mediasource usage## Prerequisites
```
$ pip install pre-commit
```## Installation
```
$ pre-commit install --install-hooks
$ npm run build
```## Usage
### Naive single buffer
``` bash
$ node test /Users/eugene/Downloads/rendering-artefacts.mp4
video/mp4; codecs="mp4a.40.2,avc1.4d0028"; profiles="isom,iso2,avc1,mp41"
is fragmented: false
track #0 codec string: mp4a.40.2
track #1 codec string: avc1.4d0028
video/mp4; codecs="mp4a.40.2, avc1.4d0028"$ node test /Users/eugene/Downloads/GMT20180912-000144_Daily-Hang_1600x800.mp4
video/mp4; codecs="mp4a.40.2,avc1.64001f,text"; profiles="isom,mp42"
is fragmented: false
track #0 codec string: mp4a.40.2
track #1 codec string: avc1.64001f
track #2 codec string: text
video/mp4; codecs="mp4a.40.2, avc1.64001f, text"
```### Chunked
``` bash
$ node test-chunk.js /Users/eugene/Downloads/rendering-artefacts.mp4
video/mp4; codecs="mp4a.40.2,avc1.4d0028"; profiles="isom,iso2,avc1,mp41"
is fragmented: false
track #0 codec string: mp4a.40.2
track #1 codec string: avc1.4d0028
video/mp4; codecs="mp4a.40.2, avc1.4d0028"$ node test-chunk /Users/eugene/Downloads/GMT20180912-000144_Daily-Hang_1600x800.mp4
video/mp4; codecs="mp4a.40.2,avc1.64001f,text"; profiles="isom,mp42"
is fragmented: false
track #0 codec string: mp4a.40.2
track #1 codec string: avc1.64001f
track #2 codec string: text
video/mp4; codecs="mp4a.40.2, avc1.64001f, text"
```## Notes
The version of mp4box that's in npm is out of date. I downloaded and built the
[latest version](https://github.com/gpac/mp4box.js) and built it using grunt.The file just uses the `./mp4box.js/dist/mp4box.all.js` file in the build.