Befehl ausgabe f[r testywecke programmiert
This commit is contained in:
parent
e37ca3155c
commit
96c947a3a3
2 changed files with 22 additions and 1 deletions
|
|
@ -1,7 +1,11 @@
|
|||
from app.main import video_convert
|
||||
|
||||
|
||||
class Ffmpeg:
|
||||
def __init__(config):
|
||||
self.config = config
|
||||
|
||||
@staticmethod
|
||||
def video_info():
|
||||
command_info = [
|
||||
"ffprobe", "-v",
|
||||
|
|
@ -18,7 +22,8 @@ class Ffmpeg:
|
|||
]
|
||||
|
||||
return command_info
|
||||
|
||||
|
||||
@staticmethod
|
||||
def video_convert():
|
||||
command_convert = [
|
||||
"ffmpeg", "-y", "-i", obj.source_file,
|
||||
|
|
@ -52,3 +57,14 @@ class Ffmpeg:
|
|||
command_convert.append(obj.output_file)
|
||||
|
||||
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
5
requirements.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
uvicorn~=0.34.0
|
||||
fastapi~=0.115.11
|
||||
starlette~=0.46.0
|
||||
PyYAML~=6.0.2
|
||||
websockets~=15.0
|
||||
Loading…
Reference in a new issue