3 ms·
I was playing around and did something similar with video encoding. The server code starts a running ffmpeg process, and then the handler code just looks like t
by colinmarc 15y ago
I was playing around and did something similar with video encoding. The server code starts a running ffmpeg process, and then the handler code just looks like this:
server = http.createServer(function(request, response) {
request.pipe(ffmpeg.process.stdin);
ffmpeg.process.stdout.pipe(response);
});
What a nice interface! The end result is that you can do weird stuff like:
$ curl -T my_video.mp4 http://localhost:9599 | mplayer
- timc3 15y agoThink you will find VLC, PS3/Xbox streaming servers and a whole load of others do the same thing