update BG_Actor6
This commit is contained in:
1 parent
b6567d5902
commit
de75bc60b6
14 files changed
+9497
-94
No files matched your search
@@ -0,0 +1,37 @@
|
||||
|
||||
from pathlib import Path
|
||||
import json
|
||||
import os
|
||||
import moviepy
|
||||
from moviepy.editor import VideoFileClip, AudioFileClip
|
||||
|
||||
import os, sys
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from common.logger import Logger
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
# path_raw = Path("/ssdata1/cf/data/raw/actor06/20220517")
|
||||
path_raw = Path("/ssdata1/cf/data/raw/actor06/bg")
|
||||
path_root = Path("/mfs/lsen/DATA/Actor6/bg/raw-rotaion")
|
||||
path_root.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# get all videos
|
||||
vpath_videos = sorted(path_raw.glob("*.MP4"), reverse=False)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
# for each video
|
||||
for i, ipath_item in enumerate(vpath_videos):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
ipath_rotaion = path_root.joinpath(f"{iname}.mp4")
|
||||
|
||||
cmd = f"ffmpeg -loglevel quiet -i {str(ipath_item)} -vf 'transpose=1' {str(ipath_rotaion)} "
|
||||
print(f"cmd = {cmd}")
|
||||
os.system(cmd)
|
||||
|
||||
Reference in new issue
Block a user