Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Generated video without sound #61

Open
BiubiuGreen opened this issue Nov 2, 2022 · 5 comments
Open

#Generated video without sound #61

BiubiuGreen opened this issue Nov 2, 2022 · 5 comments

Comments

@BiubiuGreen
Copy link

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?

@sczhou
Copy link
Owner

sczhou commented Nov 3, 2022

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 :-)

@ababilinski
Copy link

ababilinski commented Nov 12, 2022

@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"

@BiubiuGreen
Copy link
Author

@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.

@sczhou
Copy link
Owner

sczhou commented Dec 22, 2022

Hi @BiubiuGreen, the updated CodeFormer scripts can add back the original sound into enhanced video. Welcome to have a try! 🤗

@954L
Copy link

954L commented Jun 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants