wangzhibo
2025-07-27 e0fb1b468f7d607ff78232d250271c46f603c3a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from auto_media_publisher.utils.face_swap.face_swaper_ffmpeg import FaceSwapWorker
from auto_media_publisher.utils.face_swap.face_swaper_ffmpeg_stream import FFmpegVideoProcessor
import time
 
import warnings
warnings.filterwarnings("ignore")
 
if __name__ == '__main__':
 
 
 
    processor2 = FFmpegVideoProcessor(enable_enhancer=True,enable_nsfw_predictor=False)
 
    start_time = time.time()
 
    processor2.run("./temp/lilizhen.jpg","./temp/buhui.mp4", "./temp/buhui-lilizhen-with-enhancer.mp4", num_workers=4)
 
    #worker.swap_face('./temp/lilizhen.jpg', './temp/g1.mp4', './temp/g1_no_enhancer.mp4',1)
 
    print(time.time()-start_time)