Skip to content

No more automatic downloads #178

Closed
Closed

Description

@almarklein

Currently, imageio will automatically download certain files when needed:

  • a set of standard images, like chelsea.png and astronaut.png.
  • the freeimage library
  • the avbin library
  • the ffmpeg executable

Downloading of standard images should stay, in my opinion, but automatic downloading of executables or libraries is a bit curious. We sort of needed it to make the freeimage plugin Just Work, which provides the majority of formats, but now that we rely on Pillow (#167) this is much less of a problem.

In #167, the automatic downloading of libraries and executable is therefore removed. Instead an exception will be raised that displays a message of a function to call to explicitly download the exe/lib, e.g. imageio.plugins.ffmpeg.download().

I think this is ok for FreeImage, and avbin is sort of redundant with ffmpeg anyway, but it makes the ffmpeg plugin not just work.

@Zulko will probably want to be aware of this. The exceptions mentioned above are imageio.core.NeedDownloadError instances, so you can catch them specifically.

For people using conda to install Moviepy we can make it easy. Since ffmpeg is available as a conda package (on conda-forge), maybe imageio should be made to be able to make use of it (if it not already does), and Moviepy's conda package can add it as a dependency.

Activity

  1. ghisvail commented on Dec 9, 2016

    @ghisvail
    Contributor

    Downloading of standard images should stay

    Are they really so big to be worth the hassle of keeping them separate from the source tree and requiring an additional download step?

    Reason I am asking is that they are required for running the tests, but Linux distributions usually prevent fetching of remote content at build time to avoid potential tempering with the source tree. Making them available under say data would make things way easier.

  2. almarklein commented on Dec 9, 2016

    @almarklein
    MemberAuthor

    I am reluctant to put binaries into the source repo. So if we can find another solution, I'd much prefer that.
    They are going to be packaged in the source dist on Pypi, does that help?

  3. ghisvail commented on Dec 9, 2016

    @ghisvail
    Contributor
  4. jni commented on Dec 9, 2016

    @jni
    Contributor

    I've used GitHub LFS (large file storage) in another project and am quite happy with it. I just don't know whether it will ever migrate to base git, so that might make you reluctant to use it also.

  5. almarklein commented on Jan 3, 2017

    @almarklein
    MemberAuthor

    Closing, this was mainly an issue to notify @Zulko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions