Compare commits

...

2 commits

Author SHA1 Message Date
8901279432 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	app/ffmpeg_class.py
2025-03-05 20:48:04 +01:00
96c947a3a3 Befehl ausgabe f[r testywecke programmiert 2025-03-05 20:36:55 +01:00
2 changed files with 22 additions and 3 deletions

View file

@ -1,9 +1,12 @@
from app.main import video_convert
class Ffmpeg: class Ffmpeg:
def __init__(self, config): def __init__(config):
self.config = config self.config = config
@staticmethod @staticmethod
def video_info(select, source_file): def video_info():
command_info = [ command_info = [
"ffprobe", "-v", "ffprobe", "-v",
"error", "error",
@ -21,7 +24,7 @@ class Ffmpeg:
return command_info return command_info
@staticmethod @staticmethod
def video_convert(config, obj): def video_convert():
command_convert = [ command_convert = [
"ffmpeg", "-y", "-i", obj.source_file, "ffmpeg", "-y", "-i", obj.source_file,
"-map", "0:0", "-map", "0:0",
@ -54,3 +57,14 @@ class Ffmpeg:
command_convert.append(obj.output_file) command_convert.append(obj.output_file)
return command_convert return command_convert
@staticmethod
def command_as_string(self, cmd):
command_as_string: str = ""
for para in cmd:
if "/" not in para:
command_as_string += f"{para} "
else:
command_as_string += f"\"{para}\" "
return command_as_string.strip()

5
requirements.txt Normal file
View file

@ -0,0 +1,5 @@
uvicorn~=0.34.0
fastapi~=0.115.11
starlette~=0.46.0
PyYAML~=6.0.2
websockets~=15.0