Skip to content

Instantly share code, notes, and snippets.

@thakyZ
Created May 25, 2020 02:14
Show Gist options
  • Select an option

  • Save thakyZ/c27d7df3abc2ae84c2c9ea5f377f1342 to your computer and use it in GitHub Desktop.

Select an option

Save thakyZ/c27d7df3abc2ae84c2c9ea5f377f1342 to your computer and use it in GitHub Desktop.
FFMPEG Destructions~

FFMPEG Instructions

Step 1

Download FFMpeg here:
https://sourceforge.net/projects/ffmpeg/files/latest/download

Step 2

Extract the ZIP file

Step 3

Place the frames of the video into the folder that FFMpeg is in.

If FFMpeg is not in it's own folder make a new folder and place it and the frames into the new folder.

Step 4

Go into the folder if you created a new one.

Press Left-Shift+Right-Click in an empty area of the file explorer and there should be now a button that says "Open Powershell Window here"

click that...

Step 5

Rename each file for the frames to something like pic00.png, pic01.png, etc.

In the powershell window type this and be sure to edit the values in the < and > (be sure to also remove those symbols

.\ffmpeg.exe -r 60 -f image2 -s <video width>x<video height> -i pic%04d.png -vcodec libx264 -crf 25  -pix_fmt yuv420p <video name>.mp4

Step 6

Enjoy~

Notes

To convert from gif to video you just need to put the gif into the folder with FFMpeg and open powershell as described in Step 5

and run

.\ffmpeg.exe -r 30 -i <gif name>.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" <video name>.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment