How to do I convert an webm (video) to a (animated) gif on the command line?
I suppose ffmpeg is the weapon of choice but I didn't find out how to reach my goal.
14.04 ffmpeg webm gif convert-command
add a comment |
I suppose ffmpeg is the weapon of choice but I didn't find out how to reach my goal.
14.04 ffmpeg webm gif convert-command
1
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20
add a comment |
I suppose ffmpeg is the weapon of choice but I didn't find out how to reach my goal.
14.04 ffmpeg webm gif convert-command
I suppose ffmpeg is the weapon of choice but I didn't find out how to reach my goal.
14.04 ffmpeg webm gif convert-command
14.04 ffmpeg webm gif convert-command
edited Aug 4 '14 at 11:45
brubaker
asked Aug 4 '14 at 11:36
brubakerbrubaker
1561317
1561317
1
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20
add a comment |
1
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20
1
1
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20
add a comment |
2 Answers
2
active
oldest
votes
From here:
ffmpeg -i input.webm -pix_fmt rgb24 output.gif
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
gifsicle is a fantastic tool to reduce gif sizegifsicle -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
2
rgb24
is not supported for gif, ffmpeg would usergb8
instead automatically.
– kxxoling
Jan 22 '17 at 8:59
|
show 9 more comments
Barafu's answer is alright. But, I 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
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f506670%2fhow-to-do-i-convert-an-webm-video-to-a-animated-gif-on-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
From here:
ffmpeg -i input.webm -pix_fmt rgb24 output.gif
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
gifsicle is a fantastic tool to reduce gif sizegifsicle -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
2
rgb24
is not supported for gif, ffmpeg would usergb8
instead automatically.
– kxxoling
Jan 22 '17 at 8:59
|
show 9 more comments
From here:
ffmpeg -i input.webm -pix_fmt rgb24 output.gif
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
gifsicle is a fantastic tool to reduce gif sizegifsicle -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
2
rgb24
is not supported for gif, ffmpeg would usergb8
instead automatically.
– kxxoling
Jan 22 '17 at 8:59
|
show 9 more comments
From here:
ffmpeg -i input.webm -pix_fmt rgb24 output.gif
From here:
ffmpeg -i input.webm -pix_fmt rgb24 output.gif
edited Mar 20 '17 at 10:18
Community♦
1
1
answered Aug 4 '14 at 11:39
Barafu AlbinoBarafu Albino
4,99311932
4,99311932
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
gifsicle is a fantastic tool to reduce gif sizegifsicle -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
2
rgb24
is not supported for gif, ffmpeg would usergb8
instead automatically.
– kxxoling
Jan 22 '17 at 8:59
|
show 9 more comments
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
gifsicle is a fantastic tool to reduce gif sizegifsicle -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
2
rgb24
is not supported for gif, ffmpeg would usergb8
instead automatically.
– kxxoling
Jan 22 '17 at 8:59
1
1
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
Wow! It works! AND.. 2.6 MB webm -> 48 MB gif ^^ -- any thought to reduce this?
– brubaker
Aug 4 '14 at 11:47
3
3
gifsicle is a fantastic tool to reduce gif size
gifsicle -O2 input.gif -o output.gif
– kenn
Aug 4 '14 at 11:52
gifsicle is a fantastic tool to reduce gif size
gifsicle -O2 input.gif -o output.gif
– kenn
Aug 4 '14 at 11:52
1
1
@BarafuAlbino Thanks buddy, but I got an error: "Unknown pixel format requested: rgb16."
– brubaker
Aug 4 '14 at 12:01
@BarafuAlbino Thanks buddy, but I got an error: "Unknown pixel format requested: rgb16."
– brubaker
Aug 4 '14 at 12:01
2
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
@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
2
2
rgb24
is not supported for gif, ffmpeg would use rgb8
instead automatically.– kxxoling
Jan 22 '17 at 8:59
rgb24
is not supported for gif, ffmpeg would use rgb8
instead automatically.– kxxoling
Jan 22 '17 at 8:59
|
show 9 more comments
Barafu's answer is alright. But, I 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
add a comment |
Barafu's answer is alright. But, I 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
add a comment |
Barafu's answer is alright. But, I 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
Barafu's answer is alright. But, I 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
answered 1 min ago
Raynal GobelRaynal Gobel
1575
1575
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f506670%2fhow-to-do-i-convert-an-webm-video-to-a-animated-gif-on-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
See How do I convert a video to GIF using ffmpeg, with reasonable quality? for some additional information.
– llogan
Aug 4 '14 at 16:20