Harrison Mixbus Forum

Full Version: AAF on mixbus?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Hi all,

Posting here on recommendation of @johne53, as I wrote LibAAF (github.com/agfline/LibAAF) so I can tell you a bit about it.

The library is able to parse AAF coming from a variety of editors (which makes it better than many commercial implementations facing compatibility issues...), with support of fades, clip and track based gain, pan, and it can extract embedded media essences. It can also retrieve any videomixdown. However, LibAAF is read only, so there is currently no way to modify nor create any AAF file.

When I left this project, the library was quite working well. It exposes a very simple abstraction interface to load a file and loop through tracks, clips and essences. Thus there is no need to know anything about AAF structure to implement it.

The lib comes with a few programs :
  • AAFInfo and AAFExtract (github.com/agfline/LibAAF/tree/master/tools) that show library usage, allow to dig into file structure and extract embedded media essences.
  • There is also a very dirty POC (github.com/agfline/LibAAF/tree/master/ardour) that creates Ardour6 sessions based on AAF files (this was written based on Ardour's session utils).
LibAAF was written in pure C, with a single dependency to libsndfile (used to extract embedded audio media) and which could be replaced if needed. The library was made on Debian/Linux and was not ported yet, however that would not be too much of a work thanks to the lack of dependencies.

If someone wants to implement it, I can provide help and support. Just let me know.

Adrien


PS: Sorry about the mess with urls, looks like I'm not allowed to put links
@agfline Welcome to the Forum... good first post hope someone steps up to help implement this function.
Hi Adrien and thanks for posting... can I just clarify something..?

(04-17-2023, 04:43 AM)agfline Wrote: [ -> ]LibAAF was written in pure C, with a single dependency to libsndfile (used to extract embedded audio media)

Do you mean that users would need to install a runnable version of libsndfile or is that already included in your app?
Well, it's a dependency in the way that LibAAF is compiled against libsndfile headers, so one needs the libsndfile.so (or libsndfile.dll equivalent on windows). Maybe it could be included as a static library into LibAAF, which would eliminate the need for any external file.

However, I remember I used libsndfile for the sake of convenience, it might be possible to even get rid of it eventually. Got to look at it.
This sounds like it should be easy to test on Linux where libsndfile can hopefully be loaded via a package manager? If so, maybe @Jostein or one of the other Linux users could try some AAF imports for us?  Cool
(04-17-2023, 01:55 PM)johne53 Wrote: [ -> ]This sounds like it should be easy to test on Linux where libsndfile can hopefully be loaded via a package manager? If so, maybe @Jostein or one of the other Linux users could try a few AAF imports sometime?  Cool

It did not compile, it ended with:

A lot of: ...undefined reference to `sf_strerror

and finally:
/usr/bin/ld: /home/josander/Studio/Buffer/Downloads/post_install/Studio/aaf/LibAAF-master/LibAAF/AAFIface/AAFIAudioFiles.c:799: un
defined reference to `sf_strerror'
/usr/bin/ld: ../build/libAAF.a(AAFIAudioFiles.o): in function `open_external_file':
/home/josander/Studio/Buffer/Downloads/post_install/Studio/aaf/LibAAF-master/LibAAF/AAFIface/AAFIAudioFiles.c:462: undefined refer
ence to `sf_open'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:28: ../bin/AAFInfo] Error 1
make: *** [Makefile:25: tools] Error 2

I don't have time to sort it out now but I will look at it later.
Hi @Jostein and thanks for giving it a try.

sf_*() functions are libsndfile related. Since you have no header issues, I guess you have libsndfile already installed. So there might be some issue with gcc / ld, just commited some changes to the Makefile on github, if you want to give it another try.

Also note that running make will build the two programs AAFInfo and AAFExtract.
To build AAF2Ardour ardour_aafimport, you need to first build Ardour6, then set 2 variables inside LibAAF/ardour/Makefile and finally run make ardour. Everything is explained inside LibAAF/ardour/README

Let me know if you have any trouble.
@agfline - forgive me if this is a dumb question but would it be possible for you to include libsndfile.so along with your own executable and your script?
Do you mean for the time of development or for a future release ? It might be possible, however libsndfile itself relies on multiple codec libraries, so it might get a bit tricky. From a releasing point of view, there might also be some licensing issues, I'm not sure.

Anyway, I just looked again at my code and libsndfile is only used to retrieve metadata of wav/aiff files. It makes really no sense to have a dependency for such a trivial task. I need to do more tests with compressed file formats (like mp3 or aac) to see how to handle them. This should also be discussed with a mixbus dev.

So eventually I really want to get rid of that lib. But if you need it right now for testing purpose, I can add libsndfile.so to the repo. Just tell me what is your linux distro so I can do some prior tests.
Hi @agfline - I'm running Windows here which (AFAIK) your app doesn't support yet - so I'm just trying to suggest something that'd make it simpler for Linux users to test. Jostein's maybe an unusual case but the majority of users here will likely be put off testing if they need to start building code from source.
Pages: 1 2 3 4 5 6