Убрал спам от ffmpeg
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
@@ -64,10 +65,8 @@ class VideoMaker:
|
|||||||
return duration
|
return duration
|
||||||
|
|
||||||
def run_command(self, cmd: str) -> int:
|
def run_command(self, cmd: str) -> int:
|
||||||
import subprocess
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.run(cmd, shell=True, check=True, stdout=subprocess.DEVNULL)
|
subprocess.run(cmd, shell=True, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
return 0
|
return 0
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
logging.error(f"Command failed with error: {e}")
|
logging.error(f"Command failed with error: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user