Skip to content

[fyi][video] Video clip creation fails on YFCC #1327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bjuncek opened this issue Sep 11, 2019 · 5 comments
Open

[fyi][video] Video clip creation fails on YFCC #1327

bjuncek opened this issue Sep 11, 2019 · 5 comments

Comments

@bjuncek
Copy link
Contributor

bjuncek commented Sep 11, 2019

Culprit:

known bug in H264 decoding

For certain filetypes - specifically some related to YFCC100m dataset - there is an error whilst creating the VideoClips object. Not 100% sure what is the best way of fixing the issue (other than try-catch in read_video_timestamps.

Even if the fix is not critical, we should make sure that is caught in C++ or future versions.


Sample YFCC video in question:

27b66931edb88a5f7e6c756ea65fd8.mp4
there are at least 50 of them, probably more.

Minimal repro example

video_list = ['~/yfcc100m/mp4/27b/669/27b66931edb88a5f7e6c756ea65fd8.mp4']
VideoClips(video_list, 8, 1)

or even simpler

import av
container = av.open('~/yfcc100m/mp4/27b/669/27b66931edb88a5f7e6c756ea65fd8.mp4')
for idx, frame in enumerate(container.decode({'video': 0})):
    pass

Output error stack:

Invalid NAL unit size (34173 > 22144).
Error splitting the input into NAL units.
stream 1, offset 0x16baf66: partial file
Invalid NAL unit size (24747 > 6180).
Error splitting the input into NAL units.
@fmassa
Copy link
Member

fmassa commented Sep 23, 2019

Can you see if with the new video reader from @stephenyan1231 this is still an issue?

@bjuncek
Copy link
Contributor Author

bjuncek commented Sep 26, 2019

Yup - using 'video-reader' backend solves the issue.
Let me know if we want to close this or keep it open until the new backend is rolled out by default

@fmassa
Copy link
Member

fmassa commented Sep 30, 2019

Let's keep this open, we can probably fix it on the PyAV-based read_video. I think it might just require adding a proper try: except there. Could you have a look at it and see if we can catch it nicely?

@bjuncek
Copy link
Contributor Author

bjuncek commented Sep 30, 2019

S.G.

@fmassa yeah, but probably not before Wednesday :|

@fmassa
Copy link
Member

fmassa commented Sep 30, 2019

no worries

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

No branches or pull requests

2 participants