ffmpeg backend, thoughts?
So I've noticed Thumbor has https://github.com/theatlantic/thumbor-video-engine
Was wondering if @cshum has any thoughts on this, or if there is any ongoing effort to add ffmpeg as a backend (or something else that can do video, alongside vips) and/or what steps would be involved to do this?
Would be crazy useful to have the same basic interface with some different options for video.
Could just call whatever version of ffmpeg is on the host to Keep It Simple. :thinking:
Thanks and keep up the amazing work.
Hi @gnat nice suggestions! I have actually had some thought on this for a while.
This requires implementing the Processor interface https://github.com/cshum/imagor/blob/master/imagor.go#L41, which the Process method involve taking in the source video Blob and returning the converted image Blob.
Imagor supports stacking multiple backend https://github.com/cshum/imagor/blob/master/imagor.go#L60 by logic. So on paper it should be possible to have ffmpeg backend that converts video to image, then pass to vips backend for all the fancy operations (resize, crop, watermark etc).
Though of course adding a entirely new processing backend still requires significant amount of effort and understanding of ffmpeg. Another concern is the docker image size after ffmpeg is included, and how it should be packaged.
But if anyone is willing to take an initiative on this, via a draft pull request, a separated package or anything similar, I am very keen to help out and collaborate :)
@gnat check out imagorvideo!
Lets redirect to the imagorvideo repo for further discussions:
https://github.com/cshum/imagorvideo
WOW! nice work @cshum :crown:
really nice to have an example of such a major imagor extension too!