Module utils

Source

Functions§

escape_filter_string
Escape a string for use in filter graphs
format_duration_human
Format a duration for display (human-readable)
get_extension
Get file extension from a path
guess_format_from_extension
Guess format from file extension
is_url
Check if a string looks like a URL
merge_args
Merge two sets of arguments, with later args overriding earlier ones
parse_bitrate
Parse a bitrate string (e.g., “128k”, “5M”, “1000”) Parse a bitrate string (e.g., “128k”, “5M”, “1000”)
parse_framerate
Parse a frame rate string (e.g., “25”, “29.97”, “30000/1001”)
parse_key_value_pairs
Parse key=value pairs from FFmpeg output
parse_resolution
Parse a resolution string (e.g., “1920x1080”)
quote_path
Quote a path for command line if needed
sanitize_filename
Sanitize a filename for safe file system usage