exiv2
exiv2 copied to clipboard
exiv2 reports "corrupted metadata" where exiftool can extract them all
Describe the bug
On an Andoid-shot MP4 file exiv2 reports "corrupted metadata" while exiftool can extract them all.
To Reproduce
Steps to reproduce the behavior:
- Download the attached MP4 file
- run "exiv2 pr file.mp4"
- run "exiftool file.mp4"
Expected behavior
Both steps output media file metadata
Actual behavior
exiv2 reports corruption error exiftools works
Desktop (please complete the following information):
- OS and version: ArchLinux (up-to-date)
- Compiler and version: gcc (GCC) 12.1.0 (irrelevant?)
- Compilation mode and/or compiler flags: Packages come from distro repo.
Additional context
exiv2 0.27.5 exiftool 12.4
https://user-images.githubusercontent.com/5338874/168466332-67761d35-9357-4649-b001-9cf7d5219d4f.mp4
Hi @notorand-it,
I'm not very familiar with the mp4 handling in exiv2, but after looking into the corresponding source file (src/bmffimage.cpp
) it seems as if there is missing some code to parse all the boxes/atoms found in your video file.
The corrupted file error comes from exiv2 when it tries to read another box inside the meta
box, which seems to be not present or differently formatted as expected (see line 288 in src/bmffimage.cpp
).
I made some tests and when the boxHandler in line 295 is just called for the moov
, iprp
and ipco
tag, no error is thrown but no metadata is found either. To find the metadata I think more boxes have to be parsed.
This site can give some hints what boxes are present in your mp4 file and there are many more that exiv2 does not process...
I hope I could help a little bit
I'm not that familiar with this stuff, but here's where the creation_time
is from the mp4box.js
site:
This request targets the removed video functionality, to be specific quicktimevideo.cpp
. Please see https://github.com/Exiv2/exiv2/issues/1748 for further info
@benmccann please have a l👀l at https://mediaarea.net/ tools.
Video is very complex and full of bull$#17 $0ftwar€ patents.