Comments (7)
Fixed per #26
from imageio.
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.
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.
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.
@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.
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.
Yes, ffmpeg is not perfect, but is the best-supported way (at least in imageio) to read video.
from imageio.
Related Issues (20)
- imageio.imread changes the values of graycale pixels, try to read 12-bit png grayscale image. HOT 8
- super slow video reads HOT 6
- imageio v2.33.0 requieres Pillow>=9.1.0 for GIFs HOT 1
- Trouble using freeimage plugin on MacOS arm64 HOT 2
- 2.33.1: pytest is failing in 5 units HOT 1
- [Question] What tonemapping method does the imageio library use when reading HDR images? HOT 2
- title of the gif got stacked together HOT 2
- UnicodeDecodeError if metadata is not UTF-8 encoded (pyav plugin) HOT 3
- [request] more color/palette control on GIF writing HOT 3
- Transition from v2 ffmpeg read/write to v3 pyav read/write: quality, batching HOT 7
- AttributeError: 'SeekableFileObject' object has no attribute 'readline' HOT 1
- Find out what kwargs are available for each function
- Only partial DICOM layers loading in Google Colab using imageio.volread HOT 6
- How to suppress FFMPEG warning for BluRay files? HOT 1
- How to add a pause between loops of a GIF? HOT 1
- Wrong time unit in documentation of pillow_legacy
- support read gzip data in .nrrd file HOT 2
- can I get frame image filename in imiter when using ffmpeg plugin?
- Test failures with NumPy 2.0.0rc1 HOT 1
- Please make it possible to run tests against `test_images` without Internet access
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageio.