AAC Encoding - Where we stand, what's left
I'd like to take a minute to discuss the status of the AAC encoder and where it is going. In SoC svn: --Applies cleanly to SVN HEAD --The most egregious of the artifacting is gone (sections being replaced by silence or having the wrong volume, etc.) --Lacks TNS --Lacks multichannel support --Lacks rate control --Lacks SBR --Produces illegal bitstreams by violating the maximum frame size --Below faac quality --Well below the quality of competitive encoders In my tree: --Ruggles' PARCOR --Rudimentary TNS support based on ISO 13818-7 Annex C --TNS coefficient compressor --Various performance opts --Different value for CLIPPED_ESCAPE (165113.5f * IQ) --Substantial rate control related re-factoring --Pseudo ABR rate control --Maximum frame size enforcement --VBR rate control that forces comically high bitrate output. TNS is not helpful at the moment. Sharp attacks are losing most of their power before we get to the TNS stage. I believe this is may be psy model related. To be frank, at this point it seems like it might be prudent for me to stop working on this and move to either replacing the non-redistributable parts of faac (to get something legal and faac quality) or improving the 3GPP code (to get something awesome but not distributable). At this point both code bases offer better quality and more features (including SBR support from 3GPP). Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least. So I'm wondering what other people have in mind (or completed but tucked out of sight) for this code base? Regards, Alex Converse
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
--Produces illegal bitstreams by violating the maximum frame size
This is bad.
In my tree: --Ruggles' PARCOR
What's that?
--Maximum frame size enforcement
Could you try to get this merged next?
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate.. Diego
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
All the other AAC encoders out there worth their salt support these. It's 2009, SBR is no longer a fringe extension to AAC that major implementations don't support. Microsoft and Apple have both moved to supporting HE-AAC. 14496-3:2009 will include the HE-AAC profile in the main body (not an amendment). SBR is absolutely necessary to be competitive at low bitrates.
--Produces illegal bitstreams by violating the maximum frame size
This is bad.
In my tree: --Ruggles' PARCOR
What's that?
It's a pre req for TNS
--Maximum frame size enforcement
Could you try to get this merged next?
It depends on the rate control stuff.
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate..
Well, our source control is one major paradigm shift behind (and the use of svn:externals definitely damages makes using the git mirror more painful and branches aren't even exposed on the git mirror but we've discussed this a thousand times and I don't see any chance of it changing in the near future). This is especially painful because essentially I'm playing in someone else's sandbox here. The concepts of trying to minimize the diff vs HEAD outside of the core encoder files to ease merging and a variety of things that need to be done are diametrically opposed. A variety of codec specific options are needed (see previous). Splitting out the windowing and psymodel code to make a fake encoder to tune the psymodel is intrusive OR leads to lots of duplication. either way it's pretty nasty and requires big adjustments to both the AAC encoder and decoder. If I'm the only one working on this, implementing it outside of libavcodec allows me to make the changes I feel are necessary without having to justify them to anyone else. I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it. --Alex
Alex Converse wrote:
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Well, since you mentioned 2 of my projects I thought I would comment. If I could get all of the features from Flake into FFmpeg then I would gladly stop developing it in favor of making the FFmpeg FLAC encoder better instead. I started Flake as something fun to do and because it ended up being pretty good I ported it to FFmpeg. The biggest part of getting the rest of it to FFmpeg is variable block size encoding, which has hit a wall because of the current FFmpeg audio encoding API. The reason why Aften was and still is developed outside of FFmpeg is a long story that I don't care to go into at the moment, but a big portion of what would be needed to port it to FFmpeg has to do with per-codec options. -Justin
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
All the other AAC encoders out there worth their salt support these. It's 2009, SBR is no longer a fringe extension to AAC that major implementations don't support. Microsoft and Apple have both moved to supporting HE-AAC. 14496-3:2009 will include the HE-AAC profile in the main body (not an amendment). SBR is absolutely necessary to be competitive at low bitrates.
I don't doubt that SBR is good, but getting a functioning basic encoder that produces a simple but valid bitstream is more important. SBR support can (and will have to) come after that.
--Maximum frame size enforcement
Could you try to get this merged next?
It depends on the rate control stuff.
Then try to get the rate control stuff merged first :)
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate..
Well, our source control is one major paradigm shift behind (and the use of svn:externals definitely damages makes using the git mirror more painful and branches aren't even exposed on the git mirror but we've discussed this a thousand times and I don't see any chance of it changing in the near future).
How does libswscale affect your work on AAC?
This is especially painful because essentially I'm playing in someone else's sandbox here.
Just get your own sandbox..
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Without a doubt, encoders are not FFmpeg's main strength. That does not mean we should not attempt to change this. Not having an encoder or even a decoder for certain formats often has historic reasons. Whenever external libraries of good enough or better quality have been available, motivation to write equivalents in FFmpeg has been low... Diego P.S.: This should really be discussed on ffmpeg-devel...
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
All the other AAC encoders out there worth their salt support these. It's 2009, SBR is no longer a fringe extension to AAC that major implementations don't support. Microsoft and Apple have both moved to supporting HE-AAC. 14496-3:2009 will include the HE-AAC profile in the main body (not an amendment). SBR is absolutely necessary to be competitive at low bitrates.
I don't doubt that SBR is good, but getting a functioning basic encoder that produces a simple but valid bitstream is more important. SBR support can (and will have to) come after that.
It would be very convenient to get it in decoder first too.
--Maximum frame size enforcement
Could you try to get this merged next?
It depends on the rate control stuff.
Then try to get the rate control stuff merged first :)
That's another tricky stuff but we'll get it eventually.
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;) [...]
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Without a doubt, encoders are not FFmpeg's main strength. That does not mean we should not attempt to change this.
Err, have you ever heard of MN-backed MPEG-4 ASP and H.26[1-3] encoders? Too bad everybody wants that H.264+AAC.
Not having an encoder or even a decoder for certain formats often has historic reasons. Whenever external libraries of good enough or better quality have been available, motivation to write equivalents in FFmpeg has been low...
Reminds me of AMR.
Diego
P.S.: This should really be discussed on ffmpeg-devel...
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
All the other AAC encoders out there worth their salt support these. It's 2009, SBR is no longer a fringe extension to AAC that major implementations don't support. Microsoft and Apple have both moved to supporting HE-AAC. 14496-3:2009 will include the HE-AAC profile in the main body (not an amendment). SBR is absolutely necessary to be competitive at low bitrates.
I don't doubt that SBR is good, but getting a functioning basic encoder that produces a simple but valid bitstream is more important. SBR support can (and will have to) come after that.
It would be very convenient to get it in decoder first too.
--Maximum frame size enforcement
Could you try to get this merged next?
It depends on the rate control stuff.
Then try to get the rate control stuff merged first :)
That's another tricky stuff but we'll get it eventually.
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media. © 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
[...]
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Without a doubt, encoders are not FFmpeg's main strength. That does not mean we should not attempt to change this.
Err, have you ever heard of MN-backed MPEG-4 ASP and H.26[1-3] encoders? Too bad everybody wants that H.264+AAC.
Not having an encoder or even a decoder for certain formats often has historic reasons. Whenever external libraries of good enough or better quality have been available, motivation to write equivalents in FFmpeg has been low...
Reminds me of AMR.
Diego
P.S.: This should really be discussed on ffmpeg-devel...
FFmpeg-soc mailing list FFmpeg-soc@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
On Wed, Jul 08, 2009 at 01:49:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away... Diego
On Wed, Jul 8, 2009 at 2:36 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 01:49:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote: > > To be frank, at this point it seems like it might be prudent for me to > stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset. Libfaac has two incompatible licenses.
On Wed, Jul 08, 2009 at 03:02:43PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 2:36 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 01:49:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote: > On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote: >> >> To be frank, at this point it seems like it might be prudent for me to >> stop working on this > > Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset.
That was before my time, what is dist10?
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it... What is your point exactly? Diego
On Wed, Jul 8, 2009 at 3:05 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 03:02:43PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 2:36 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 01:49:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote: > On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote: > > On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote: > >> > >> To be frank, at this point it seems like it might be prudent for me to > >> stop working on this > > > > Uh, why? > > Getting faac free (by dropping long forgotten profiles and > reimplementing things from spec), seem like less effort than getting > FFmpeg to faac quality (running around trying to fix bugs in someone > else's codebase). Building on 26.410 v8.0.0 is attractive because it > is already better quality than ffmpeg and faac and includes a working > SBR implementation which would require tons of work to add to ffmpeg > or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset.
That was before my time, what is dist10?
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
What is your point exactly?
It's the best AAC encoder with source available. I don't see a path to merging our AAC encoder anytime in the near future. I also think we are getting to the point where an encoder without SBR is a bit of a joke. --Alex
On Wed, Jul 08, 2009 at 03:08:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 3:05 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 03:02:43PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 2:36 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Wed, Jul 08, 2009 at 01:49:59PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:52 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:25:09PM +0200, Diego Biurrun wrote: > On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote: > > On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote: > > > On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote: > > >> > > >> To be frank, at this point it seems like it might be prudent for me to > > >> stop working on this > > > > > > Uh, why? > > > > Getting faac free (by dropping long forgotten profiles and > > reimplementing things from spec), seem like less effort than getting > > FFmpeg to faac quality (running around trying to fix bugs in someone > > else's codebase). Building on 26.410 v8.0.0 is attractive because it > > is already better quality than ffmpeg and faac and includes a working > > SBR implementation which would require tons of work to add to ffmpeg > > or faac. > > What is "26.410 v8.0.0", where can I find it and how is it licensed?
3GPP TS 26.410 aka AAC encoder floating point code. Guess license by yourself ;)
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset.
That was before my time, what is dist10?
So what is dist10? Somebody please enlighten me...
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
What is your point exactly?
It's the best AAC encoder with source available.
It may have source available, but the source is under as nonfree a license as possible. That's not helpful, on the contrary...
I don't see a path to merging our AAC encoder anytime in the near future.
What exactly is missing?
I also think we are getting to the point where an encoder without SBR is a bit of a joke.
As I said, let's take things step by step... Diego
On Wed, Jul 08, 2009 at 09:12:55PM +0200, Diego Biurrun wrote:
On Wed, Jul 08, 2009 at 03:08:59PM -0400, Alex Converse wrote: [...]
Let's not forget that lame started out as a dist10 patchset.
That was before my time, what is dist10?
So what is dist10? Somebody please enlighten me...
In the times of my childhood that was the only MPEG Audio encoder and decoder available in source form - those were reference sources from ISO IIRC. For MP3 you got either it or Fraungofer encoder (demo version encoded only 30 seconds of sound) or some shitty encoders based on dist10 sources.
Hi, On Wed, Jul 8, 2009 at 3:08 PM, Alex Converse<alex.converse@gmail.com> wrote:
I don't see a path to merging our AAC encoder anytime in the near future.
So this is the real problem, right? I see many people complain about this. Let's fix it instead of running around like headless chickens. Can we commit the AAC encoder, maybe under --enable-experimental, so that at least this complaint is taken care of? "Just do it". Ronald
2009/7/8 Alex Converse <alex.converse@gmail.com>:
On Wed, Jul 8, 2009 at 3:05 PM, Diego Biurrun<diego@biurrun.de> wrote:
[...]
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
What is your point exactly?
It's the best AAC encoder with source available. I don't see a path to merging our AAC encoder anytime in the near future.
It may be the best AAC encoder with the source available, but I disagree that there's no path to merging ours.
I also think we are getting to the point where an encoder without SBR is a bit of a joke.
I definitely disagree with this. People more commonly use higher bit rates, and so LC, for stereo AAC audio in video content. SBR is pretty much needed for multi-channel audio at reasonable bit rates though. And for music, LC AAC is definitely preferred. Regards, Rob PS - I have more comments to make in this thread but I'm a bit busy at the moment.
On Wed, Jul 08, 2009 at 09:05:41PM +0200, Diego Biurrun wrote: [...]
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset.
do you think lame would be better or worse now did it start free of propriatary code? That said, is it free of dist10 code now in a legally sound way?
That was before my time, what is dist10?
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
i agree, anyway, the idea that free software starts out of propriatary code in which one function after the other is rewritten to make it "free" really isnt all that impresive. If i may make some analogy, it feels like someone building a car by taking one of a competitor and replacing one part after the other by his own vs. an engeneer designing a car from scratch optimizing each part as well as the overal design and testing prototypes to make sure its all perfect. Another thing this reminds me are the leica cameras, they where also copied by pretty much everyone from europe over russia to japan, still, tell me a single one of them who managed to build an equal let alone better camera that way? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire
On Wed, Jul 8, 2009 at 4:03 PM, Michael Niedermayer<michaelni@gmx.at> wrote:
On Wed, Jul 08, 2009 at 09:05:41PM +0200, Diego Biurrun wrote: [...]
All of the encoder source lacks copyright notices/licensing terms
From the Documentation:
No part may be reproduced except as authorized by written permission. The copyright and the foregoing restriction extend to reproduction in all media.
© 2008, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC). All rights reserved.
From the build system:
# Copyright (c) Coding Technologies 2003 # All Rights Reserved
So this is completely nonfree, you may neither modify nor distribute it. This is not something you can use as a base for your work unless you wish to throw your time away...
Let's not forget that lame started out as a dist10 patchset.
do you think lame would be better or worse now did it start free of propriatary code? That said, is it free of dist10 code now in a legally sound way?
Yes in the early 2000s the last of the dist10 sources was removed. There was much celebration. --Alex
On Wed, Jul 08, 2009 at 10:03:10PM +0200, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 09:05:41PM +0200, Diego Biurrun wrote: [...]
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
i agree, anyway, the idea that free software starts out of propriatary code in which one function after the other is rewritten to make it "free" really isnt all that impresive. If i may make some analogy, it feels like
someone building a car by taking one of a competitor and replacing one part after the other by his own vs. an engeneer designing a car from scratch optimizing each part as well as the overal design and testing prototypes to make sure its all perfect.
Another thing this reminds me are the leica cameras, they where also copied by pretty much everyone from europe over russia to japan, still, tell me a single one of them who managed to build an equal let alone better camera that way?
I happen to live in a city where USSR Leika clones (aka FED) were produced. The funny situation here is that copying usually produced better results than design from scratch. But here's a counterexample - http://en.wikipedia.org/wiki/R-2_rocket
[...]
-- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
2009/7/9 Kostya <kostya.shishkov@gmail.com>:
On Wed, Jul 08, 2009 at 10:03:10PM +0200, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 09:05:41PM +0200, Diego Biurrun wrote: [...]
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
i agree, anyway, the idea that free software starts out of propriatary code in which one function after the other is rewritten to make it "free" really isnt all that impresive. If i may make some analogy, it feels like
someone building a car by taking one of a competitor and replacing one part after the other by his own vs. an engeneer designing a car from scratch optimizing each part as well as the overal design and testing prototypes to make sure its all perfect.
Another thing this reminds me are the leica cameras, they where also copied by pretty much everyone from europe over russia to japan, still, tell me a single one of them who managed to build an equal let alone better camera that way?
I happen to live in a city where USSR Leika clones (aka FED) were produced. The funny situation here is that copying usually produced better results than design from scratch.
But here's a counterexample - http://en.wikipedia.org/wiki/R-2_rocket
And I read a lengthy article about Chinese reverse engineering of electronic products where they swapped out some parts for better performing parts to improve the product. I doubt this happens in all cases but I certainly don't think the two (using and improving something existing versus starting something from scratch to achieve a good implementation) are mutually exclusive. Regards, Rob
On Thu, Jul 09, 2009 at 07:21:59AM +0300, Kostya wrote:
On Wed, Jul 08, 2009 at 10:03:10PM +0200, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 09:05:41PM +0200, Diego Biurrun wrote: [...]
Libfaac has two incompatible licenses.
Yes, that's why it is crap and needs to be replaced. The 3GPP AAC encoder has just one license: prohibitively nonfree. There is really nothing more to say about it...
i agree, anyway, the idea that free software starts out of propriatary code in which one function after the other is rewritten to make it "free" really isnt all that impresive. If i may make some analogy, it feels like
someone building a car by taking one of a competitor and replacing one part after the other by his own vs. an engeneer designing a car from scratch optimizing each part as well as the overal design and testing prototypes to make sure its all perfect.
Another thing this reminds me are the leica cameras, they where also copied by pretty much everyone from europe over russia to japan, still, tell me a single one of them who managed to build an equal let alone better camera that way?
I happen to live in a city where USSR Leika clones (aka FED) were produced. The funny situation here is that copying usually produced better results than design from scratch.
I dont own a FED, but what ive heard is things like that they where manufactored to the precission of cement mixers ;)
But here's a counterexample - http://en.wikipedia.org/wiki/R-2_rocket
Indeed i didnt know that, though USSR own rocket designs surpassed copies and non copies. I mean thinking of soyuz for example ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein
On Wed, Jul 8, 2009 at 6:25 AM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Lacks multichannel support --Lacks SBR
These are likely low priority.
All the other AAC encoders out there worth their salt support these. It's 2009, SBR is no longer a fringe extension to AAC that major implementations don't support. Microsoft and Apple have both moved to supporting HE-AAC. 14496-3:2009 will include the HE-AAC profile in the main body (not an amendment). SBR is absolutely necessary to be competitive at low bitrates.
I don't doubt that SBR is good, but getting a functioning basic encoder that produces a simple but valid bitstream is more important. SBR support can (and will have to) come after that.
--Maximum frame size enforcement
Could you try to get this merged next?
It depends on the rate control stuff.
Then try to get the rate control stuff merged first :)
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
What is "26.410 v8.0.0", where can I find it and how is it licensed?
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate..
Well, our source control is one major paradigm shift behind (and the use of svn:externals definitely damages makes using the git mirror more painful and branches aren't even exposed on the git mirror but we've discussed this a thousand times and I don't see any chance of it changing in the near future).
How does libswscale affect your work on AAC?
As I'm starting to screw around in shared code, being able to run regressions is nice.
This is especially painful because essentially I'm playing in someone else's sandbox here.
Just get your own sandbox..
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Without a doubt, encoders are not FFmpeg's main strength. That does not mean we should not attempt to change this.
Not having an encoder or even a decoder for certain formats often has historic reasons. Whenever external libraries of good enough or better quality have been available, motivation to write equivalents in FFmpeg has been low...
Diego
P.S.: This should really be discussed on ffmpeg-devel... _______________________________________________ FFmpeg-soc mailing list FFmpeg-soc@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
On Wed, Jul 08, 2009 at 03:11:50PM -0400, Alex Converse wrote:
On Wed, Jul 8, 2009 at 6:25 AM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 10:38:55PM -0400, Alex Converse wrote:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate..
Well, our source control is one major paradigm shift behind (and the use of svn:externals definitely damages makes using the git mirror more painful and branches aren't even exposed on the git mirror but we've discussed this a thousand times and I don't see any chance of it changing in the near future).
How does libswscale affect your work on AAC?
As I'm starting to screw around in shared code, being able to run regressions is nice.
Why is this not possible?
This is especially painful because essentially I'm playing in someone else's sandbox here.
Just get your own sandbox..
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
Without a doubt, encoders are not FFmpeg's main strength. That does not mean we should not attempt to change this.
Not having an encoder or even a decoder for certain formats often has historic reasons. Whenever external libraries of good enough or better quality have been available, motivation to write equivalents in FFmpeg has been low...
Diego
P.S.: This should really be discussed on ffmpeg-devel... _______________________________________________ FFmpeg-soc mailing list FFmpeg-soc@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
Extra good karma for snipping quotes you do not reply to, thanks. Diego
2009/7/7 Alex Converse <alex.converse@gmail.com>:
On Mon, Jul 6, 2009 at 9:28 PM, Diego Biurrun<diego@biurrun.de> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
[...]
To be frank, at this point it seems like it might be prudent for me to stop working on this
Uh, why?
Getting faac free (by dropping long forgotten profiles and reimplementing things from spec), seem like less effort than getting FFmpeg to faac quality (running around trying to fix bugs in someone else's codebase). Building on 26.410 v8.0.0 is attractive because it is already better quality than ffmpeg and faac and includes a working SBR implementation which would require tons of work to add to ffmpeg or faac.
Menno Bakker (now works for Nero and probably has knowledge of their encoder but is the main/only FAA* maintainer) said that the 3GPP model is better than that in FAAC. Could we not take the ideas from the 3GPP spec/implementation and implement them in FFmpeg to reach some sort of base line?
Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
Why? Elaborate..
Well, our source control is one major paradigm shift behind (and the use of svn:externals definitely damages makes using the git mirror more painful and branches aren't even exposed on the git mirror but we've discussed this a thousand times and I don't see any chance of it changing in the near future). This is especially painful because essentially I'm playing in someone else's sandbox here.
I guess this is a problem to keep sync with HEAD but I can't say that I've ever really found it to be a major issue. The way I think about it is that if history is desired for encoder quality/performance tuning, then acceptance of a bitstream compatible encoder into trunk is a priority so that it can then be developed without having to keep some branch in sync with head and so that changes can be committed incremenetally. If that is not acceptable, then forgoing history should be because keeping things in sync with trunk is a pain. Mostly I think actually having good code is far more important than having all its history and that having history is favoured as long as the effort required to retain it is not unreasonable. Maybe keeping notes of significant developments in some text file is a tradeoff.
The concepts of trying to minimize the diff vs HEAD outside of the core encoder files to ease merging and a variety of things that need to be done are diametrically opposed. A variety of codec specific options are needed (see previous). Splitting out the windowing and psymodel code to make a fake encoder to tune the psymodel is intrusive OR leads to lots of duplication. either way it's pretty nasty and requires big adjustments to both the AAC encoder and decoder.
If I'm the only one working on this, implementing it outside of libavcodec allows me to make the changes I feel are necessary without having to justify them to anyone else.
I think this is one of the reasons x264 remains outside libavcodec - because its developers feel that integrating it with libavcodec would restrict their freedom to develop it.
I'm not the only one who's wondered if FFmpeg is really the best place to implement a high quality encoder. FFmpeg lacks a VC-1 encoder, an H.264 encoder, and an MP3 encoder. x264 is developed outside of FFmpeg despite sharing some code. Aften and Flake (that PARCOR routine is actually from Flake) are developed outside of FFmpeg and periodically have features backported. AAC itself is older than FFmpeg (not some johnny-come-lately format) and we still lack a working encoder for it.
For h.264 and MP3 we have x264 and LAME which are both absolutely very good encoders respectively. I see no reason to implement our own h.264 and/or MP3 encoders as a consequence and would rather support these libraries well within FFmpeg. VC-1 should probably be funded if anyone is interested in VC-1 encoding unless there's some compelling reason to do it for non-commercial purposes. An AAC encoder is very welcome in FFmpeg because there is no good, competitive, free, open source encoder available. Regards, Rob
Hi, On Thu, Jul 9, 2009 at 5:20 AM, Robert Swain<robert.swain@gmail.com> wrote:
For h.264 and MP3 we have x264 and LAME which are both absolutely very good encoders respectively. I see no reason to implement our own h.264 and/or MP3 encoders as a consequence [..]
x264: license (LGPL vs. GPL). Ronald
2009/7/9 Ronald S. Bultje <rsbultje@gmail.com>:
On Thu, Jul 9, 2009 at 5:20 AM, Robert Swain<robert.swain@gmail.com> wrote:
For h.264 and MP3 we have x264 and LAME which are both absolutely very good encoders respectively. I see no reason to implement our own h.264 and/or MP3 encoders as a consequence [..]
x264: license (LGPL vs. GPL).
I think commercial interests use the software either on-site (i.e. no-redistribution) or use the CLI to avoid GPL issues and if not, maybe they would fund an LGPL h.264 encoder as it's not exactly a trivial pursuit. For personal use, I don't think LGPL vs GPL is much of an issue unless writing software that is somehow GPL-incompatible. Regards, Rob
Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
[...] So I'm wondering what other people have in mind (or completed but tucked out of sight) for this code base?
Regards,
Alex Converse
Hi, I think what you are saying sounds reasonable. Developing an encoder within main FFmpeg doesn't offer the flexibility that is needed for a really competitive implementation. I think people fail to understand how hard it is to generalize the functions needed for perceptual audio codecs. Regarding base for a new encoder I'm a bit divided as both options have lots of proprietary code in them. MvH Benjamin Larsson
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Applies cleanly to SVN HEAD --The most egregious of the artifacting is gone (sections being replaced by silence or having the wrong volume, etc.) --Lacks TNS
--Lacks multichannel support
Ahem, I've added it long time ago.
--Lacks rate control --Lacks SBR --Produces illegal bitstreams by violating the maximum frame size
This one could be fixed.
--Below faac quality --Well below the quality of competitive encoders
In my tree: --Ruggles' PARCOR --Rudimentary TNS support based on ISO 13818-7 Annex C --TNS coefficient compressor --Various performance opts --Different value for CLIPPED_ESCAPE (165113.5f * IQ) --Substantial rate control related re-factoring --Pseudo ABR rate control --Maximum frame size enforcement
--VBR rate control that forces comically high bitrate output.
Heh, do you mean it's always maximum frame size?
TNS is not helpful at the moment. Sharp attacks are losing most of their power before we get to the TNS stage. I believe this is may be psy model related.
To be frank, at this point it seems like it might be prudent for me to stop working on this and move to either replacing the non-redistributable parts of faac (to get something legal and faac quality) or improving the 3GPP code (to get something awesome but not distributable). At this point both code bases offer better quality and more features (including SBR support from 3GPP). Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
I'm stronly against it. It seems to me that it's easier to backport FAAC psy model and codebook selection to our encoder to get comparative output - IIRC non-LGPL parts of libfaac are exactly the basic stuff I implemented.
So I'm wondering what other people have in mind (or completed but tucked out of sight) for this code base?
Regards,
Alex Converse
On Tue, Jul 7, 2009 at 4:45 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Applies cleanly to SVN HEAD --The most egregious of the artifacting is gone (sections being replaced by silence or having the wrong volume, etc.) --Lacks TNS
--Lacks multichannel support
Ahem, I've added it long time ago.
$ ./ffmpeg -i ../../Canyon-5.1-48khz-448kbit.ac3 canyon5.1.m4a FFmpeg version git-04fe5e6, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --disable-ffserver libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.32. 0 / 52.32. 0 libavformat 52.36. 0 / 52.36. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 built on Jul 7 2009 23:49:58, gcc: 4.3.3 Input #0, ac3, from '../../Canyon-5.1-48khz-448kbit.ac3': Duration: 00:00:37.98, bitrate: 448 kb/s Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s File 'canyon5.1.m4a' already exists. Overwrite ? [y/N] y Output #0, ipod, to 'canyon5.1.m4a': Stream #0.0: Audio: aac, 48000 Hz, 5.1, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding Segmentation fault
--Lacks rate control --Lacks SBR --Produces illegal bitstreams by violating the maximum frame size
This one could be fixed.
Could be fixed but depends on rate control
--Below faac quality --Well below the quality of competitive encoders
In my tree: --Ruggles' PARCOR --Rudimentary TNS support based on ISO 13818-7 Annex C --TNS coefficient compressor --Various performance opts --Different value for CLIPPED_ESCAPE (165113.5f * IQ) --Substantial rate control related re-factoring --Pseudo ABR rate control --Maximum frame size enforcement
--VBR rate control that forces comically high bitrate output.
Heh, do you mean it's always maximum frame size?
Not quite but many frames do saturate or get close.
TNS is not helpful at the moment. Sharp attacks are losing most of their power before we get to the TNS stage. I believe this is may be psy model related.
To be frank, at this point it seems like it might be prudent for me to stop working on this and move to either replacing the non-redistributable parts of faac (to get something legal and faac quality) or improving the 3GPP code (to get something awesome but not distributable). At this point both code bases offer better quality and more features (including SBR support from 3GPP). Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
I'm stronly against it. It seems to me that it's easier to backport FAAC psy model and codebook selection to our encoder to get comparative output - IIRC non-LGPL parts of libfaac are exactly the basic stuff I implemented.
Needing replacement: bitstream.[ch], channels.c, filtbank.c, huffman.[ch], tns.[ch] Can be eliminated: backpred.[ch], ltp.[ch] --Alex
On Wed, Jul 08, 2009 at 12:05:50AM -0400, Alex Converse wrote:
On Tue, Jul 7, 2009 at 4:45 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Applies cleanly to SVN HEAD --The most egregious of the artifacting is gone (sections being replaced by silence or having the wrong volume, etc.) --Lacks TNS
--Lacks multichannel support
Ahem, I've added it long time ago.
$ ./ffmpeg -i ../../Canyon-5.1-48khz-448kbit.ac3 canyon5.1.m4a FFmpeg version git-04fe5e6, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --disable-ffserver libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.32. 0 / 52.32. 0 libavformat 52.36. 0 / 52.36. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 built on Jul 7 2009 23:49:58, gcc: 4.3.3 Input #0, ac3, from '../../Canyon-5.1-48khz-448kbit.ac3': Duration: 00:00:37.98, bitrate: 448 kb/s Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s File 'canyon5.1.m4a' already exists. Overwrite ? [y/N] y Output #0, ipod, to 'canyon5.1.m4a': Stream #0.0: Audio: aac, 48000 Hz, 5.1, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding Segmentation fault
Something is broken in preprocessing. If you change line 482 in aacenc.c like in this patch to disable IIR filtering, it will work: Index: aacenc.c =================================================================== --- aacenc.c (revision 4653) +++ aacenc.c (working copy) @@ -479,7 +479,7 @@ if(s->last_frame) return 0; if(data){ - if(!s->psypp){ + if(1){ memcpy(s->samples + 1024 * avctx->channels, data, 1024 * avctx->channels * sizeof(s->samples[0])); }else{ start_ch = 0;
--Lacks rate control --Lacks SBR --Produces illegal bitstreams by violating the maximum frame size
This one could be fixed.
Could be fixed but depends on rate control
--Below faac quality --Well below the quality of competitive encoders
In my tree: --Ruggles' PARCOR --Rudimentary TNS support based on ISO 13818-7 Annex C --TNS coefficient compressor --Various performance opts --Different value for CLIPPED_ESCAPE (165113.5f * IQ) --Substantial rate control related re-factoring --Pseudo ABR rate control --Maximum frame size enforcement
--VBR rate control that forces comically high bitrate output.
Heh, do you mean it's always maximum frame size?
Not quite but many frames do saturate or get close.
TNS is not helpful at the moment. Sharp attacks are losing most of their power before we get to the TNS stage. I believe this is may be psy model related.
To be frank, at this point it seems like it might be prudent for me to stop working on this and move to either replacing the non-redistributable parts of faac (to get something legal and faac quality) or improving the 3GPP code (to get something awesome but not distributable). At this point both code bases offer better quality and more features (including SBR support from 3GPP). Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
I'm stronly against it. It seems to me that it's easier to backport FAAC psy model and codebook selection to our encoder to get comparative output - IIRC non-LGPL parts of libfaac are exactly the basic stuff I implemented.
Needing replacement: bitstream.[ch], channels.c, filtbank.c, huffman.[ch], tns.[ch] Can be eliminated: backpred.[ch], ltp.[ch]
Let's see: bitstream.[ch] - bitstream writing. Of course we have that. channels.[ch] - something related to multichannel. We have that. filbank.c - MDCT. We have that. huffman.[ch] - codebook coding. We have our own methods for coding. tns.[ch] - you have an alternative implementation. What's left there: aacquant.[ch] - we need to port it backpred.[ch] - can be eliminated fft.[ch] - we have one frame.[ch] - nothing important ltp.[ch] - can be eliminated midside.[ch] - M/S coding. We have that already. psychkni.[ch] - we need to port it util.[ch] - useless So, it's two or three useful files from whole bunch.
--Alex
On Wed, Jul 8, 2009 at 12:37 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Wed, Jul 08, 2009 at 12:05:50AM -0400, Alex Converse wrote:
On Tue, Jul 7, 2009 at 4:45 AM, Kostya<kostya.shishkov@gmail.com> wrote:
On Mon, Jul 06, 2009 at 09:14:00PM -0400, Alex Converse wrote:
I'd like to take a minute to discuss the status of the AAC encoder and where it is going.
In SoC svn: --Applies cleanly to SVN HEAD --The most egregious of the artifacting is gone (sections being replaced by silence or having the wrong volume, etc.) --Lacks TNS
--Lacks multichannel support
Ahem, I've added it long time ago.
$ ./ffmpeg -i ../../Canyon-5.1-48khz-448kbit.ac3 canyon5.1.m4a FFmpeg version git-04fe5e6, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-gpl --disable-ffserver libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.32. 0 / 52.32. 0 libavformat 52.36. 0 / 52.36. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 built on Jul 7 2009 23:49:58, gcc: 4.3.3 Input #0, ac3, from '../../Canyon-5.1-48khz-448kbit.ac3': Duration: 00:00:37.98, bitrate: 448 kb/s Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s File 'canyon5.1.m4a' already exists. Overwrite ? [y/N] y Output #0, ipod, to 'canyon5.1.m4a': Stream #0.0: Audio: aac, 48000 Hz, 5.1, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding Segmentation fault
Something is broken in preprocessing. If you change line 482 in aacenc.c like in this patch to disable IIR filtering, it will work:
Index: aacenc.c =================================================================== --- aacenc.c (revision 4653) +++ aacenc.c (working copy) @@ -479,7 +479,7 @@ if(s->last_frame) return 0; if(data){ - if(!s->psypp){ + if(1){ memcpy(s->samples + 1024 * avctx->channels, data, 1024 * avctx->channels * sizeof(s->samples[0])); }else{ start_ch = 0;
$ ./ffmpeg_g -i ../../Canyon-5.1-48khz-448kbit.ac3 out.aac ... $ mp4audec_mc out.aac out.wav 2>&1 | grep WARN | sort | uniq WARNING: only long windows are allowed in LFEs (winseq=1) WARNING: only long windows are allowed in LFEs (winseq=2) WARNING: only long windows are allowed in LFEs (winseq=3) WARNING: only sine shaped windows are allowed in LFEs (winshape=1)
--Lacks rate control --Lacks SBR --Produces illegal bitstreams by violating the maximum frame size
This one could be fixed.
Could be fixed but depends on rate control
--Below faac quality --Well below the quality of competitive encoders
In my tree: --Ruggles' PARCOR --Rudimentary TNS support based on ISO 13818-7 Annex C --TNS coefficient compressor --Various performance opts --Different value for CLIPPED_ESCAPE (165113.5f * IQ) --Substantial rate control related re-factoring --Pseudo ABR rate control --Maximum frame size enforcement
--VBR rate control that forces comically high bitrate output.
Heh, do you mean it's always maximum frame size?
Not quite but many frames do saturate or get close.
TNS is not helpful at the moment. Sharp attacks are losing most of their power before we get to the TNS stage. I believe this is may be psy model related.
To be frank, at this point it seems like it might be prudent for me to stop working on this and move to either replacing the non-redistributable parts of faac (to get something legal and faac quality) or improving the 3GPP code (to get something awesome but not distributable). At this point both code bases offer better quality and more features (including SBR support from 3GPP). Dsputil is awesome but developing this encoder inside ffmpeg is constricting to say the least.
I'm stronly against it. It seems to me that it's easier to backport FAAC psy model and codebook selection to our encoder to get comparative output - IIRC non-LGPL parts of libfaac are exactly the basic stuff I implemented.
Needing replacement: bitstream.[ch], channels.c, filtbank.c, huffman.[ch], tns.[ch] Can be eliminated: backpred.[ch], ltp.[ch]
Let's see: bitstream.[ch] - bitstream writing. Of course we have that. channels.[ch] - something related to multichannel. We have that. filbank.c - MDCT. We have that. huffman.[ch] - codebook coding. We have our own methods for coding. tns.[ch] - you have an alternative implementation.
What's left there: aacquant.[ch] - we need to port it backpred.[ch] - can be eliminated fft.[ch] - we have one frame.[ch] - nothing important ltp.[ch] - can be eliminated midside.[ch] - M/S coding. We have that already.
Does our mid/side work? It's not turned on.
psychkni.[ch] - we need to port it util.[ch] - useless
So, it's two or three useful files from whole bunch.
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be. --Alex
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
That's true. On the other end, lavc encoder helps all users of lavc. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Wed, Jul 8, 2009 at 11:16 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
That's true. On the other end, lavc encoder helps all users of lavc.
Well, there is that libfaac wrapper so... -- Regards, Jai
On 07/07/2009 10:57 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:16 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be. That's true. On the other end, lavc encoder helps all users of lavc.
Well, there is that libfaac wrapper so...
Well, isn't the purpose of the encoder to drop it ? -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Wed, Jul 8, 2009 at 11:40 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:57 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:16 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
That's true. On the other end, lavc encoder helps all users of lavc.
Well, there is that libfaac wrapper so...
Well, isn't the purpose of the encoder to drop it ?
Well, I was under the assumption that this was about the bigger question of having a free aac encoder, and if Alex chooses to improve libfaac and remove non free parts, then FFmpeg would still benefit. -- Regards, Jai
On 07/07/2009 11:20 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:40 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:57 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:16 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be. That's true. On the other end, lavc encoder helps all users of lavc. Well, there is that libfaac wrapper so... Well, isn't the purpose of the encoder to drop it ?
Well, I was under the assumption that this was about the bigger question of having a free aac encoder, and if Alex chooses to improve libfaac and remove non free parts, then FFmpeg would still benefit.
The project was started before the problem of license arised. The goal of the project is to have an internal aac encoder. Should we stop having internal decoders/encoders ? -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Tue, Jul 07, 2009 at 11:49:55PM -0700, Baptiste Coudurier wrote:
On 07/07/2009 11:20 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:40 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:57 PM, Jai Menon wrote:
On Wed, Jul 8, 2009 at 11:16 AM, Baptiste Coudurier<baptiste.coudurier@gmail.com> wrote:
On 07/07/2009 10:12 PM, Alex Converse wrote:
[...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be. That's true. On the other end, lavc encoder helps all users of lavc. Well, there is that libfaac wrapper so... Well, isn't the purpose of the encoder to drop it ?
Well, I was under the assumption that this was about the bigger question of having a free aac encoder, and if Alex chooses to improve libfaac and remove non free parts, then FFmpeg would still benefit.
The project was started before the problem of license arised. The goal of the project is to have an internal aac encoder.
Should we stop having internal decoders/encoders ?
Personally I don't care since I'm going to finish this encoder sooner or later. Now only where to find that time...
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote: [...]
$ ./ffmpeg_g -i ../../Canyon-5.1-48khz-448kbit.ac3 out.aac ... $ mp4audec_mc out.aac out.wav 2>&1 | grep WARN | sort | uniq WARNING: only long windows are allowed in LFEs (winseq=1) WARNING: only long windows are allowed in LFEs (winseq=2) WARNING: only long windows are allowed in LFEs (winseq=3) WARNING: only sine shaped windows are allowed in LFEs (winshape=1)
At least it decodes... And I admit that LFE lacks special treatment. [...]
Let's see: bitstream.[ch] - bitstream writing. Of course we have that. channels.[ch] - something related to multichannel. We have that. filbank.c - MDCT. We have that. huffman.[ch] - codebook coding. We have our own methods for coding. tns.[ch] - you have an alternative implementation.
What's left there: aacquant.[ch] - we need to port it backpred.[ch] - can be eliminated fft.[ch] - we have one frame.[ch] - nothing important ltp.[ch] - can be eliminated midside.[ch] - M/S coding. We have that already.
Does our mid/side work? It's not turned on.
Yes, but I still have to find an optimal way to detect it. And you can enable it by uncommenting search_for_ms entry in coders in aaccoder.c
psychkni.[ch] - we need to port it util.[ch] - useless
So, it's two or three useful files from whole bunch.
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
--Alex
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote: [...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
i do, you have my permission to merge it now. Lets call it an experiment we try to clean it up and generalize what can be generalized once it is in main svn, not before ... also no patch needed, just commit, i trust you not to break main svn. Also if you need (per codec) options as you said, tell me which, ill add them Are there any problems left for an AAC encoder in ffmpeg? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The greatest way to live with honor in this world is to be what we pretend to be. -- Socrates
Hi Michael, On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them
Do you have a per codec option system ready ? :) -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them
Do you have a per codec option system ready ? :)
no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ... until then i just add fields to AVCodecContext, 2 dozen more arent an issue so thats not holding aac up ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin
On 07/08/2009 02:06 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them Do you have a per codec option system ready ? :)
no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ...
What's needed: is custom options for encoders/decoders/muxers/demuxers which are only needed for one element. The idea of using AVCodecContext/AVFormatContext doesn't please some devs it seems (including Justin, Alex, and me). Of course global values used by all must be put in the global context. I think _devs_ would like to be able to have custom options not fitting everywhere else without poluting global context. This would also permit to have x264 and lame mapped commandlines options. Can this request be considered ? [...] -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On Wed, Jul 08, 2009 at 02:55:54PM -0700, Baptiste Coudurier wrote:
On 07/08/2009 02:06 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them Do you have a per codec option system ready ? :)
no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ...
What's needed:
is custom options for encoders/decoders/muxers/demuxers which are only needed for one element.
The idea of using AVCodecContext/AVFormatContext doesn't please some devs it seems (including Justin, Alex, and me).
Of course global values used by all must be put in the global context.
I think _devs_ would like to be able to have custom options not fitting everywhere else without poluting global context. This would also permit to have x264 and lame mapped commandlines options.
Can this request be considered ?
yes, i just need to understand what people really want and why. Heres a try, thats different from what we do now and also is similar to it give each codec/(de)muxer a foobar_opts.h file that lists its custom options and then put #include "foobar_opts.h" inside AVCodecContext from avcodec.h At a binary level its exactly the same, it also makes moving between custom and global options very easy, and it adds more seperation to the astronomic AVCodecContext. Does that look better to (Justin, Alex, and you) ? If not please all 3 of you be as elaborate as possible about what is good and bad on it Also note, for above idea to work while maintaining ABI all custom options must come after all non custom always and custom options could only be accessed through AVOptions from outside lavc (that also means lavf would need AVOptions to access them). I think that should not be a big issue as few things would access these fields ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire
Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 02:55:54PM -0700, Baptiste Coudurier wrote:
On 07/08/2009 02:06 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them Do you have a per codec option system ready ? :) no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ... What's needed:
is custom options for encoders/decoders/muxers/demuxers which are only needed for one element.
The idea of using AVCodecContext/AVFormatContext doesn't please some devs it seems (including Justin, Alex, and me).
Of course global values used by all must be put in the global context.
I think _devs_ would like to be able to have custom options not fitting everywhere else without poluting global context. This would also permit to have x264 and lame mapped commandlines options.
Can this request be considered ?
yes, i just need to understand what people really want and why. Heres a try, thats different from what we do now and also is similar to it
give each codec/(de)muxer a foobar_opts.h file that lists its custom options and then put
#include "foobar_opts.h" inside AVCodecContext from avcodec.h
At a binary level its exactly the same, it also makes moving between custom and global options very easy, and it adds more seperation to the astronomic AVCodecContext.
Could we move current global options that are only used by 1 codec into custom options at the next major version bump? I understand about adding fields to AVCodecContext with #include, but I don't quite get how AVOption would fit in? Would there be a custom AVOption array added to AVCodec? Or would they all have to go under the global options[]? Would there be a way for ffmpeg -h to indicate custom options in some way or say what AVCodec they belong to? Or would that have to be appended to the AVOption help text?
Does that look better to (Justin, Alex, and you) ? If not please all 3 of you be as elaborate as possible about what is good and bad on it
One minor downside could be name conflicts between codecs for custom options that do different things. But that would just have to be avoided with careful and specific naming. It also does not seem to allow for the case where a global option would be appropriate because of shared functionality, but where different codecs need to have different default/min/max values or help text. -Justin
On Wed, Jul 08, 2009 at 10:19:32PM -0400, Justin Ruggles wrote:
Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 02:55:54PM -0700, Baptiste Coudurier wrote:
On 07/08/2009 02:06 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote:
[...]
Also if you need (per codec) options as you said, tell me which, ill add them Do you have a per codec option system ready ? :) no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ... What's needed:
is custom options for encoders/decoders/muxers/demuxers which are only needed for one element.
The idea of using AVCodecContext/AVFormatContext doesn't please some devs it seems (including Justin, Alex, and me).
Of course global values used by all must be put in the global context.
I think _devs_ would like to be able to have custom options not fitting everywhere else without poluting global context. This would also permit to have x264 and lame mapped commandlines options.
Can this request be considered ?
yes, i just need to understand what people really want and why. Heres a try, thats different from what we do now and also is similar to it
give each codec/(de)muxer a foobar_opts.h file that lists its custom options and then put
#include "foobar_opts.h" inside AVCodecContext from avcodec.h
At a binary level its exactly the same, it also makes moving between custom and global options very easy, and it adds more seperation to the astronomic AVCodecContext.
Could we move current global options that are only used by 1 codec into custom options at the next major version bump?
If the maintainer of that codec would request it and the option is belived to be specific to just that codec, i mean not an option that we just dont support for other codecs yet ...
I understand about adding fields to AVCodecContext with #include, but I don't quite get how AVOption would fit in? Would there be a custom AVOption array added to AVCodec? Or would they all have to go under the global options[]?
global options, though they could use a similar #include system
Would there be a way for ffmpeg -h to indicate custom options in some way or say what AVCodec they belong to? Or would that have to be appended to the AVOption help text?
it would have to be appended to the help text in the very basic suggestion i had in mind
Does that look better to (Justin, Alex, and you) ? If not please all 3 of you be as elaborate as possible about what is good and bad on it
One minor downside could be name conflicts between codecs for custom options that do different things. But that would just have to be avoided with careful and specific naming.
name conflicts like you describe can only happen when the names are exreemly poorly choosen
It also does not seem to allow for the case where a global option would be appropriate because of shared functionality, but where different codecs need to have different default/min/max values or help text.
My gut feeling says a different help text is indication of serious missuse of something. About min/max, no my suggestion does not touch these at all Also instead of the #includes we could simply change avcodec.h to just group all options that are related to one codec together and add appropriate comments. This would also be nicer if we consider the global options[] array ... About per codec min/max i need to think more but at first it seems a seperate issue [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle
On date Thursday 2009-07-09 04:49:20 +0200, Michael Niedermayer encoded:
On Wed, Jul 08, 2009 at 10:19:32PM -0400, Justin Ruggles wrote:
Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 02:55:54PM -0700, Baptiste Coudurier wrote:
On 07/08/2009 02:06 PM, Michael Niedermayer wrote:
On Wed, Jul 08, 2009 at 01:41:52PM -0700, Baptiste Coudurier wrote:
Hi Michael,
On 07/08/2009 12:28 PM, Michael Niedermayer wrote: > On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote: > > [...] > > Also if you need (per codec) options as you said, tell me which, ill add > them Do you have a per codec option system ready ? :) no, i need a list of requirements/goals/use cases first once i know what the system should do that AVCodecContext fields cannot, iam sure it shouldnt be that hard ... What's needed:
is custom options for encoders/decoders/muxers/demuxers which are only needed for one element.
The idea of using AVCodecContext/AVFormatContext doesn't please some devs it seems (including Justin, Alex, and me).
Of course global values used by all must be put in the global context.
I think _devs_ would like to be able to have custom options not fitting everywhere else without poluting global context. This would also permit to have x264 and lame mapped commandlines options.
Can this request be considered ?
yes, i just need to understand what people really want and why. Heres a try, thats different from what we do now and also is similar to it
give each codec/(de)muxer a foobar_opts.h file that lists its custom options and then put
#include "foobar_opts.h" inside AVCodecContext from avcodec.h
At a binary level its exactly the same, it also makes moving between custom and global options very easy, and it adds more seperation to the astronomic AVCodecContext.
Could we move current global options that are only used by 1 codec into custom options at the next major version bump?
If the maintainer of that codec would request it and the option is belived to be specific to just that codec, i mean not an option that we just dont support for other codecs yet ...
I understand about adding fields to AVCodecContext with #include, but I don't quite get how AVOption would fit in? Would there be a custom AVOption array added to AVCodec? Or would they all have to go under the global options[]?
global options, though they could use a similar #include system
Would there be a way for ffmpeg -h to indicate custom options in some way or say what AVCodec they belong to? Or would that have to be appended to the AVOption help text?
it would have to be appended to the help text in the very basic suggestion i had in mind
Does that look better to (Justin, Alex, and you) ? If not please all 3 of you be as elaborate as possible about what is good and bad on it
One minor downside could be name conflicts between codecs for custom options that do different things. But that would just have to be avoided with careful and specific naming.
name conflicts like you describe can only happen when the names are exreemly poorly choosen
It also does not seem to allow for the case where a global option would be appropriate because of shared functionality, but where different codecs need to have different default/min/max values or help text.
My gut feeling says a different help text is indication of serious missuse of something. About min/max, no my suggestion does not touch these at all
Also instead of the #includes we could simply change avcodec.h to just group all options that are related to one codec together and add appropriate comments. This would also be nicer if we consider the global options[] array ...
About per codec min/max i need to think more but at first it seems a seperate issue
Maybe you may have a look at my mail "[RFC] New option system", it should provide the required level of configurability, there is also a patch by Art regarding per-codec options (let to define a specific AVOption/AVClass context for every codec). Regards.
On Wed, Jul 8, 2009 at 3:28 PM, Michael Niedermayer<michaelni@gmx.at> wrote:
On Wed, Jul 08, 2009 at 01:12:20AM -0400, Alex Converse wrote: [...]
One other big thing: Improvements to faac helps many people right now. People do (sadly) use faac for things. Improving the lavc encoder really only helps you and me until it's fit to merge, and who knows when that could be.
i do, you have my permission to merge it now. Lets call it an experiment we try to clean it up and generalize what can be generalized once it is in main svn, not before ... also no patch needed, just commit, i trust you not to break main svn.
It has been merged. Special thanks to Diego for helping to K&Rize/pretty print it. Thank you, Alex Converse
participants (11)
-
Alex Converse -
Baptiste Coudurier -
Benjamin Larsson -
Diego Biurrun -
Jai Menon -
Justin Ruggles -
Kostya -
Michael Niedermayer -
Robert Swain -
Ronald S. Bultje -
Stefano Sabatini