https://www.youtube.com/watch?v=BRoZiY6E5h4
After following this tutorial, your images will be ready to be zipped and used to train a StyleGAN2 model.
https://www.youtube.com/watch?v=fESqT02VxIA
cd into the directory with your input mediaNote: The following commands can be modified to suit your needs. I’ll put some common “flags” here that you’ll see being used below:
r: the framerate (e.g.: r 30 for 30fps)i: the input file(s). Just something you always need.crf: the “quality” when exporting to .mp4. Higher number = lower quality
(more compression, smaller file sizes). Stick between 17-25.Note: If you’re extracting images from a video, you can save them as PNG or JPG.
Turn an image sequence into an .mp4 (60 fps, scale is the same as input images)
ffmpeg -r 60 -i %d.jpg -vcodec libx264 -crf 23 -pix_fmt yuv420p output.mp4
Extract every frame from a video
ffmpeg -i input.mp4 frames/output%d.jpg