local arg_output = ngx.var.arg_output if not arg_output then ngx.say("Missing query 'output'") return end if not (arg_output:gsub("[A-Za-z0-9_.-]","")=="") then ngx.say("Invalid query 'output': '"..arg_output.."'") return end assert(io.popen("/usr/bin/ffmpeg -y -i 'rtmp://192.168.93.58:1935/live/ljosbrot live=1' -vcodec copy -acodec copy /srv/filo_web/kennslur/".. arg_output ..".mp4 /dev/null 2>/dev/null &")) ngx.say([[
]]) --[[ /dev/null 2>/var/log/ffmpeg.log &"); //$output = exec("/usr/bin/ffmpeg -y -i rtmp://157.157.65.93:443/filadelfia/stream1 -vcodec copy -acodec copy /content/kennslur/".$_REQUEST['output'].".mp4 /dev/null 2>/dev/null &1"); $output = exec("/usr/bin/ffmpeg -y -i 'rtmp://82.221.112.178:1935/live/ljosbrot live=1' -vcodec copy -acodec copy /content/kennslur/".$_REQUEST['output'].".mp4 /dev/null 2>/dev/null &1"); print_r($output); echo PHP_EOL.'OK START'; ?>
--]]