Skip to content

Conversation

@domliang
Copy link
Contributor

@domliang domliang commented Jul 1, 2021

fix #95 with null-safety

@sbis04
Copy link
Owner

sbis04 commented Jul 1, 2021

Hi @domliang the real reason that I found while testing, the videos where this error is occurring don't contain proper Rotation information (so it is set to 0). You can also find some discussion about it here which causes various other video parsing issues (and it mostly affects the iOS device).

There's also a PR related to this which might fix this video parsing issue, here. But unfortunately, it isn't merged yet (and, it's a 2 year old PR 😞 ).

For example, I got an error like this using the video provided by @Vitaly-V:

TX and TY are 0. Rotation: 0. Natural width,height: 640.000000, 360.000000

This is the reason video_thumbnail package can't generate the thumbnails for that part of the video where it lacks the Rotation information (or, it is set to 0 by default).

For now, it's better to use this fix by reusing the previous correctly generated thumbnail where it returns null.

@sbis04
Copy link
Owner

sbis04 commented Jul 1, 2021

Thanks for this PR 🎉

LGTM

@sbis04 sbis04 merged commit 723c844 into sbis04:null-safety Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants