2

What I am trying to do:
I am trying to use Gimp (2.8) to convert an mp4 video to a gif.

What I've done & The Problem:

  • I downloaded and installed GAP (I pasted the resources I used below).
  • Opened GIMP
  • Went to Video > Split Video Into Frames > Extract Videoframe
  • Selected the video
  • Set "To Frame" to 180 (I've tried using different ranges here).
  • Selected "Create only one multilayer image"
  • Clicked "Okay"

Once I'm back in the main gimp screen, only one frame shows up in Layers.

enter image description here

Possible Issue & My question:

  • Let's say I select "To Frame" and put in 180 (refer to screenshot below).
  • Then I click "Video Range".
  • In the Video Range screen, 180 is now the "End Frame" (which makes sense).
  • However, if I click on the slider above the video preview in the "Video Range" screen, the "To Frame" and the "End frame" values reset to 1.

enter image description here

So, I'm guessing that behavior may be an indicator of whatever the main problem is. Is there a default setting that I need to change somewhere to allow Gimp to covert the video into more than one frame? If not, has anyone else encountered this problem and found a fix?

Thanks for any help.

Resources:
GAP Download:

Video to GIF Tutorials:

6
  • After your import of the video, it isn't a layer based animation yet. You need to click Video > Frames to Image, and set the frame range to convert. That'll convert it into a layer based animation
    – Billy Kerr
    Apr 8, 2018 at 14:46
  • @BillyKerr How do you import it before converting it to a gif though? If you go to file > open, you get "unsupported file type". The only way I see to import a video is to go through Video > Split Video Into Frames > Extract Videoframe. But when I do that, I only get one frame back. Apr 8, 2018 at 15:00
  • You've already done that when you did the split video to frames. The next stage is to create a layer based animation. You won't be able to see the layers until you've done that.
    – Billy Kerr
    Apr 8, 2018 at 15:30
  • @BillyKerr Thanks. I tried that after you suggested it. When I run "Frames to Image", it only has one frame. It won't let me select a range. The arrows next to "To Frame" are grayed out and you can't enter anything but 1 into the box. Even if I select "okay" with all of the defaults, I just have one layer. Is there anything else I can try? Apr 8, 2018 at 15:40
  • Hmmm . . . not sure what else you can do really. It works for me. Perhaps try an online video to GIF converter.
    – Billy Kerr
    Apr 8, 2018 at 21:59

1 Answer 1

0

You are almost there. Before you do this make sure your video file is in a folder on its own.

  1. Click Video > Split video to frames. Choose the video file. Select the range. Also make sure the output folders are set to the same folder that your video file is in. Click OK and GIMP will import the video. Note that this will show up as only 1 layer in the image window. This is normal!

At this point, the folder you have chosen as the output folder should fill with XCF files for each frame of the video. Open the folder and you should see them in there.

  1. Click Video > Frames to Image. Select the range of frames to convert. This will open a new image window in GIMP, with the video converted to layers.

At this point, you may wish to scale the image to make it smaller, to keep the file size small.

  1. Click Image > Mode > Indexed, and choose Floyd-Steinberg (reduced color bleeding) as the dither method. You can select 64 colours to try to keep the file size smaller.

  2. Optimise the animation using Filters > Animation > Optimise (for GIF). This will open a new image window with the layers optimised.

  3. To see a preview of the animation click Filters > Animation > Playback

  4. To export the GIF click File > Export As (or if you are using GIMP 2.6.x use File > Save As), choose GIF as the file type.

  5. When the GIF export dialog appears, select the "Save as animation" option.

That's it.

Here's an example GIF I made, with GAP in GIMP, using the above steps, from a sample MP4 file available here. I extracted frames 60 to 100, giving a 40 frame animation.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.