Background to this problem:
I am using FFmpeg to convert videos – it is working fine. I am sending the FFmpeg requests to the command line using exec() in PHP. I am also using node.js and socket.io to deliver real time updates to my users- this is also working fine. I would like to be able to send a real time alert when the video has completed its conversion.
My question is:
How do I send a request from the command line to my node server. Can I run a JS file from the command line? If not what is the best way round it?
Thank you for your advice,
I would go for curl. Trigger node with curl.
curl localhost:3000/encodingCompleted?user=abc&[email protected]
And now node knows “completed” and can send a realtime update back to the user.