update
This commit is contained in:
parent
cdb661eb23
commit
1bfb3e6d4c
|
|
@ -9,7 +9,7 @@ https://github.com/shreebhattji/Urmi/blob/main/licence.md
|
|||
*/
|
||||
|
||||
exec("sudo chmod 444 /sys/class/dmi/id/product_uuid");
|
||||
$version = "11.20";
|
||||
$version = "11.21";
|
||||
|
||||
function fail(string $msg): never
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" id="common_backend_data_rate" name="common_backend_data_rate" placeholder="5M" value="<?php echo htmlspecialchars($data['common_backend']['data_rate']); ?>">
|
||||
<input type="text" id="common_backend_data_rate" name="common_backend_data_rate" placeholder="in kbps" value="<?php echo htmlspecialchars($data['common_backend']['data_rate']); ?>">
|
||||
<label for="common_backend_data_rate">Data Rate :</label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
|
|
|
|||
|
|
@ -384,17 +384,17 @@ function update_service($which_service)
|
|||
case "copy_input":
|
||||
switch ($input_source) {
|
||||
case "hdmi":
|
||||
$input .= "ffmpeg -hide_banner -init_hw_device qsv=hw -filter_hw_device hw -fflags +genpts -use_wallclock_as_timestamps 1 -f v4l2 -thread_queue_size 512 -input_format yuyv422 "
|
||||
$input .= "ffmpeg -hide_banner -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -hwaccel_output_format qsv -c:v mjpeg_qsv -fflags +genpts -use_wallclock_as_timestamps 1 -f v4l2 -thread_queue_size 512 -input_format mjpeg "
|
||||
. " -video_size " . $data['hdmi']['resolution']
|
||||
. " -framerate " . $data['hdmi']['framerate']
|
||||
. " -i /dev/video0"
|
||||
. " -f alsa -thread_queue_size 1024 -i " . $data['hdmi']['audio_source']
|
||||
. " -f alsa -thread_queue_size 2048 -i " . $data['hdmi']['audio_source']
|
||||
. " -c:v h264_qsv -profile:v high -level:v 4.2 -b:v 6M -maxrate 6M -bufsize 12M "
|
||||
. " -c:a aac -b:a 265k -ar 48000 -muxrate 0 -pat_period 0.1 -pkt_size 1316 ";
|
||||
if ($hdmi_delay_video != "")
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64,scale_qsv=' . $common_backend_resolution . ',' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full,scale_qsv=' . $common_backend_resolution . ',' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
else
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64,scale_qsv=' . $common_backend_resolution . '"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full,scale_qsv=' . $common_backend_resolution . '"';
|
||||
if ($hdmi_delay_audio != "")
|
||||
$input .= adelayFromMs($hdmi_delay_audio, 2);
|
||||
|
||||
|
|
@ -417,20 +417,20 @@ function update_service($which_service)
|
|||
case "use_common_backend":
|
||||
switch ($input_source) {
|
||||
case "hdmi":
|
||||
$input .= "ffmpeg -hide_banner -init_hw_device qsv=hw -filter_hw_device hw -fflags +genpts -use_wallclock_as_timestamps 1 -f v4l2 -thread_queue_size 512 -input_format yuyv422 -video_size "
|
||||
. $data['hdmi']['resolution']
|
||||
. " -framerate " . $data['hdmi']['framerate'] . " -i /dev/video0 -f alsa -thread_queue_size 512 -i " . $data['hdmi']['audio_source'];
|
||||
$input .= "ffmpeg -hide_banner -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -hwaccel_output_format qsv -c:v mjpeg_qsv -fflags +genpts -use_wallclock_as_timestamps 1 -f v4l2 -thread_queue_size 512 -input_format mjpeg "
|
||||
. " -video_size ". $data['hdmi']['resolution']
|
||||
. " -framerate " . $data['hdmi']['framerate'] . " -i /dev/video0 -f alsa -thread_queue_size 2048 -i " . $data['hdmi']['audio_source'];
|
||||
|
||||
if ($data['hdmi']['resolution'] == $data['common_backend']['resolution']) {
|
||||
if ($hdmi_delay_video != "")
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64,' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full,' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
else
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full"';
|
||||
} else {
|
||||
if ($hdmi_delay_video != "")
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64,scale_qsv=' . $common_backend_resolution . ',' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full,scale_qsv=' . $common_backend_resolution . ',' . setptsFromMs($hdmi_delay_video) . '"';
|
||||
else
|
||||
$input .= ' -vf "format=nv12,hwupload=extra_hw_frames=64,scale_qsv=' . $common_backend_resolution . '"';
|
||||
$input .= ' -vf "vpp_qsv=format=nv12:in_range=full:out_range=full,scale_qsv=' . $common_backend_resolution . '"';
|
||||
}
|
||||
$input .= " -c:v h264_qsv -profile:v high -level:v 4.2 "
|
||||
. " -b:v " . $common_backend_data_rate
|
||||
|
|
|
|||
Loading…
Reference in New Issue