[Ffmpeg-devel] [PATCH] access all bitrates for amr nb encoding

Michael Niedermayer michaelni
Fri Feb 23 13:08:50 CET 2007


Hi

On Fri, Feb 23, 2007 at 10:37:46AM +0100, Benoit Fouet wrote:
> Hi,
> 
> Benoit Fouet wrote:
> > Hi,
> >
> > Michael Niedermayer wrote:
> >   
> >> Hi
> >>
> >> On Thu, Feb 22, 2007 at 05:53:37PM +0100, Benoit Fouet wrote:
> >>   
> >>     
> >>> Hi,
> >>>
> >>> Benoit Fouet wrote:
> >>>
> >>> [snip]
> >>>     
> >>>       
> >>>>>>> then at appropriate places in the code the stuff from
> >>>>>>> avctx_opts/avformat_opts is copied into the actual contexts
> >>>>>>>
> >>>>>>>   
> >>>>>>>       
> >>>>>>>         
> >>>>>>>             
> >>>>>>>               
> >>>>>> this is what i still have problems to see how is done...
> >>>>>> and i guess i have to understand if i want to split it correctly (and do
> >>>>>> things at their right places too)
> >>>>>>     
> >>>>>>       
> >>>>>>           
> >>>>>>             
> >>>>> just grep for avctx_opts and replace it by avctx_opts[codec_type which looks
> >>>>> appropriate]
> >>>>>
> >>>>>
> >>>>>   
> >>>>>     
> >>>>>         
> >>>>>           
> >>>> i'm doing something like that at the moment... i'll get back when i get
> >>>> all this working correctly (i mean, at least regression tests (which
> >>>> have just finished successfully) and a bench of tests i have too)
> >>>>
> >>>>   
> >>>>       
> >>>>         
> >>> well... i guess i missed something again...
> >>> how can we know we have to fill only "audio / video / whatever" options
> >>> in avctx_opts[codec_type] ?
> >>> i mean, do i have to split opt_default function too ? or is there
> >>> something i completely missed about default option management ?
> >>>     
> >>>       
> >> my idea was:
> >>
> >>     for(i=0; i<CODEC_TYPE_NB; i++)
> >>         o=av_set_string(avctx_opts[i], opt, arg);
> >>     if(!o)
> >>         o= av_set_string(avformat_opts, opt, arg);
> >>     if(!o){
> >>         if(opt[0] == 'a')
> >>             o= av_set_string(avctx_opts[CODEC_TYPE_AUDIO], opt+1, arg);
> >>         else if(opt[0] == 'v')
> >>             o= av_set_string(avctx_opts[CODEC_TYPE_VIDEO], opt+1, arg);
> >>     }
> >>     if(!o)
> >>         return -1;
> >>
> >> but i do not know if this will work ...
> >>
> >> [...]
> >>   
> >>   
> >>     
> > oh... ok !
> > i was trying to come out with something more "general" (and failed to it
> > at the moment...)
> > i'll try that today...
> >   
> well... i don't think this can work...
> i was thinking of the example of "b" and "ab" options for instance...
> correct me if i'm wrong, but i think that using a command line with -ab
> and then -b option will lead to override the first audio bitrate by the
> second one...
> if the options are set in the other way, though, this could work... but
> i don't think you want to have an order in command line options :)
> so... we still have our opt_default problem...

well the user could then set -ab Y -vb X
if he says -b it means all bitrates so its logic to well set all
sure it changes behavior and iam not sure its the best solution but 
IMHO its more consistant to prefix video by v when audio is prefixed by a

and about order, well -ab X -ab Y is also depending on order

so are -s X -i Y 

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070223/21ce9c0a/attachment.pgp>



More information about the ffmpeg-devel mailing list