pyaaf2 icon indicating copy to clipboard operation
pyaaf2 copied to clipboard

Support for extracting AIFC audio

Open paulhildebrandt opened this issue 4 years ago • 1 comments

First off, thanks for such a great package!

I am trying to extract embedded audio from an AAF generated by Avid Media Composer. There is support for that in this package but it turns out I need AIFC not PCM audio. I looked at export_audio in mobs.py and tried to add support for the AIFCDescriptor but didn't have much luck. I took a simple approach and added code to export_audio to identify AIFDescriptors and then write out an aifc file. I ran into two problems:

  1. I wasn't able to get channels, sample_rate, sample_size from the AIFCDescriptoor like you can with a PCMDescriptor.
  2. When I plugged in what I believe to be correct values for those and wrote out an AIFC using the same stream writing code as the PCM, I ended up with static

If someone could point me in the correct direction that would be much appreciated.

paulhildebrandt avatar Aug 17 '21 19:08 paulhildebrandt

Do you have any sample code/aaf you could share? You could convert the extracted wav file with ffmpeg, it should be able to do it lossesly.

markreidvfx avatar Jan 25 '22 01:01 markreidvfx