1.1.1 • Published 3 years ago

check-video-codec v1.1.1

Weekly downloads
12
License
MIT
Repository
github
Last release
3 years ago

check-video-codec

JavaScript library that use both mediainfo.js and mp4box for detect video codec

Example

const fs = require('fs')
const CheckMp4Codec = require('check-video-codec')

const filePath = './video/android_open_vpn.mp4' // path to video
const fileStream = fs.createReadStream(filePath)

const checkMp4Codec = new CheckMp4Codec()
// waiting when mediainfo.js will be init
checkMp4Codec.init().then( () => {
    let buf = Buffer.alloc(0)
    fileStream.on('data', async (chunk) => {
        buf = Buffer.concat([chunk])
        // get information about video codec
        const res = await checkMp4Codec.check(buf)
        if (res) {
            console.log(res)
            fileStream.destroy()
        }
    })
})
1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago