Utils Module
This module contains utility functions.
Progress
Progress tracking functionality for FMUS-VID.
This module provides utilities for tracking and reporting operation progress.
- class fmusvid.utils.progress.OperationType(value)[source]
Types of video operations for progress tracking.
- LOAD = 'Loading'
- SAVE = 'Saving'
- ENCODE = 'Encoding'
- DECODE = 'Decoding'
- PROCESS = 'Processing'
- ANALYZE = 'Analyzing'
- EXPORT = 'Exporting'
- STREAM = 'Streaming'
- class fmusvid.utils.progress.ProgressStats(start_time, current_time, total_frames, processed_frames, fps, eta, percentage)[source]
Statistics for operation progress.
- __init__(start_time, current_time, total_frames, processed_frames, fps, eta, percentage)
- class fmusvid.utils.progress.ProgressTracker(operation, total_frames, callback=None, update_interval=0.1)[source]
Class for tracking operation progress.
- __init__(operation, total_frames, callback=None, update_interval=0.1)[source]
Initialize progress tracker.
- Parameters:
operation (
OperationType) – Type of operation being trackedtotal_frames (
int) – Total number of frames to processcallback (
Optional[Callable[[ProgressStats],None]]) – Function to call with progress updatesupdate_interval (
float) – Minimum time between progress updates
- class fmusvid.utils.progress.ConsoleProgress(operation, total_frames)[source]
Console-based progress reporter.
- __init__(operation, total_frames)[source]
Initialize console progress reporter.
- Parameters:
operation (
OperationType) – Type of operation being trackedtotal_frames (
int) – Total number of frames to process
- class fmusvid.utils.progress.ProgressManager[source]
Manager for tracking multiple operations.
- start_operation(name, operation, total_frames, callback=None)[source]
Start tracking a new operation.
- Parameters:
name (
str) – Operation identifieroperation (
OperationType) – Type of operationtotal_frames (
int) – Total frames to processcallback (
Optional[Callable[[ProgressStats],None]]) – Progress callback function
- Return type:
- Returns:
Progress tracker for the operation