(Translated by https://www.hiragana.jp/)
Convert PIL images or image sequence to FFMPY video · Issue #66 · Ch00k/ffmpy · GitHub
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 PIL images or image sequence to FFMPY video #66

Open
BootsManOut opened this issue May 21, 2023 · 0 comments
Open

Convert PIL images or image sequence to FFMPY video #66

BootsManOut opened this issue May 21, 2023 · 0 comments

Comments

@BootsManOut
Copy link

BootsManOut commented May 21, 2023

Hello there!

I would like to know how I can transfer PIL images to FFMPY to save it as video, or gif, since the PIL library's quantization method has strong quality losses in certain cases.
I did not find any information on the topic online, beside one post with PIL to FFMPEG that I wasn't able to apply to my case.
What is the right way to code to do this?

If I have for example this setup to begin with:

import ffmpy
import PIL
from PIL import Image as Img

images = [Img.open('frame 1.png'),Img.open('frame 2.png')]
ff = ffmpy.FFmpeg(
    inputs={images ?: None},#How do I insert PIL images here?
    outputs={'output.gif': None},
    executable='ffmpeg\\bin\\ffmpeg.exe')
ff.run()

How would I proceed to convert and save the images as a video using FFMPY?

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

No branches or pull requests

1 participant