0

I'm using this to join screenshots into a movie

ffmpeg -hide_banner -loglevel error -framerate 1 -pattern_type glob -i "$1" -c:v libx264 -pix_fmt yuv420p $2

But is there a way to translate this command into ffmbeg-python python command?

If you could do it for me, please help!

1 Answer 1

0

The documentation is quite helpful and includes the following example:

Assemble video from sequence of frames

glob

(
    ffmpeg
    .input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=25)
    .output('movie.mp4')
    .run()
)

So try something like this:

glob

(
    ffmpeg
    .input('/path/to/jpegs/*.jpg', pattern_type='glob', framerate=1)
    .output('movie.mp4',pix_fmt='yuv420p')
    .run()
)

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you! But what does 'glob' do? And, so I basically import the module and paste that thing in?
As I said. The documentation is quite helpful. Read this github.com/kkroening/ffmpeg-python
And here's the API Reference: kkroening.github.io/ffmpeg-python

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.