CodeFormer
CodeFormer copied to clipboard
#Generated video without sound
Hi, Why is there no sound in the generated video? My original video has sound. I've tested it three times. Is there something wrong?
The current inference script only supports video frame enhancement, its workflow is as follows:
1. Extract frame images from the input video
2. Enhance frame images by CodeFormer and RealESRGAN
3. Write the enhanced images into the output video
The sound is not considered in this frame enhancement pipeline.
You can easily add video sound via other editing software such as Adobe Premiere Pro, iMovie, etc.
Also, you are welcome to update our script and report a PR to us :-)
@BiubiuGreen You can use FFmpeg to add the audio back into your video
Instructions:
Install FFmpeg (Mac) | Install FFmpeg (Windows) |
---|---|
- Open Terminal | - Open Powershell |
- Install Homebrew | - Install Chocolatey |
- run brew install ffmpeg |
- run choco install ffmpeg |
FFmpeg Command
ffmpeg -an -i $VIDEO -vn -i $AUDIO -c:v copy $OUTPUT
-
$VIDEO
= path to improved video -
$AUDIO
= path to original video (with audio) -
$OUTPUT
= path to output e.g:"/output.mp4"
@sczhou Thank you for your patience in explaining and making me understand why the video has no sound.💜
I'm glad you invited me to update the script. However, my coding ability is limited. I have to change the video file name manually every time I upload a video. The script is not automated enough.
I am worried that it will add workload to you.😂
@ababilinski Thank you for your guidance on my specific commands. 💜
It helped me a lot and I'll try what you said later.
Hi @BiubiuGreen, the updated CodeFormer scripts can add back the original sound into enhanced video. Welcome to have a try! :hugs:
Hi @BiubiuGreen, the updated CodeFormer scripts can add back the original sound into enhanced video. Welcome to have a try! 🤗
@sczhou I tried it, but still no sound