Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Evaluation of gifski #457

Open
pr8x opened this issue Nov 12, 2019 · 3 comments
Open

Evaluation of gifski #457

pr8x opened this issue Nov 12, 2019 · 3 comments

Comments

@pr8x
Copy link

pr8x commented Nov 12, 2019

If you're fine with the license one could consider integrating Gifski. The current gif encoding is really unoptimized and produces giant files.

@vatterspun
Copy link

fine with the license

As far as I'm aware, MIT and AGPL are compatible, both being on the more permissive end of the spectrum. IIRC, using code from the Gifski program would mean you'd need to to add that to your license notice.

@pr8x
Copy link
Author

pr8x commented Jan 16, 2020

I can actually look into implementing this. Shouldn't be too hard, tbh.

@MathewSachin
Copy link
Owner

@pr8x I'd be happy to accept your contribution.

It seems easy to implement but there are a few things to take care of:

  1. We need the project to be as modular as possible.
    So, start by creating a new .NET C# project in the solution folder, preferably named Captura.Gifski.

  2. Include the license file in the licenses folder. I'm still not sure about license compatibility though.

  3. We'll be using Gifski as an executable and not as a library to avoid licensing issues.
    An option is needed to specify the path to gifski.exe which fallbacks to some defaults if not specified like what we have for FFmpeg.

  4. We'll not be distributing Gifski with Captura to avoid increasing download sizes.
    Optionally, we could implement a Gifski downloader, as we have done for FFmpeg.

  5. Now, getting to the implementation. Start by inheriting from the IVideoConverter interface. See FFmpegVideoConverter for example.

    We'll follow the usage mentioned on Gifski README.

    Use ffmpeg command to convert any video to PNG frames:

    ffmpeg -i video.webm frame%04d.png
    

    and then make the GIF from the frames:

    gifski -o anim.gif frame*.png
    
  6. Parsing the Gifski output to report progress from within IVideoConverter.

  7. There might be some things that I missed but these are the ones I feel are the most important to get started. I'll update if anything else comes to mind.


PS: I'm a bit busy with my studies right now, this being my pre-final year and all. But, I'll try to help you to the best of my ability as time permits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants