mindeng / nom-exif

Exif/metadata parsing library written in pure Rust, both image (jpeg/heif/heic/jpg/tiff etc.) and video/audio (mov/mp4/3gp/webm/mkv/mka, etc.) files are supported.
https://crates.io/crates/nom-exif
MIT License
43 stars 6 forks source link

Unsupported mov file? #7

Closed wsyxbcl closed 2 months ago

wsyxbcl commented 2 months ago

Here are a sample files, hope it's helpful. Google drive is used due to github file size limit.

There are also some mp4 files that can not be recognized, will provide you example later if you're interested.

mindeng commented 2 months ago

Thank you so much! I will check and fix the problem as soon as possible!

If it is convenient, please help provide other mp4 files that cannot be parsed, thank you!

mindeng commented 2 months ago

This issue has been fixed. The reason for the issue was that in the previous implementation, when the moov box was not found, it was treated as an error and stopped parsing subsequent metadata. The current implementation ignores this problem and continues to parse subsequent metadata.

If interested, you can refer to this commit.

You can try the new version and see if there are any problems with other videos. Thanks again for your feedback!

wsyxbcl commented 2 months ago

Thanks for the quick fix and detailed explanation.

If it is convenient, please help provide other mp4 files that cannot be parsed.

I currently only have media from a few camera models, and I'll test data from more camera models next week. Here's one of those files for you to try. Google drive link

Thank you for being interested.

mindeng commented 2 months ago

I did a test using the file you uploaded later, and I did find a new problem. When calculating duration, due to the large time_sacle of the file, the multiplication overflowed, thus reporting a parsing failure.

The new implementation fixes this problem and uses the f64 type for durationcalculations, which will no longer cause overflow.

If you find other issues,please feel free to file a bug, thank you!