kkroening / ffmpeg-python

Python bindings for FFmpeg - with complex filtering support
Apache License 2.0
10.01k stars 886 forks source link

Not really bindings? #547

Open vvzen opened 3 years ago

vvzen commented 3 years ago

Hi!

I'm not really an expert of the library, but I stumbled here looking for "real" python libraries that were using ffmpeg bindings. By looking around a bit, it seems instead that what you're doing is really just subprocessing (eg: https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_run.py ) while in the Readme of this repo you describe it as Python bindings for FFmpeg .

A binding is generally considered as a way to make calls from one programming language to the other, generally using foreign function interfaces, see also: https://en.wikipedia.org/wiki/Language_binding .

So I came here expecting that this library was making calls to the ffmpeg C core from a python API, which would have been super cool! Instead, it seems to be a wrapper over the command line interface. Can you tell me if my understanding of how this library really works is correct?

Thanks!

Valerio

Saya47 commented 3 years ago

You are correct, it's a wrapper. From the readme:

You can run stream.get_args() before stream.run() to retrieve the command line arguments that will be passed to ffmpeg. You can also run stream.compile() that also includes the ffmpeg executable as the first argument.

vvzen commented 3 years ago

Do you think it would be possible to remove the part of the readme where it refers to it as python bindings for ffmpeg, and instead call it a wrapper of the ffmpeg cli instead? It would be more accurate, since calling it binding can be a bit misleading (I got my hopes high when I landed here and then I realised it wasn't what I though it was!). Thanks!

V

Saya47 commented 3 years ago

The only way to find out is to for the project, edit the readme file and include your changes and submit a pull request. You can explain your reasoning in the description when making the pull request as well. Good luck!

vvzen commented 3 years ago

Thanks @Saya47 ! Somehow I thought you were the main maintainer! 😅

radiolondra commented 3 years ago

Good luck is the right answer... there are so many posts here without any answer from months!