if not ngx.var.arg_output then
ngx.say("Missing query 'output'")
return
end
assert(io.popen("/usr/bin/ffmpeg -y -i 'rtmp://192.168.93.59:1935/live/ljosbrot live=1' -vcodec copy -acodec copy /content/kennslur/".. ngx.var.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';
?>
--]]