Real-ESRGAN icon indicating copy to clipboard operation
Real-ESRGAN copied to clipboard

Wrong video length and loss audio after processing by multiple processes and merge

Open kaneyxx opened this issue 2 years ago • 3 comments

CUDA_VISIBLE_DEVICES=0 python inference_realesrgan_video.py -i inputs/video/short.mp4 -n realesr-animevideov3 -s 3 --suffix outx3 --num_process_per_gpu 4 --extract_frame_first

I used the code to process a 27 secs video (with audio). The processed video length increased to 33 secs and the audio totally lost. But it would be totally fine if I set num_process_per_gpu = 1. How come can it be ? How can I fix this issue ?

Thanks for any help !

kaneyxx avatar Aug 08 '22 03:08 kaneyxx

your tool does not work just create a video from bad frames creating a video out of phase with the audio

marana22 avatar Aug 19 '22 01:08 marana22

you need change by new ffmpeg frame the same framerate as output depending on you source video freamreate

kiam001 avatar Aug 29 '22 11:08 kiam001

ffmpeg -r 25.000 -i "D:\work\tmp\out_frames\frame%%08d.jpg" -c:v libx264 -r 25.000 -pix_fmt yuv420p "D:\work\output%%G.mkv"

kiam001 avatar Aug 29 '22 11:08 kiam001