Open sneakers-the-rat opened 11 months ago
Daniel gave some verbal context for the use of uncompressed video in the repo - apparently there have been historical difficulties with compressed video. i was trying to run the demo pipeline to actually empirically test that but apparently .mp4
is explicitly unsupported and .mkv
passes the format check but fails since mkv files dont encode frame count in their header.
I see there is already a pull request to calculate frame count using the duration and framerate https://github.com/denisecailab/minian/pull/246
this is ~sort of what OpenCV does anyway, except the PR can't handle variable frame rates: https://github.com/opencv/opencv/blob/dc0c59fdc655bb4e1e83e6e4f8c2c33352e2baa4/modules/videoio/src/cap_ffmpeg_impl.hpp#L1901-L1910
An easier thing to do would probably be to just pass count_frames
to ffmpeg.probe
, which since you do an ffmpeg conversion to raw in the iterator anyway would mean that you should be able to get rid of the extension restrictions and just raise if there is some problem reading.
syntax for that would be
ffmpeg.probe(fname, count_frames=None)
anyway we're looking around to see which Ca imaging package to build on top of and it would be cool if it was this one, we are not having a fun time with Caiman unfortunately :(. if y'all aren't maintaining this anymore i will just buzz off and close this <3
what up phil, raymond and I are checking out what u gone and done to see how it lines up with what we wanna do, and on clone noticed bigg repo. github errored on trying to clone it a few times.
raising this bc the fix is relatively simple:
almost all of the space is taken up by version history and the demo movies:
Most of the large objects in the git history can re safely removed:
The videos are huge because they're uncompressed AVIs. since these are just demo videos, u can go from ~700MB down to ~7 with default ffmpeg x264 encoding
and then you can remove all the big files from the git history with git filter repo
or
--paths-from-file
if you make a file with a list of paths.That is a destructive change, but in this case if u don't plan on going back and trying out old versions of demo movies then it's the "ok" kind of destructive change.
anyway normally I would PR this but you can't really PR a change in git history, so just describing process here