Neuer Branch gpu-encode

This commit is contained in:
Eduard Wisch 2025-06-04 21:20:00 +02:00
parent 368fd53edc
commit 35465ca78c
2 changed files with 16 additions and 12 deletions

View file

@ -52,8 +52,6 @@ class Convert:
result = None
logging.info(f"Starte Konvertierung: {command}")
await self.obj_websocket.send_websocket(self.obj_path.active_path_to_dict())
await self.obj_websocket.send_websocket(self.obj_path.queue_path_to_dict())
try:
# Starte den Subprozess asynchron
@ -65,6 +63,8 @@ class Convert:
self.active_process.add(obj)
obj.process_start = time.time()
await self.obj_websocket.send_websocket(self.obj_path.active_path_to_dict())
await self.obj_websocket.send_websocket(self.obj_path.queue_path_to_dict())
await obj_process.read_out(obj)
await obj.process.wait()
@ -93,16 +93,21 @@ class Convert:
def convert_cmd(self, obj):
command_convert = [
"ffmpeg", "-y", "-i", obj.source_file,
# "-init_hw_device", "vaapi=va:/dev/dri/renderD128",
"ffmpeg", "-y",
"-init_hw_device", "vaapi=intel:/dev/dri/renderD128",
"-hwaccel", "vaapi",
"-hwaccel_device", "intel",
"-i", obj.source_file,
"-map", "0:0",
"-c:v", "libsvtav1",
#"-c:v", "av1_qsv",
"-preset", "5",
"-crf", "30",
#"-c:v", "libsvtav1",
"-c:v", "av1_vaapi",
#"-preset", "5",
#"-crf", "30",
"-qp", "30",
"-g", "240",
"-pix_fmt", "yuv420p10le",
"-svtav1-params", "tune=0:film-grain=8",
#"-pix_fmt", "yuv420p10le",
"-vf", "format=nv12,hwupload",
#"-svtav1-params", "tune=0:film-grain=8",
]
if len(obj.streams_audio):

View file

@ -64,10 +64,9 @@ class Server:
if data.get("data_path"):
self.obj_path.receive_paths(data.get("data_path"))
await self.start_convert()
await self.send_websocket(self.obj_path.active_path_to_dict())
await self.send_websocket(self.obj_path.queue_path_to_dict())
await self.start_convert()
elif data.get("data_command"):
if data["data_command"]["cmd"] == "delete":
self.obj_path.delete_path(data["data_command"]["id"])