feat(lib): allow to insert external videos as slides (#526)

* feat(lib): allow to insert external videos as slides

See https://github.com/jeertmans/manim-slides/discussions/520

* chore(lib): lint and changelog entry

* chore: fix PR #

fix

* fix: docs
This commit is contained in:
Jérome Eertmans
2025-01-29 18:17:45 +00:00
committed by GitHub
parent a2bd1ffb67
commit ccbe9d558c
6 changed files with 102 additions and 22 deletions

View File

@ -1,5 +1,6 @@
import hashlib
import os
import shutil
import tempfile
from collections.abc import Iterator
from multiprocessing import Pool
@ -14,6 +15,9 @@ from .logger import logger
def concatenate_video_files(files: list[Path], dest: Path) -> None:
"""Concatenate multiple video files into one."""
if len(files) == 1:
shutil.copy(files[0], dest)
return
def _filter(files: list[Path]) -> Iterator[Path]:
"""Patch possibly empty video files."""