jpeg-extract

    3.0.1 • Public • Published

    jpeg-extract

    A Node module for extracting images out of jpeg/mjpeg streams

    Install

    npm i jpeg-extract
    yarn add jpeg-extract

    Usage

    const fs = require('fs')
    const extract = require('jpeg-extract')
     
    const url = 'MJPG_URL'
     
    extract(url, (err, img) => {
        if(!err)
            fs.writeFileSync('img.jpg', img)
        else
            console.error(err)
    })

    Or with promises

    const fs = require('fs')
    const extract = require('jpeg-extract')
     
    const url = 'MJPG_URL'
     
    extract(url).then(img => {
        fs.writeFileSync('img.jpg', img)
    }).catch(err => {
        console.error(err)
    })

    Install

    npm i jpeg-extract

    DownloadsWeekly Downloads

    124

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    2.59 kB

    Total Files

    5

    Last publish

    Collaborators

    • ulrichformann