Find all video files and encode them
Some checks failed
ci/woodpecker/push/linting Pipeline failed

This commit is contained in:
RealStickman 2022-11-10 14:17:32 +01:00
parent 533f4f01fb
commit 5a9f765281

18
encode_all.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
import encode_single_video
import os
# tuple of video file extensions
videofileextensions = (".webm", ".mp4")
videofiles: list[str] = []
for root, dirs, files in os.walk("source"):
for file in files:
if file.endswith(videofileextensions):
filepath = os.path.join(root, file)
videofiles.append(filepath)
for video in videofiles:
encode_single_video.main(inputfile=video)