From 77f65be81fb35e2ff4bf09a57e2d01d39d3c2042 Mon Sep 17 00:00:00 2001 From: None <62809003+Arrowar@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:56:18 +0200 Subject: [PATCH] Update util.py --- StreamingCommunity/Lib/FFmpeg/util.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/StreamingCommunity/Lib/FFmpeg/util.py b/StreamingCommunity/Lib/FFmpeg/util.py index de18ea4..1fb0851 100644 --- a/StreamingCommunity/Lib/FFmpeg/util.py +++ b/StreamingCommunity/Lib/FFmpeg/util.py @@ -130,7 +130,14 @@ def print_duration_table(file_path: str, description: str = "Duration", return_s def get_ffprobe_info(file_path): - """Get format and codec information for a media file using ffprobe.""" + """ + Get format and codec information for a media file using ffprobe. + Parameters: + - file_path (str): Path to the media file. + Returns: + dict: A dictionary containing the format name and a list of codec names. + Returns None if file does not exist or ffprobe crashes. + """ if not os.path.exists(file_path): logging.error(f"File not found: {file_path}") return None