Expand description
Utility functions and helpers for transcode operations.
Functions§
- calculate_
aspect_ ratio - Calculates the aspect ratio from width and height.
- calculate_
compression_ ratio - Calculates compression ratio.
- calculate_
optimal_ tiles - Calculates the optimal tile configuration for parallel encoding.
- calculate_
space_ savings - Calculates space savings.
- cleanup_
temp_ files - Cleans up temporary files.
- container_
from_ extension - Determines the container format from a file extension.
- estimate_
encoding_ time - Estimates encoding time based on video duration and quality settings.
- estimate_
file_ size - Calculates the file size estimate for a transcode.
- format_
aspect_ ratio - Formats an aspect ratio as a string.
- format_
bitrate - Formats a bitrate in bits per second to a human-readable string.
- format_
compression_ ratio - Formats compression ratio as a percentage.
- format_
duration - Formats a duration in seconds to a human-readable string.
- format_
file_ size - Formats a file size in bytes to a human-readable string.
- format_
framerate - Formats framerate as a string.
- format_
space_ savings - Formats space savings.
- get_
file_ extension - Gets the file extension from a path.
- is_
standard_ framerate - Checks if a framerate is standard.
- is_
standard_ resolution - Checks if a resolution is standard (common resolution).
- parse_
duration - Parses a duration string (e.g., “01:23:45” or “83:45”).
- resolution_
name - Gets the name of a standard resolution.
- suggest_
audio_ codec - Suggests optimal audio codec based on container format.
- suggest_
bitrate - Suggests optimal bitrate for a given resolution and framerate.
- suggest_
video_ codec - Suggests optimal codec based on container format.
- temp_
stats_ file - Creates a temporary file path for statistics.
- validate_
input_ file - Validates that a file exists and is readable.
- validate_
resolution_ constraints - Validates resolution constraints.