Nginx – configure nginx to autolaunch ffmpeg

ffmpegnginxstreamingvideo streaming

I would like ffmpeg to be autolaunched from nginx when it starts and provide a converted dash stream for the users who visit my webserver.

Right now I can go to:

http://localhost:18080/dash/twitch.mpd

but for this I have to run

ffmpeg -re -i rtmp://remotestream.com/twitch -vcodec libx264 -vprofile baseline -strict -2 -acodec aac -ar 44100 -ac 2 -f flv rtmp://localhost:1935/dash/twitch

manually.

Best Answer

Use the exec command like in this tutorial:

http://www.helping-squad.com/transcoding-your-video-with-nginx/

Related Topic