Malabarba / camcorder.el

Tool for capturing screencasts directly from Emacs.
GNU General Public License v2.0
109 stars 8 forks source link

Use recent-ish ffmpeg improved gif output #5

Closed EphramPerdition closed 5 years ago

EphramPerdition commented 9 years ago

I just used camcorder.el for the first time and although getting a gif was as easy as picking a fight with the hulk, the output quality with ffmpeg was quite bad with dithering artifcats.

a search uncovered he fact that ffmpeg landed some major improvements to this earlier this year: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html https://superuser.com/a/556031

In particular the two-pass solution with a calculated pallete resulted in far better output.

Compare: old With:

new

Malabarba commented 9 years ago

Indeed, that looks much nicer. Would you like to submit a PR with an extra command option?

EphramPerdition commented 9 years ago

Sorry, No. I fiddled with things until I got what I wanted but I'd have to experiment a lot more to figure out something that should work for everyone (it doubled the filesize, for one. Or maybe I just used a higher frame rate) and I don't want to spend that much time on this.

So just a helpful pointer for other users experiencing the same issue.

Malabarba commented 9 years ago

No problem. Thanks for the pointer. I'll try that myself when I have a moment.

DamienCassou commented 8 years ago

I've used the same process. Here are my commands:

$ ffmpeg -i input.ogv -vf palettegen input.palette.png
$ ffmpeg -i input.ogv -i input.palette.png -filter_complex paletteuse input.gif
jcaw commented 5 years ago

I've used the same process. Here are my commands:

$ ffmpeg -i input.ogv -vf palettegen input.palette.png
$ ffmpeg -i input.ogv -i input.palette.png -filter_complex paletteuse input.gif

I've opened a pull request implementing this as the new default command (the original is kept as a fallback in case people want the smaller file size).