decoding iXML data from BWF files

Locked
filmo
User
Posts: 22
Joined: Fri Dec 08, 2006 7:16 pm
Location: Los Angeles

decoding iXML data from BWF files

Post by filmo » Fri Mar 26, 2010 7:18 pm

BWF (Broadcast Wave Files) contain metadata in the BEXT chunk. Many also now contain an iXML chunk that has a wealth of file information.

ID3 supports decoding the BEXT chucnk, but currently only outputs:

Code: Select all

                    [iXML] => Array
                        (
                            [0] => Array
                                (
                                    [offset] => 878
                                    [size] => 5226
                                )

                        )

                    [fmt ] => Array
For the iXML chunk. I'd like to request future version also decode the iXML data chunk.

Pernod
getID3() contributor
Posts: 103
Joined: Sat Mar 21, 2009 5:30 pm
Are you a spambot?: no
Location: London, UK
Contact:

Re: decoding iXML data from BWF files

Post by Pernod » Sat Mar 27, 2010 12:04 pm

Where can I find an example of a BWF file?

James Heinrich
getID3() v1 developer
Posts: 1474
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: decoding iXML data from BWF files

Post by James Heinrich » Sun Dec 05, 2010 8:21 pm

If you send a (link to a) sample file to info@getid3.org I'll look at making that for the next release.

James Heinrich
getID3() v1 developer
Posts: 1474
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: decoding iXML data from BWF files

Post by James Heinrich » Wed Aug 17, 2011 1:49 pm

Thanks for the sample file. iXML data in WAV files now returned in [riff][WAVE][iXML][0][data] and parsed into [riff][WAVE][iXML][0][parsed] (when possible, requires simplexml_load_string and get_object_vars).

I've heard that iXML data may also appear in QuickTime files. If anyone has a sample of this, I'd appreciate a sample so I can add iXML parsing to the quicktime module too.
Attachments
module.audio-video.riff.php
add support for returning/parsing iXML chunk
(110.46 KiB) Downloaded 799 times
getid3.lib.php
add XML2array() and SimpleXMLelement2array()
(41.38 KiB) Downloaded 802 times

filmo
User
Posts: 22
Joined: Fri Dec 08, 2006 7:16 pm
Location: Los Angeles

Re: decoding iXML data from BWF files

Post by filmo » Wed Aug 17, 2011 7:49 pm

Awesome. Works great based on my limited testing. Having the 'parsed' section is super convenient

James Heinrich
getID3() v1 developer
Posts: 1474
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: decoding iXML data from BWF files

Post by James Heinrich » Thu Aug 18, 2011 12:40 pm

The attached updated version now also parses some of the iXML data and calculates:
[riff][WAVE][iXML][master_speed] = frame rate (derived from [SPEED][MASTER_SPEED] in the XML)
[riff][WAVE][iXML][timecode_seconds] = seconds since midnight (derived from [SPEED][TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_(LO|HI)] / TIMESTAMP_SAMPLE_RATE in the XML)
[riff][WAVE][iXML][timecode_string] = [riff][WAVE][iXML][timecode_seconds] presented in human-friendly format (e.g. "09:27:32.018" instead of "34052.018020833")

edit: revised again with HH:MM:SS:FF.ff instead of HH:MM:SS.ss formatting.
Attachments
module.audio-video.riff.php
(112.13 KiB) Downloaded 770 times

Locked