Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg backend, thoughts? #85

Closed
gnat opened this issue Jul 25, 2022 · 5 comments
Closed

ffmpeg backend, thoughts? #85

gnat opened this issue Jul 25, 2022 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gnat
Copy link

gnat commented Jul 25, 2022

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. 🤔

Thanks and keep up the amazing work.

@cshum
Copy link
Owner

cshum commented Jul 25, 2022

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 :)

@cshum cshum added enhancement New feature or request help wanted Extra attention is needed labels Aug 2, 2022
@cshum
Copy link
Owner

cshum commented Sep 9, 2022

@gnat check out imagorvideo!

@cshum
Copy link
Owner

cshum commented Sep 9, 2022

Lets redirect to the imagorvideo repo for further discussions:

https://github.com/cshum/imagorvideo

@cshum cshum closed this as completed Sep 9, 2022
@gnat
Copy link
Author

gnat commented Sep 9, 2022

WOW! nice work @cshum 👑

@gnat
Copy link
Author

gnat commented Sep 9, 2022

really nice to have an example of such a major imagor extension too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants