34

I suppose ffmpeg is the weapon of choice but I didn't find out how to reach my goal.

50

From here:

ffmpeg -i input.webm -pix_fmt rgb24 output.gif
| improve this answer | |
  • 3
    Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this? – brubaker Aug 4 '14 at 11:47
  • 5
    gifsicle is a fantastic tool to reduce gif size gifsicle -O2 input.gif -o output.gif – kenn Aug 4 '14 at 11:52
  • 1
    @BarafuAlbino Thanks buddy, but I got an error: "Unknown pixel format requested: rgb16." – brubaker Aug 4 '14 at 12:01
  • 2
    @brubaker I think I got you beat: 120K .webm → 2.7G .gif. Yes, that's with a G. – wchargin Nov 1 '15 at 23:19
  • 3
    rgb24 is not supported for gif, ffmpeg would use rgb8 instead automatically. – kxxoling Jan 22 '17 at 8:59
16

Barafu's answer is alright. But, the resulting gif may have color conversion issue as ffmpeg complains on Incompatible pixel format 'rgb24' for codec 'gif'. Here is what I find works:

First, create PNG Palette:

ffmpeg -y -i input.webm -vf palettegen palette.png

Then, use the palette to produce gif:

ffmpeg -y -i input.webm -i palette.png -filter_complex paletteuse -r 10 output.gif

Source:

Covert MP4/Webm - ubuntubuzz.com

| improve this answer | |
  • 1
    produced a much better result in my case than the accepted answer – Eugene Jul 15 '19 at 9:42
0

i recommend you to use a third party converting tool called DumpMedia Video Converter, it has online and offline versions, I use the online tool all the time, save time and space, but you can use the offline tool to convert in batch, means you can convert the whole playlist at one go.

| improve this answer | |
  • Are you affiliated with DumpMedia? Are you aware this is a very old question? Why is your suggestion better than the accepted answer? – Mast Sep 22 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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