zimscraperlib.video.encoding
Functions:
-
reencode–Runs ffmpeg with given ffmpeg_args
reencode
reencode(
src_path: Path,
dst_path: Path,
ffmpeg_args: list[str],
threads: int | None = 1,
*,
delete_src: bool = False,
failsafe: bool = True,
existing_tmp_path: Path | None = None,
) -> tuple[bool, CompletedProcess[str]]
Runs ffmpeg with given ffmpeg_args
Arguments - src_path - Path to source file dst_path - Path to destination file ffmpeg_args - A list of ffmpeg arguments threads - Number of encoding threads used by ffmpeg delete_src - Delete source file after convertion failsafe - Run in failsafe mode
Source code in src/zimscraperlib/video/encoding.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |