BWFMetaEdit
BWFMetaEdit copied to clipboard
Inserting XMP metadata using the CLI on Debian
I've tried inserting some XMP metadata into a wav file using the debian cli tools but it doesn't seem to work. The blob is something i found online:
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.0-c316 44.253921, Sun Oct 01 2006 17:14:39">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
... snip ....
<xapMM:InstanceID>uuid:1a365cee-e070-4b52-8278-db5e46b20a4c</xapMM:InstanceID>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
And the command I ran (and output) is (the XML snippet above is in a file called AA1-002-A.wav.XMP.xml):
$ bwfmetaedit --continue-errors --verbose --in-XMP-xml AA1-002-A.wav
2021-04-15 01:20:01 AA1-002-A.wav: Is open
2021-04-15 01:20:01 AA1-002-A.wav: xmp, (empty) --> (XML data)
2021-04-15 01:20:01 AA1-002-A.wav: Is modified
When I try to spit it back out I get nothing back:
$ bwfmetaedit --continue-errors --verbose --out-XMP-xml AA1-002-A.wav
2021-04-15 01:21:24 AA1-002-A.wav: Is open
2021-04-15 01:21:24 AA1-002-A.wav: Nothing to do
Yet the same snippet can be inserted and then exported using the MacOS GUI version.
Please help!
I think is related to #51
Currently the --out-XMP-xml option doesn't output the XMP content to screen but saves it in
hi @g-maxime I'm not getting the .XMP.xml file. It seems odd to me when I try to insert the XMP data the output says xmp, (empty)
.
Almost like the data is not being read by the tool.
2021-04-15 01:20:01 AA1-002-A.wav: xmp, (empty) --> (XML data)
Anyway here's a log from a run just now:
- ls to check file sizes
- the run
- ls to check file sizes
$ ls -l
total 536328
-rw-r--r-- 1 debian debian 549189460 Apr 15 01:20 AA1-002-A.wav
-rw-r--r-- 1 debian debian 2288 Apr 15 00:01 data.xml
$ cp data.xml AA1-002-A.wav.XMP.xml
$ bwfmetaedit --continue-errors --verbose --in-XMP-xml AA1-002-A.wav
2021-04-15 08:46:14 AA1-002-A.wav: Is open
2021-04-15 08:46:14 AA1-002-A.wav: xmp, (empty) --> (XML data)
2021-04-15 08:46:14 AA1-002-A.wav: Is modified
$ ls -l
total 536332
-rw-r--r-- 1 debian debian 549189460 Apr 15 08:46 AA1-002-A.wav
-rw-r--r-- 1 debian debian 2288 Apr 15 08:46 AA1-002-A.wav.XMP.xml
-rw-r--r-- 1 debian debian 2288 Apr 15 00:01 data.xml
Note file size of 549189460 for AA1-002-A.wav before and after. It should be different shouldn't it?
Also, here's a screenshot of the GUI tool on macos with that file after the insert - no XMP data.

Which Debian and BWF versions do you use?
$ bwfmetaedit --version BWF MetaEdit 20.08
$ lsb_release -a Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster
hi @JeromeMartinez
It's now working with bwfmetaedit_20.08.20210414-1_amd64.Debian_10.deb. Thankyou!
$ bwfmetaedit --version
BWF MetaEdit 20.08.20210414
$ ls -l
total 536332
-rw-r--r-- 1 debian debian 549189460 Apr 15 08:46 AA1-002-A.wav
-rw-r--r-- 1 debian debian 2288 Apr 15 08:46 AA1-002-A.wav.XMP.xml
-rw-r--r-- 1 debian debian 2288 Apr 15 00:01 data.xml
$ bwfmetaedit --continue-errors --verbose --in-XMP-xml AA1-002-A.wav
2021-04-15 10:47:45 AA1-002-A.wav: The audio is 2 channels and 192 bytes per sample; however, the data chunk is not aligned to a multiple of 384 (2*192).
2021-04-15 10:47:45 AA1-002-A.wav: Is open
2021-04-15 10:47:45 AA1-002-A.wav: xmp, (empty) --> (XML data)
2021-04-15 10:47:45 AA1-002-A.wav: Is modified
2021-04-15 10:47:45 AA1-002-A.wav: The audio is 2 channels and 192 bytes per sample; however, the data chunk is not aligned to a multiple of 384 (2*192).
$ rm AA1-002-A.wav.XMP.xml
$ bwfmetaedit --continue-errors --verbose --out-XMP-xml AA1-002-A.wav
2021-04-15 10:49:12 AA1-002-A.wav: The audio is 2 channels and 192 bytes per sample; however, the data chunk is not aligned to a multiple of 384 (2*192).
2021-04-15 10:49:12 AA1-002-A.wav: Is open
2021-04-15 10:49:12 AA1-002-A.wav: Nothing to do
$ ls -l
total 536336
-rw-r--r-- 1 debian debian 549191756 Apr 15 10:47 AA1-002-A.wav
-rw-r--r-- 1 debian debian 2288 Apr 15 10:49 AA1-002-A.wav.XMP.xml
-rw-r--r-- 1 debian debian 2288 Apr 15 00:01 data.xml
debian@modern-pdsc:~/tmp/AA1-002$
However - the remove command is not working:
$ bwfmetaedit --continue-errors --verbose --in-aXML-remove AA1-002-A.wav
2021-04-15 10:51:56 AA1-002-A.wav: The audio is 2 channels and 192 bytes per sample; however, the data chunk is not aligned to a multiple of 384 (2*192).
2021-04-15 10:51:56 AA1-002-A.wav: Is open
2021-04-15 10:51:56 AA1-002-A.wav: Nothing to do
$ bwfmetaedit --continue-errors --verbose --out-XMP-xml AA1-002-A.wav
2021-04-15 10:52:08 AA1-002-A.wav: The audio is 2 channels and 192 bytes per sample; however, the data chunk is not aligned to a multiple of 384 (2*192).
2021-04-15 10:52:08 AA1-002-A.wav: Is open
2021-04-15 10:52:08 AA1-002-A.wav: Nothing to do
$ ls -l
total 536336
-rw-r--r-- 1 debian debian 549191756 Apr 15 10:47 AA1-002-A.wav
-rw-r--r-- 1 debian debian 2288 Apr 15 10:52 AA1-002-A.wav.XMP.xml
-rw-r--r-- 1 debian debian 2288 Apr 15 00:01 data.xml
However - the remove command is not working:
bwfmetaedit ... --in-aXML-remove ...
`bwfmetaedit ... --out-XMP-xml ...``
--> No the same xml field.
Tested with --in-XMP-remove
, working for me.