OpenTalker / SadTalker

[CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation
https://sadtalker.github.io/
Other
11.87k stars 2.21k forks source link

生成视频没有声音,或者视频为0字节 #256

Open muximuxi opened 1 year ago

muximuxi commented 1 year ago

您好~感谢开源 使用sd webui安装sadTalker后,按照说明文件在其模块设置中选择“full”的处理方式,最后生成的视频是0字节,如果选择“crop”的话,生成的视频没有声音,请问是怎么回事,该如何解决呢?

muximuxi commented 1 year ago

对于没有声音的视频,用ffmpeg将音视频合并了一下,但是选择“full”时,没有视频生成,请问怎么处理呀?

vinthony commented 1 year ago

可以看看什么错误吗?

muximuxi commented 1 year ago

这个是用sd webui执行后有错误的部分:生成结果的MP4文件大小是0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '9bb956e6-63e6-41a6-bc28-6cf5874141ee.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf59.27.100 Duration: 00:00:04.56, start: 0.000000, bitrate: 591 kb/s Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 512x512 [SAR 1:1 DAR 1:1], 588 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler Guessed Channel Layout for Input Stream #1.0 : mono Input #1, wav, from '/home/stable-diffusion-webui-master/outputs/SadTalker/05eb246b-ee9a-4661-8f39-dbab85e91e70/001995-0-100.wav': Duration: 00:00:04.56, bitrate: 256 kb/s Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s [aac @ 0x94b460] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. The generated video is named /home/stable-diffusion-webui-master/outputs/SadTalker/05eb246b-ee9a-4661-8f39-dbab85e91e70/tmp9e6ws9o9##001995-0-100_full.mp4 The generated video is named tmp9e6ws9o9##001995-0-100 in /home/stable-diffusion-webui-master/outputs/SadTalker/05eb246b-ee9a-4661-8f39-dbab85e91e70

如果用python inference.py --preprocess full的时候,又提示:(这个能生成MP4文件,但是没有声音) ./out_inference/test4_inference_2/2023_05_04_14.16.56/temp_test4##001995_enhanced.mp4: No such file or directory Traceback (most recent call last): File "/home/stable-diffusion-webui-master/extensions/SadTalker/inference.py", line 158, in main(args) File "/home/stable-diffusion-webui-master/extensions/SadTalker/inference.py", line 112, in main animate_from_coeff.generate(data, save_dir, pic_path, crop_info, \ File "/home/stable-diffusion-webui-master/extensions/SadTalker/src/facerender/animate.py", line 210, in generate save_video_with_watermark(enhanced_path, new_audio_path, av_path_enhancer, watermark= False) File "/home//stable-diffusion-webui-master/extensions/SadTalker/src/utils/videoio.py", line 26, in save_video_with_watermark shutil.move(temp_file, save_path) File "/home/anaconda3/envs/sd-webui/lib/python3.10/shutil.py", line 835, in move copy_function(src, real_dst) File "/home/anaconda3/envs/sd-webui/lib/python3.10/shutil.py", line 434, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/anaconda3/envs/sd-webui/lib/python3.10/shutil.py", line 254, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '56d5fdc8-03ba-44bf-be6d-d1af31e4da31.mp4'

是ffmpeg的原因吗?我的是imageio-ffmpeg

vinthony commented 1 year ago

必须安装ffmpeg,image-ffmpeg好像没法安装原版ffmpeg