Coder Social home page Coder Social logo

Comments (7)

almarklein avatar almarklein commented on April 30, 2024

Fixed per #26

from imageio.

almarklein avatar almarklein commented on April 30, 2024

The fix creates some other issues. Notably, because now some frames are skipped, the video is shorter, which causes problems with the reported length (a feature that I added in #24).

Currently the avbin plugin is in a bit of a hacky state, so we need to decide how to deal with this problem.

A few options:

  • Fix the problem for real. This would be preferred, but I don't know if this is possible.
  • Report a length of np.inf and skip black frames. I don't like this.
  • Report a finite length and just accept that we have black frames.
  • Skip the empty frames in the _open() function, and reduce the reported nframes with the number of frames skipped. This assumes empty frames only occur at the beginning. This means that the frames will be out of phase with ffmpeg, but at least all frames are non-empty.

A note: it seems that the cockatoo has at least 10 empty frames when run on Travis. Locally it's 5 or so. So this might be dependent on the system as well.

from imageio.

almarklein avatar almarklein commented on April 30, 2024

BTW: if you want to get the latest version of the avbin plugin, you need to pull in the latest master:

git checkout master
git remote add upstream https://github.com/imageio/imageio.git
git pull upstream master

To create a PR from here again:

git checkout -b new-branch-name
... do work
git commit -a
git push origin new-branch-name

from imageio.

dave-epstein avatar dave-epstein commented on April 30, 2024

I still have this problem with avbin, is there any known fix? Reading the same videos using the ffmpeg and the avbin plugins, the ffmpeg plugin works fine.

from imageio.

almarklein avatar almarklein commented on April 30, 2024

@dave-epstein since avbin is not maintained anymore (last release is from 2012), so I would not wait for a fix :) Actually, imageio should probably deprecate its plugin for it ...

from imageio.

dave-epstein avatar dave-epstein commented on April 30, 2024

Fair enough :) Would you recommend using ffmpeg then? Or is there a faster way to read a video into frames (maybe using a different tool altogether)?

from imageio.

almarklein avatar almarklein commented on April 30, 2024

Yes, ffmpeg is not perfect, but is the best-supported way (at least in imageio) to read video.

from imageio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.