[Ffmpeg-devel] movenc.c ipod h264 suggested change

Jason Millard jsm174
Thu Mar 30 18:18:10 CEST 2006


one more thing,

in x264.c, only the level is passed over and not the profile:

    if(avctx->level > 0) x4->params.i_level_idc = avctx->level;

and in libx264 set.c the profile is always automatically determined:

void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
{
    sps->i_id = i_id;

    sps->b_qpprime_y_zero_transform_bypass = !param->rc.b_cbr &&
param->rc.i_qp_constant == 0;
    if( sps->b_qpprime_y_zero_transform_bypass )
        sps->i_profile_idc  = PROFILE_HIGH444;
    else if( param->analyse.b_transform_8x8 || param->i_cqm_preset !=
X264_CQM_FLAT )
        sps->i_profile_idc  = PROFILE_HIGH;
    else if( param->b_cabac || param->i_bframe > 0 )
        sps->i_profile_idc  = PROFILE_MAIN;
    else
        sps->i_profile_idc  = PROFILE_BASELINE;
    sps->i_level_idc = param->i_level_idc;

.
.
.

-- Jason

On 3/30/06, Jason Millard <jsm174 at gmail.com> wrote:
> Okay, I finally think I understand what is going on and I think I
> understand the previous emails.
>
> I've been trying to remux ffmpeg encoded videos using mp4creator for
> the ipod. (This was before Apple released 1.1.1 firmware).
>
> Anyway, with the hard-coded 77->66 and 30->13 changes to movenc.c,
> everytime I would remux the video, the profile would end up
> Baseline at 5.1. (Even though I knew it was Baseline at 1.3)
>
> I started examined the avcC tags using a hex editor. Now I understand,
> that making changes directly to movenc.c only change the profile and
> level in the container. Then x264 uses its own default values.
>
> When I modified movenc.c to fetch track->enc->profile and
> track->enc->level and then passed them in on the command line, the
> mp4creator remuxing worked fine, because just like BOND's email
> stated, x264 uses those values if provided.
>
> So back to the other emails
>
> >> Maybe there is an interface to x264 for retrieving profile and level
> >> indication ?
>
> >Hmm... the x264 api currently has no way to retrieve global info from the
> >encoder. I suppose I could write profile back into param_t after deriving
> >it from the other settings. But that doesn't affect the decision for
> >ffmpeg's user interface, it just means ffmpeg could tell you if you
> >picked incompatible settings.
>
> So now that we know custom values can be shared, how do we share default values?
>
> Thanks,
> -- Jason
>
>
> On 3/30/06, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Hi
> > On Wed, Mar 29, 2006 at 07:16:05PM -0500, Jason Millard wrote:
> > > Okay.
> > >
> > > I can put the "ipod5g" or maybe "ipod-5g"? This way I can work it like
> >
> > ok
> >
> > also h264 as codec must be under #ifdef as it depends on x264 for encoding
> > if x264 isnt there then mpeg4 should be used for target ipod
> >
> >
> > > the NTSC options, ie. just look for "ipod-".
> > >
> > > So how does this work now? How long does it take for changes to get
> > > placed in CVS?
> >
> > happens immedeatly or takes weeks and only if every comment has been
> > taken care of somehow
> >
> > [...]
> > --
> > Michael
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at mplayerhq.hu
> > http://mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> >
>





More information about the ffmpeg-devel mailing list