[Libav-user] Changing Pro Res encoder profile

Info || Non-Lethal Applications info at non-lethal-applications.com
Fri May 23 17:02:18 CEST 2014


Hey there,

I’m writing a ProRes encoder and I’d like to be able to set the profile.
I asked this a couple of days ago already and I was told that I should have a look at the source file for the Pro Res encoder.

In the one I have here the options are defined as follows (just an excerpt):

static const AVOption options[] = {
    { "mbs_per_slice", "macroblocks per slice", OFFSET(mbs_per_slice), AV_OPT_TYPE_INT, { .i64 = 8 }, 1, MAX_MBS_PER_SLICE, VE },
    { "profile", NULL,       OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = PRORES_PROFILE_STANDARD }, PRORES_PROFILE_PROXY, PRORES_PROFILE_4444, VE, "profile" },
    { "proxy", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_PROXY }, 0, 0, VE, "profile" },
    { "lt", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_LT }, 0, 0, VE, "profile" },
    { "standard", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_STANDARD }, 0, 0, VE, "profile" },
    { "hq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_HQ }, 0, 0, VE, "profile" },
    { "4444",          NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_4444 },

And that’s how I tried to set the option:

    AVDictionary* kvDict = NULL;
    av_dict_set(&kvDict, "profile", "lt", 0);
    
    /* open the codec */
    ret = avcodec_open2(this->codecCtx, videoCodec, &kvDict);

This seems to be wrong as I’m getting the following error message:

[NULL @ 0x10180a000] [Eval @ 0x7fff5fbfe8b0] Undefined constant or missing '(' in 'lt'
[NULL @ 0x10180a000] Unable to parse option value "lt"
[NULL @ 0x10180a000] Error setting option profile to value lt.

Can anyone clarify what I’m doing wrong and tell me how to do it correctly?

Thanks!!
Best,

Flo   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140523/24fcab01/attachment.html>


More information about the Libav-user mailing list