CMU-INF-DIVA / avi-r

AVI-R Package (formerly DIVA IO): A robust reader for AVI video files

Home Page:https://pypi.org/project/avi-r/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssertionError: Unreordered bidirectional frame occured

azuryl opened this issue · comments

commented

ubuntu16.04 cuda10.1

File "/app/divaio/video/reader.py", line 258, in _fix_missing
'Unreordered bidirectional frame occured.' + self._assert_msg
AssertionError: Unreordered bidirectional frame occured. Please report /home/videos/2018-03-12_10-20-00_10-25-00_bus_G331.avi to Lijun.

Hi! Thanks for the report. I have reproduced your finding on this video. This assertion occurs when the reorder buffer is not large enough to correct the frame order. Its default value of 5 frames passed the test on the videos of KF1 annotation, but this video would need a larger one.

Set buffer_size=30 at this line would fix it, but may (very) slightly reduce the speed. I'll further test its effect and probably make this a public parameter. Meanwhile, you can use the temporary fix above.

commented

ok I will try it thank you

The reorder buffer is now re-designed in v1.1 with speed improvement. As the package has been renamed and published to PyPI, you can install the latest version by

pip install -U avi-r

and change the import line in your code from from diva_io.video import VideoReader to from avi_r import AVIReader as VideoReader.