Extract metadata from MOV (Quicktime) files
|Status:||New||Start date:||01 Aug 2009|
Is there already spoken of a feature that also can also read IPTC metadata from Quicktime movies?
#1 Updated by Steve Wright about 7 years ago
Old Mac OS / OS X user here (currently enjoying a "forced sojourn" in Windows XP Pro and Ubuntu). Not a developer or coder by any stretch, however.
I doubt there's a discrete "layer" or "block" in any or every MOV file from which meta information could be extracted. And even if there was, it's still a question of coming up with a reliable way to get at it.
From what I remember, it was easier to add or retrieve tags from the .mp4 format than .mov. The routine excuse that was always given was that, early on in the course of its development, Apple followed more than one "track" with the .mov format so that, in the end-up, several different methods of introducing relevant information to the file were developed (including the "hint" format of MOV, later revived for Quick Time Streaming Server), each one equally useful to content creators if not to the home user. And then they decided to add licensed, proprietary codecs, which meant puzzling out the best method of doing it the same way with (and sometimes in spite of) new and different tools to work with. Apple MPEG-4, being an MPEG-1 Layer 2 derivative, was newer and coders approached it from that perspective, with decidedly and understandably better results. MOV is a jungle of code and "we'll let you have this, but you have to pay for that" kind of thinking on both Apple's part and that of the licensors/lessors of the other codecs.
#5 Updated by Robin Mills over 1 year ago
There's code in the video codebase:
754 rmills@rmillsmbp:~/gnu/exiv2/trunk $ find . -name "*" | grep quick ./include/exiv2/quicktimevideo.hpp ./src/quicktimevideo.cpp 755 rmills@rmillsmbp:~/gnu/exiv2/trunk $And in the test files:
764 rmills@rmillsmbp:~/gnu/exiv2/testdata/trunk $ find . | grep quick ./video/video-quicktime.mp4We're going to have to revisit and spend time on the video code.
For the moment, I've gone over all the issues in Redmine and allocated them to one of three "Target versions":
v0.26: I hope we can ship that in spring 2016
Review: Most of those are ancient things and can be closed (or moved to v0.26 or v1.0)
When v0.26 is ready, the issue list should be around 30 items (all in 1.0) and we can decide what to target for v0.27. I hope we'll find a volunteer to work on the video code in v0.27.
I'm rather worried about loosing Niels. I've never understood the MakerNote and Niels has dealt so effectively with that.
#6 Updated by Robin Mills over 1 year ago
XMP can be stored in a quicktime (.mov) file. It's described in Adobe's spec: XMPSpecificationPart3.pdf p29. We have a QT test file exiv2/testdata/trunk/video/video-quicktime.mp4 however I don't believe it contains XMP.
I believe Abhinav's focus in the video-read project (GSoC2012) was to read "native" metadata in video file: duration, resolution and that kind of thing. He probably assumed (not unreasonably) that XMP should be handled by the existing XMPsdk. Mahesh followed Abhinav's lead and added write capability for the same "native" data.
Mahesh added some very good documents about the structure of RIFF and Matrovska files to the Wiki. http://dev.exiv2.org/projects/exiv2/wiki Perhaps I can use those document to implement -pS (printStructure) and -pX for video files. If nothing else, those will be useful tools before revisiting the "native" video code.
#941 is to upgrade to the latest XMPsdk and may provide Video/XMP support without additional effort by Team Exiv2. That might be available for v0.26.
For the moment, "native" video support is a build option and declared "experimental". I can't honestly seeing it getting attention in v0.26 and that's why I've set the Target version to 1.0.
#7 Updated by Alan Pater over 1 year ago
Yes, I have seen that quicktime (.mov) files CAN contain XMP, but the samples I have don't seem to contain an XMP block.
The specific .MOV file I am looking at is: http://dev.exiv2.org/attachments/374/DSC_5363.MOV
What confuses me is that exiv2 is still reporting the metadata in that file as Xmp.video properties even when the file does not contain any native XMP that I can see. Am I looking in the wrong place?
#8 Updated by Robin Mills over 1 year ago
I don't believe that file has XMP embedded. My (stupid) way of looking is to use 'strings' and grep it for 'adobe':
688 rmills@rmillsmbp:~/gnu/exiv2/trunk/test/data $ strings ~/Downloads/DSC_5363.MOV | grep adobe 689 rmills@rmillsmbp:~/gnu/exiv2/trunk/test/data $Here's an example where I find an xml block (I think you helped me with 922a)
686 rmills@rmillsmbp:~/gnu/exiv2/trunk/test/data $ strings exiv2-bug922a.jpg | grep adobe http://ns.adobe.com/xap/1.0/ " id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmp:Rating="0" xmp:ModifyDate="2015-02-13T20:46:51-06:00"> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">the rest drink soda</rdf:li> <rdf:li xml:lang="en-GB">the Brits are in the bar</rdf:li> <rdf:li xml:lang="de-DE">the Germans like beer</rdf:li> </rdf:Alt> </dc:title> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?> 687 rmills@rmillsmbp:~/gnu/exiv2/trunk/test/data $And pretty printing it with -pX yields:
$ exiv2 -pX exiv2-bug922a.jpg | xmllint -pretty 1 - <?xml version="1.0"?> <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="" xmp:Rating="0" xmp:ModifyDate="2015-02-13T20:46:51-06:00"> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">the rest drink soda</rdf:li> <rdf:li xml:lang="en-GB">the Brits are in the bar</rdf:li> <rdf:li xml:lang="de-DE">the Germans like beer</rdf:li> </rdf:Alt> </dc:title> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?> 688 rmills@rmillsmbp:~/gnu/exiv2/trunk/test/data $If you can find a .MOV file with embedded XMP, can you add it to this issue report and I'll use it when I implement -pS for quicktime files. And of course for matravoska, riff, and asf if you find them.
-rw-r--r--+ 1 rmills staff 66K 28 Jun 13:00 quicktimevideo.cpp -rw-r--r--+ 1 rmills staff 48K 28 Jun 13:00 riffvideo.cpp -rw-r--r--+ 1 rmills staff 30K 28 Jun 13:00 asfvideo.cpp -rw-r--r--+ 1 rmills staff 35K 28 Jun 13:00 matroskavideo.cppAnd it's quite possible that our video/XMP support is working OK already.
I can't say anything about reporting Xmp.Video anything. A bug maybe? I don't know. I've never thought about this.