Getested und ein Berechnungsfehler beseitigt in Time to sec

This commit is contained in:
Eduard Wisch 2025-03-04 19:50:30 +01:00
parent 274c20449e
commit 0a259732ca
2 changed files with 11 additions and 11 deletions

View file

@ -2,7 +2,8 @@ class Ffmpeg:
def __init__(self, config):
self.config = config
def video_info(self, select, source_file):
@staticmethod
def video_info(select, source_file):
command_info = [
"ffprobe", "-v",
"error",
@ -18,8 +19,9 @@ class Ffmpeg:
]
return command_info
def video_convert(self, config, obj):
@staticmethod
def video_convert(config, obj):
command_convert = [
"ffmpeg", "-y", "-i", obj.source_file,
"-map", "0:0",

View file

@ -1,4 +1,3 @@
import asyncio
import os.path
import re
import subprocess
@ -16,15 +15,14 @@ from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
from starlette.websockets import WebSocketState
import video_class as vc
from ffmpeg_class import Ffmpeg as fc
from config_class import Config as c
import app.video_class as vc
from app.ffmpeg_class import Ffmpeg as Fc
from app.config_class import Config as Cfg
# Globale Variablen
cfg = c()
config = cfg.config
config = Cfg().config
ffmpeg: ffmpeg = fc(config)
ffmpeg = Fc(config)
queue: queue = queue.Queue()
semaphore = threading.Semaphore(config["convert"]["max_process"])
@ -111,7 +109,7 @@ def video_convert(obj):
semaphore.acquire()
result: str = None
result: str = ""
obj.convert_start = time.time()
command = ffmpeg.video_convert(config, obj)