Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Think you will find VLC, PS3/Xbox streaming servers and a whole load of others do the same thing




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: