How about: faac compatibility library using vo-aacenc
Rogério Brito
rbrito at ime.usp.br
Tue Jun 5 07:17:06 UTC 2012
Hi there.
On May 27 2012, Fabian Greffrath wrote:
> Do you think it is possible / feasible to develop a library that provides
> the libfaac API but uses vo-aacenc for the actual encoding?
Yes, it is. I am (slowly) studying how the vo-aacenc library works and I
expect to duplicate the example aac-enc.c that is in the vo-aacenc git tree
with some code of my own, but vo-aacenc has a lot of limitations that
libfaac doesn't.
Perhaps implementing the libfaac API can be done with some stub functions,
until the aac encoder of libav/ffmpeg matures to the point of being usable.
That being said, handbrake already allows one to use multiple libraries for
encoding audio in a video.
Recent versions of handbrake can, for generating a video with audio in AAC,
use libfaac, an AAC passthrough, libav/ffmpeg and, on MacOS X, use
CoreAudio.
See a screenshot that I made from a recent compilation of the packaging that
I'm sending to the git repo at alioth with a recent git snapshot of
HandBrake's tree:
http://www.ime.usp.br/~rbrito/debian/handbrake-aac.png
> This would help applications that unconditionally depend on libfaac,
> e.g. handbrake, to make it nito Debian until they are cleanly ported
> either directly to vo-aacenc or to only conditionally depend on libfaac.
I'm not so sure about the unconditionally part above (but then, I have not
tried that yet, to avoid me getting so dispersed with many tasks to try and
not finishing anything).
I would love it if you tried to tweak what I uploaded to alioth and let me
know what works and what doesn't.
> Is there anyone on this list who has experiences in this kind of
> compatibility APIs or a concrete idea of how an implementation could look
> like?
My plans would be to mimic one of the files under libh (like
enc{faac,avcodec,lame}.c) and start from there. If I end up with something
that works, I will offer it to upstream.
BTW, do you want to try to work with me on this, Fabian (or anybody else)?
Perhaps also taking the mpeg4 container from libav or from gtkpod
(atomicparsley?) we can get a stripped down (but *Free*) implementation of
the faac command-line tool?
If things prove to be OK, we can, perhaps, mine the patches from faac that
are GPL and integrate them into this potential library, to fill in some of
the gaps that vo-aacenc has (encoding in more than 2 channels etc).
Of course, some of the stuff that I listed above may be some longer term
goals and need investigation, but it will be nice to try, at least (even if
destined to fail). :)
> For example, what to do if features of libfaac are requested that are not
> yet implemented by vo-aacenc, Warn or Abort?
Simply gray out things in a user interface (in the particular case of
HandBrake). For a library, return some error to the caller would be
appropriate.
Regards,
--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://rb.doesntexist.org/blog : Projects : https://github.com/rbrito/
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
More information about the pkg-multimedia-maintainers
mailing list