MathewSachin / Captura

Capture Screen, Audio, Cursor, Mouse Clicks and Keystrokes
https://mathewsachin.github.io/Captura/
MIT License
9.7k stars 1.81k forks source link

FFmpeg gif colors #425

Closed lilive closed 5 years ago

lilive commented 5 years ago

Hi,

Congrats, and thanks for sharing this app. I'm giving it a try because it have some great functionnalities my actual screencasting tools don't have (draw stokes over a screencast, pause/resume the recording, mouse and keyboard overlay).

As mentioned here the GIF files are too large with the provided Gif video encoder, and I have tried the FFmpeg/Gif option. It work really fine except for the colors.

Here's the expected result: 2019-06-19_21-44-35

And here's the actual gif produced by Captura/FFmpeg/Gif: 2019-06-19-21-45-16 The color artifacts are quite pretty in this exemple, but they can be visualy disturbing in other situations.

For information, I have used ShareX to produce the first gif. Here's the relevant part of the app log:

ffmpeg.exe -y -rtbufsize 100M -f gdigrab -framerate 8 -offset_x 586 -offset_y 341 -video_size 260x222 -draw_mouse 1 -i desktop -c:v libx264 -r 8 -preset ultrafast -tune zerolatency -qp 0 "output.mp4"
ffmpeg.exe -y -i "output.mp4" -vf "palettegen=stats_mode=full" "C:\Program Files\ffmpeg\bin\palette.png"
ffmpeg.exe -y -i "output.mp4" -i "C:\Program Files\ffmpeg\bin\palette.png" -lavfi "paletteuse=dither=sierra2_4a" "output.gif"

For my use case, color improvement for gif recording will be great. For now, this problem stop me to switch to Captura for gif recording. But congrats again for your work !

MathewSachin commented 5 years ago

Thank you for your complients. I'd already done a fix regarding this issue. Try using a pre-release build.

lilive commented 5 years ago

Yeah ! Colors are fine now, bravo ! Thank you for this quick answer.

You could be interesting on this feedback: I made another comparison between Captura and ShareX

Captura: 2019-06-21-16-07-46

ShareX: 2019-06-21_16-08-51

In this exemple the ShareX colors are just a little bit better, see the border of the green disk, but perhaps this will be the opposite with another exemple.

The file size is also a little bigger for Captura (399kB vs 304kB). First I've got an huge difference (1.72MB for Captura), but this was before I figured that I have to set the video quality to maximum. I think I understand the reason of this behavior, which seems at first counterintuitive !

Anyway, as I said, Captura has got many other advantages for me (pause/resume and drawing strockes are damn convenients), and I will use Captura the next time I'll have to make screencasts.

Cheers.

lilive commented 5 years ago

I don't close this ticket because perhaps you keep it opened to remember that gifs may still be improved a litte bit (my last post). But you can close it, there is no bug anymore.

I just saw you haven't close the ticket, actually I went back here to let you know that I have created a record in framalibre about Captura (framalibre is a french directory for open source software and other free stuffs).