neuralchen / SimSwap

An arbitrary face-swapping framework on images and videos with one single trained model!
Other
4.55k stars 895 forks source link

this error keeps appearing #133

Open ozmix opened 3 years ago

ozmix commented 3 years ago

Traceback (most recent call last): File "C:\Users\ozzyx\anaconda3\envs\simswap\lib\site-packages\moviepy\video\VideoClip.py", line 262, in write_videofile codec = extensions_dict[ext]['codec'][0] KeyError: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "test_video_swapsingle.py", line 72, in no_simswaplogo=opt.no_simswaplogo,use_mask=opt.use_mask) File "F:\SS\SimSwap-main\util\videoswap.py", line 112, in video_swap clips.write_videofile(save_path,audio_codec='aac') File "", line 2, in write_videofile File "C:\Users\ozzyx\anaconda3\envs\simswap\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration return f(clip, *a, k) File "", line 2, in write_videofile File "C:\Users\ozzyx\anaconda3\envs\simswap\lib\site-packages\moviepy\decorators.py", line 135, in use_clip_fps_by_default return f(clip, *new_a, *new_kw) File "", line 2, in write_videofile File "C:\Users\ozzyx\anaconda3\envs\simswap\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB return f(clip, a, k) File "C:\Users\ozzyx\anaconda3\envs\simswap\lib\site-packages\moviepy\video\VideoClip.py", line 264, in write_videofile raise ValueError("MoviePy couldn't find the codec associated " ValueError: MoviePy couldn't find the codec associated with the filename. Provide the 'codec' parameter in write_videofile.

jiachenlei commented 2 years ago

You can solve this problem by passing a path containing the output video name to argument output_path. e.g.
in the command line add this: --output_path ./output/result.mp4