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

Convert animated images to videos #261

Open
zachleat opened this issue Dec 13, 2024 · 2 comments
Open

Convert animated images to videos #261

zachleat opened this issue Dec 13, 2024 · 2 comments
Labels
enhancement New feature or request on hold

Comments

@zachleat
Copy link
Member

Format filtering suggested in #260 but it’d be even better if we could add a video output format for animated image input (convert gif input to mp4 output!)

@zachleat zachleat added the enhancement New feature or request label Dec 13, 2024
@zachleat
Copy link
Member Author

This is outside the realm of sharp so it will largely need a good dependency to help here.

@khalidabuhakmeh
Copy link

khalidabuhakmeh commented Dec 13, 2024

This is probably what you need. https://www.npmjs.com/package/fluent-ffmpeg

An equivalent command to convert a GIF to an MP4 might be the following:

ffmpeg -i input_gif -movflags faststart -c:v libx264 -pix_fmt yuv420p output_mp4

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

No branches or pull requests

2 participants