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

Plugin to merge frame to video with audio #63

Closed
ruah1984 opened this issue Jan 11, 2018 · 9 comments
Closed

Plugin to merge frame to video with audio #63

ruah1984 opened this issue Jan 11, 2018 · 9 comments

Comments

@ruah1984
Copy link

ruah1984 commented Jan 11, 2018

HI ,
can we add a plugin to merge frame to video with audio?

@Clorr
Copy link
Contributor

Clorr commented Jan 12, 2018

Hello,

I don't understand the request. Can you provide more info please ?

@Jack29913
Copy link
Contributor

He asks a plugin which converts frames into the video and adds original audio from source video into fake video.

@Clorr
Copy link
Contributor

Clorr commented Jan 12, 2018

:-D Frame, not flame!

I currently have in mind the @shaoanlu method with moviepy, but I have not much time to work on it. There is a draft pull request if you want to have a look

@Jack29913
Copy link
Contributor

In my view this can be archived with FFMPEG easily. So it's not a priority. I'm waiting for GAN with masking it will be a game changer if its like in those gifs

@Clorr
Copy link
Contributor

Clorr commented Jan 12, 2018

Can you provide some guidelines to @ruah1984 , if he needs some ?

@Clorr
Copy link
Contributor

Clorr commented Jan 12, 2018

For the gan plugin, the classes are somewhat ready in https://github.com/shaoanlu/faceswap-GAN/blob/master/temp/faceswap_GAN_keras.ipynb I have to merge them, hopefully later today

@ruah1984
Copy link
Author

sorry for the typo.
no hurry i think i can wait until GAN plugin ready in deepfakes/faceswap.
thanks.

@Jack29913
Copy link
Contributor

sure. i use these commands.

frames to video
ffmpeg -f image2 -framerate <fps_of_source_video> -i "img (%d).jpg" -vcodec libx264 -profile:v high444 -refs 16 -crf 0 -preset ultrafast input_0.mp4

adding sound
ffmpeg -i input_0.mp4 -i source.mp4 -c copy -map 0:0 -map 1:1 -shortest out.mp4

before using these commands, you should copy source frames to merged folder and say NO when it asks if it should overwrite existing files. You should do thing step because there might be some frames without faces in them or algorithm may have failed to detect faces for specific frames. If you fail to do this step correctly final video and audio won't sync.

@Clorr Clorr changed the title Plugin to merge flame to video with audio Plugin to merge frame to video with audio Jan 12, 2018
@Clorr
Copy link
Contributor

Clorr commented Feb 2, 2018

I'm closing this as I consider it to be handled in #10

@Clorr Clorr closed this as completed Feb 2, 2018
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

3 participants