h264 and h265 update gpu
This commit is contained in:
parent
2c4fc1630a
commit
8fc61cd829
|
|
@ -876,7 +876,7 @@ function update_service($which_service)
|
|||
break;
|
||||
case "disable":
|
||||
$srt .= ' -c:v ' . $data['srt']['format']
|
||||
. ' -vf "scale=' . str_replace("x", ":", $data['srt']['resolution']) . '"'
|
||||
. ' -vf "scale=resolution_resolution_resolution"'
|
||||
. ' -b:v ' . $data['srt']['data_rate']
|
||||
. ' -maxrate ' . $data['srt']['data_rate']
|
||||
. ' -bufsize ' . $data['srt']['data_rate']
|
||||
|
|
@ -891,6 +891,15 @@ function update_service($which_service)
|
|||
break;
|
||||
}
|
||||
|
||||
if ($use_common_backend == "use_common_backend" && ($data['srt']['format'] == "h264_qsv" || $data['srt']['format'] == "hevc_qsv")) {
|
||||
$udp0 = str_replace("ffmpeg -hwaccel auto -hide_banner -fflags +discardcorrupt -i", "ffmpeg -hwaccel qsv -hwaccel_output_format qsv -hide_banner -i ", $srt);
|
||||
$udp0 = str_replace("scale", "vpp_qsv", $srt);
|
||||
$udp0 = str_replace("resolution_resolution_resolution", toVppScale($data['srt']['resolution']), $srt);
|
||||
$udp0 = str_replace("h264_qsv", "h264_qsv -profile:v main -global_quality 20 ", $srt);
|
||||
} else {
|
||||
$udp0 = str_replace("resolution_resolution_resolution", str_replace("x", ":", $data['srt']['resolution']), $srt);
|
||||
}
|
||||
|
||||
$file = "/var/www/encoder-srt.sh";
|
||||
file_put_contents($file, $srt);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue