Fix: Resolve NameError in utils.py; Refactor: Switch to subprocess calls and update spec file; Docs: Mark packaging complete

This commit is contained in:
Ramforth
2025-11-01 12:37:32 +01:00
parent b8d74f43ef
commit 1fdaf49133
3 changed files with 8 additions and 8 deletions

View File

@@ -3,10 +3,11 @@ import json
import subprocess
import sys
from src import config # Import config module
def get_video_info(file_path):
"""Uses ffprobe to get detailed information about a video file."""
command = [
'ffprobe',
config.FFPROBE_PATH,
'-v', 'error',
'-select_streams', 'v:0',
'-show_entries', 'stream=codec_name,width,height,avg_frame_rate,duration_ts,bit_rate,pix_fmt',
@@ -33,10 +34,10 @@ def get_video_info(file_path):
def get_audio_info(file_path):
"""Uses ffprobe to get detailed information about an audio stream in a video file."""
command = [
'ffprobe',
config.FFPROBE_PATH,
'-v', 'error',
'-select_streams', 'v:0',
'-show_entries', 'stream=codec_name,width,height,avg_frame_rate,duration_ts,bit_rate,pix_fmt',
'-select_streams', 'a:0',
'-show_entries', 'stream=codec_name,sample_rate,channels,bit_rate',
'-of', 'json',
file_path
]