You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is already implemented. Simply use the --package-dir option and the ffmpeg binary will be downloaded to the package directory / resources.
[EDIT]
I just realized that you intend to move the ffmpeg binary into the binary wheel. Still, the same applies. It should work if you migrate the original code from the imageio plugin.
BTW: What about source tarballs on PyPI? Will they also contain the binary?
Yeah the imageio_download_bin will no longer work for ffmpeg. So to summarize:
This new imageio_ffmpeg library will have the ffmpeg exe included in its "binaries" subdirectory. That is, on the platforms for which there are wheels.
We'd need to add a hook to PyInstaller, quite similar to the one you linked, I suppose.
We might need to add a little code in the get_ffmpeg_exe() function to look in alternative places when frozen?
What about source tarballs on PyPI? Will they also contain the binary?
No, only the wheels. And there will still be a tarball on Pypi, so you can (surely pip has a flag for that?) install the lib without the binary, and supply one yourself.
Just a reminder, mostly for my future self, for when I inevitably forget it: those who installed imageio-ffmpeg with conda have no ffmpeg binary under the "resources" folder. Modify the hook or use pip instead of conda.
Activity
almarklein commentedon Feb 5, 2019
This relates to imageio/imageio#271 cc @paulmueller
paulmueller commentedon Feb 5, 2019
I think this is already implemented. Simply use the
--package-diroption and the ffmpeg binary will be downloaded to the package directory / resources.imageio_download_bin --package-dir ffmpegFor PyInstaller, at least, the following built-in hook makes sure the binaries end up in the final distribution build:
https://github.com/pyinstaller/pyinstaller/blob/develop/PyInstaller/hooks/hook-imageio.py
I experienced no problems with this approach.
reference: https://github.com/ZELLMECHANIK-DRESDEN/ShapeOut/blob/master/appveyor.yml#L82
[EDIT]
I just realized that you intend to move the ffmpeg binary into the binary wheel. Still, the same applies. It should work if you migrate the original code from the imageio plugin.
BTW: What about source tarballs on PyPI? Will they also contain the binary?
almarklein commentedon Feb 5, 2019
Yeah the
imageio_download_binwill no longer work for ffmpeg. So to summarize:No, only the wheels. And there will still be a tarball on Pypi, so you can (surely pip has a flag for that?) install the lib without the binary, and supply one yourself.
paulmueller commentedon Feb 5, 2019
I will create a PR for the hook and let you know how things work out. I believe that there will be no problem, if we use
pgk_resources.almarklein commentedon Feb 5, 2019
That would be great!
marnunez commentedon Jun 1, 2021
Just a reminder, mostly for my future self, for when I inevitably forget it: those who installed imageio-ffmpeg with conda have no ffmpeg binary under the "resources" folder. Modify the hook or use pip instead of conda.
paulmueller commentedon Mar 14, 2022
Sorry for replying just now. I did a quick check and it looks like this is already implemented with
pkg_resources. So it should work. Doesn't it?almarklein commentedon Mar 15, 2022
I guess so, but this has not yet been confirmed.
paulmueller commentedon Mar 15, 2022
For me it works fine on Windows. Currently there is only imageio/imageio#766 in the way.
paulmueller commentedon Mar 15, 2022
It also works on linux. I think this one can be closed.
almarklein commentedon Mar 15, 2022
Thanks for the confirmation, we can close!