Old 09-22-2022, 05:00 PM   #1
Thunderfinger
Human being with feelings
 
Join Date: Jun 2020
Posts: 47
Default How To Set Media File ASWG/iXML Metadata

Hello, I'm trying to make a Lua script to modify the ASWG/iXML metadata of a selected take's BWF source file.

So far, I'm able to display the current ASWG metadata with reaper.GetMediaFileMetadata(), but there doesn't seem to be a function to setMediaFileMetadata for a specific item.

I see a possible way to achieve my goal by using a tool named "bwfmetaedit" from reascript (using os.execute, maybe?) to export an iXML, modify it, and re-import it. However, that seems a bit convoluted to me, and I'd like to avoid having to install another application.

Is there a way to read a BWF's iXML chunk directly in LUA and to modify the values?

Thank you!
Thunderfinger is offline   Reply With Quote
Old 09-23-2022, 03:31 AM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,515
Default

Hi,


You have indeed to use either bwfmetaedit cli, or make your own iXML injection function using wav file parsing.
I got the request few days weeks ago.



Cheers !
X-Raym is offline   Reply With Quote
Old 09-23-2022, 04:20 AM   #3
Thunderfinger
Human being with feelings
 
Join Date: Jun 2020
Posts: 47
Default

Ok, thanks a lot for the answer X-Raym! I'm glad to know I'm on the right track.

Last edited by Thunderfinger; 09-23-2022 at 04:55 AM. Reason: Typo
Thunderfinger is offline   Reply With Quote
Old 09-23-2022, 12:08 PM   #4
Thunderfinger
Human being with feelings
 
Join Date: Jun 2020
Posts: 47
Default

Quick update, I managed to make it all work with bwfmetaedit cli. So now the next step, learning how to parse a wav file to bypass bwfmetaedit!
Thunderfinger is offline   Reply With Quote
Old 09-23-2022, 03:01 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,515
Default

I would avoid that road if possible ^^


I have some advanced wave parser / injector etc it is really complicated. Not really fun scripting. ^^


I think bwfmetaedit CLI has ixml inject as well so better use this :P
X-Raym is offline   Reply With Quote
Old 09-23-2022, 04:20 PM   #6
Thunderfinger
Human being with feelings
 
Join Date: Jun 2020
Posts: 47
Default

Haha, ok, I'll trust your expertise on this and I won't go down the wav parsing rabbit hole. Bwfmetaedit indeed does the iXML injection too, it was very easy to setup. Thanks again for the advice!
Thunderfinger is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.