Determining BWF Offset Timecode via script

Teetow wrote on 1/30/2008, 8:48 AM
So, we recorded a bunch of 96 kHz BWF files, and decided to resample them to 48kHz to get around an annoying ultrasonic noise which had crept in from some camera equipment. In the process, we noted that the BWF import functionality positioned the resampled wave files at double their proper position, which is "normal" since the Offset timecode value of a BWF file is given in samples. Yeah, I know.

What I want to do is try to fix this using a script that assumes the BWF timecode is based on 96kHz, and re-position the audio using the adjusted Offset timecode. The trouble is, I can find out just about anything about the BWF file but the Offset timecode.

Is this doable, or will I have to rely on third-party software to read the BWF header?

Comments

Kennymusicman wrote on 1/30/2008, 9:15 AM
can't help you on the script side - but what about re-resampling back up to 96k? Your ultrasonic data will remain lost, and you should then be able to progress as though the problem was not present in the first place. ?
(just an idea)
Teetow wrote on 1/30/2008, 4:45 PM
Not a bad idea, but we have already mounted hundreds of files at an incorrect position. The script was intended to rectify this with a minimum of manual labor.

In the future, we will of course take steps to prevent it from happening again =)
Teetow wrote on 2/5/2008, 8:33 AM
Update: I snooped around for some Riff file parsing stuff, and found a workable solution.
MarkWWW wrote on 2/5/2008, 11:51 AM
I'd be interested to know what you found. I occasionally need to determine timestamps, etc, on BWF files and I haven't yet found an application that lets you get at this information in a nice way that is sensibly priced (or better still free).

BWF Widget is the best I've found but it still isn't exactly what I'm after.

Mark
Teetow wrote on 2/6/2008, 3:58 AM
Well, in this case, I found this page:

http://www.codeproject.com/KB/files/riffparser.aspx

which provided a simple but rather effective way of sniffing out the BEXT header of a BWF file. The specifications for the Broadcast Wave Extension can be found here:

http://www.ebu.ch/en/technical/publications/tech3000_series/index.php

However, if all you want to do is visually confirm the timestamp, Vegas gives you that info under the General tab of the Properties of an audio event.
MarkWWWW wrote on 2/6/2008, 5:34 AM
Thanks for that.

> if all you want to do is visually confirm the timestamp, Vegas gives you that info under the General tab of the Properties of an audio event

Yes indeed, but it will only show one file's data at a time. When I need to get at this information I typically get a couple of hundred BWFs dumped on me with no idea of what relates to what, what's junk and what's needed, etc. I then need to extract all their timestamps, etc, into a single document so I can make sense of what was recorded in what order, what audio goes with what video, etc. I'm still looking for the ideal application to manage this.

It would be great if Vegas scripting could parse the BEXT chunk of every file in, say, the media pool and allow you access to the various components of the metadata. If it did I'd be able to write my own ideal app using the scripting interface and work entirely inside Vegas (I can probably just about manage that amount of programming). But my abilities don't run to writing a whole application from scratch for this purpose so I'm still looking for anything already existing that might make the task easier to deal with.

Mark