Fix: Resolve NameError in utils.py; Refactor: Switch to subprocess calls and update spec file; Docs: Mark packaging complete
This commit is contained in:
11
src/utils.py
11
src/utils.py
@@ -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
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user