I'm trying to run a command that opens VLC player and streams RTMP video into it. But when I run it, VLC player comes up and then closes. I think this is because the shell it relies on is being killed. How can I keep the shell alive?
Running the same command from cmd
line in windows works fine. And closing the shell closes VLC player.
My code looks like this
var exec = require('child_process').exec
exec('"Z:/downloads/rtmpdump-2.4-git-010913-windows/rtmpdump.exe" -r "rtmp://199.9.251.83/app/jtv__cQlY3imWtyDf4Cr" -j "ae9d2c8bbe586ac9f88a4fae9ec5841c3976092c:{\"swfDomains\": [\"justin.tv\", \"jtvx.com\", \"xarth.com\", \"twitchtv.com\", \"twitch.tv\", \"newjtv.com\", \"jtvnw.net\", \"wdtinc.com\", \"imapweather.com\", \"facebook.com\", \"starcrafting.com\"], \"streamName\": \"jtv__cQlY3imWtyDf4Cr\", \"expiration\": 1370153205.846189, \"geo_ip\": \"91.10.111.130\", \"server\": \"video3-1\"}" --swfVfy "http://www-cdn.jtvnw.net/widgets/live_embed_player.r4b02d38f442d7cae5646f1a1c17078362f5fd857.swf?channel=games&referer=&channel=games" -v -o - | "C:/Program Files (x86)/VideoLAN/VLC/vlc.exe" - --play-and-exit')