Last active
August 29, 2015 13:57
-
-
Save tieleman/9629190 to your computer and use it in GitHub Desktop.
PoC NodeJS script which reads an input MPEG-TS and pipes it to stdout in a loop to be transcoded/segmented by ffmpeg.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
function processStream() { | |
var readStream = fs.createReadStream('../../counter_0_120.ts'); | |
readStream.on('open', function () { | |
readStream.pipe(process.stdout, { end: false }); | |
}); | |
readStream.on('end', function() { | |
processStream(); | |
}) | |
} | |
processStream(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment