24 lines
1.2 KiB
Lua
24 lines
1.2 KiB
Lua
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 >/dev/null 2>/dev/null &"))
|
|
ngx.say([[
|
|
<br>
|
|
<input type="button" value="Stodva upptoku" onclick="window.location='stop_recording.php';return false;">
|
|
]])
|
|
|
|
--[[
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
if(!isset($_REQUEST['output'])) { die('Missing output'); }
|
|
//$output = exec("/usr/bin/ffmpeg -y -i rtmp://157.157.65.93:443/filadelfia/stream1 -vcodec copy -acodec copy fftest15.mp4 </dev/null >/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 >/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 >/dev/null 2>/dev/null &1");
|
|
print_r($output);
|
|
echo PHP_EOL.'OK START';
|
|
?>
|
|
<br>
|
|
<input type="button" value="Stodva upptoku" onclick="window.location='stop_recording.php';return false;">
|
|
--]]
|