saifhassan / Wav2Lip-HD

High-Fidelity Lip-Syncing with Wav2Lip and Real-ESRGAN
Other
320 stars 75 forks source link

How to obtain HD videos? #30

Closed AIhasArrived closed 8 months ago

AIhasArrived commented 8 months ago

Hello I got a low quality output finally, after resolving many bugs, But now I would to know how to make sure the result is HD I see in the description:

image

But I did not find an HD video on any directory, Not sure how to use the HD thing? Please tell me.

AIhasArrived commented 8 months ago

Since i was using windows, I was running line by line and forget about the other lines:

python3 inference.py --checkpoint_path "checkpoints/wav2lip_gan.pth" --segmentation_path "checkpoints/face_segmentation.pth" --sr_path "checkpoints/esrgan_yunying.pth" --face ${input_video}/${filename}.mp4 --audio ${input_audio} --save_frames --gt_path "data/gt" --pred_path "data/lq" --no_sr --no_segmentation --outfile ${output_videos_wav2lip}/${filename}.mp4
python video2frames.py --input_video ${output_videos_wav2lip}/${filename}.mp4 --frames_path ${frames_wav2lip}/${filename}
cd Real-ESRGAN
python inference_realesrgan.py -n RealESRGAN_x4plus -i ${back_dir}/${frames_wav2lip}/${filename} --output ${back_dir}/${frames_hd}/${filename} --outscale 3.5 --face_enhance
#ffmpeg -r 20 -i ${back_dir}/${frames_hd}/${filename}/frame_%05d_out.jpg -i ${back_dir}/${input_audios} -vcodec libx264 -crf 25 -preset veryslow -acodec copy ${back_dir}/${output_videos_hd}/${filename}.mkv