kevinGodell / mp4frag

Parser that works with ffmpeg to read piped data and fragment mp4 into an initialization segment and media segments. It can also get the codec info and generate an fmp4 HLS m3u8 playlist.
https://kevingodell.github.io/mp4frag/
MIT License
68 stars 15 forks source link

Typo in http server example #5

Closed itsjustbrian closed 4 years ago

itsjustbrian commented 4 years ago

In the init-pool route:

app.get('/init-pool.mp4', (req, res) => {
    if (mp4frag.initialization) {
        res.writeHead(200, {'Content-Type': 'video/mp4'});
        res.end(mp4.initialization);
    } else {
        res.sendStatus(503);
    }
});

res.end(mp4.initialization); should be res.end(mp4frag.initialization);

kevinGodell commented 4 years ago

thx. fixed. let me know if anything is unclear about the lib. 72d8520