This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Does TI's 1080P H264 and AAC encoder support global header? And how to set IDR frame rate? And how to get the global header if supported?

Hi all,

Environment:

  hardware: dm6467T

  dvsdk:    dvsdk_3_10_00_19

  h264 1080p encoder:     h264fhdvenc Version 01.10.02

  aac:     aacheenc Version 1.20

 

  I want to mux h264 and aac into mov format, and mov (especially quicktime, VLC is ok if not use global header) requires global header, but TI's codec doesn't use that by default, I want to know if TI's codec support it.

  I've read TI's codec user guide, I didn't see interface to set and also retrieve the global header, and also doesn't see the interface to set IDR frame rate.

(dvsdk_3_10_00_19\cs2dm6467_1_00_00_10\packages\ti\sdo\codecs\h264fhdvenc\docs\h264_encoder_dm6467_userguide.pdf.)

(dvsdk_2_00_00_22\dm6467_dvsdk_combos_2_05\packages\ti\sdo\codecs\aacheenc\docs\AAC_HE_Encoder_C64XPLUS_UserGuide.pdf.)

 

         TI’s H264 1080p encoder h264fhdvenc seems not support global header, it can not provide us with the global header, and I’m not sure if we try to

create the global header by ourselves, the rest is ok or not.

 

         For AAC encoder, TI’s encoder can configure it to use raw output, but I don’t see the interface to provide us with global header, if none exist do we need to create the

global header by ourselves? (I guess raw output mode is for working with global header, but not sure.)

 

     I'm not an H264 expert, global header may mean something like decoder specific info, or some other name.

 

    BTW, TI's h264 codec can support 1920x1088, but not 1920x1080, right?

 

Thanks,

Colin

 


 

  •  

    Dear Colin,

    Latest H264 Encoder does support 1920x1080 encoding. Can you please tell us
    us the Build ID in h264_encoder_dm6467_releasenotes.pdf?
    This pdf will be located in ..\codecs\h264fhdvenc\docs\ folder.

    Fo global header means are you talking about SPS and PPS information?
    If yes then you will get these SPS and PPS headers at the start of encoder and then actual encoding data will come.
    Its like this.

    SPS, PPS, IDR frame...............

    Regarding your query about IDR frame rate, we do support insertion of IDR frame by setting forceFrame parameter of
    IVIDENC1_DynamicParams structure. Please refer the user guide.

    Also if you want periodic IDR frames then if you set intraFrameInterval in IVIDENC1_DynamicParams structure then IDR frames will
    be inserted priodically with intraFrameInterval.


    Thank you and Best Regards,
    bhushan.

  • Hi Bhushan,

     

    1.

        The build id is Build ID: 01.10.02.03. With your help, I did some research, and found out it's problem of maxHeight in VIDENC1_Params,

    this variable can't be 1080, otherwise function Venc1_create will fail. If I change the code in

     dmai_2_10_00_12/packages/ti/sdo/dmai/apps/video_encode_io1/appMain.c

    from:

        params.maxHeight             = args->height;

    to:

        params.maxHeight             = (args->height+15)&(~15);

     

       The dmai demo video_encode_io1_dm6467.x470MV can run, the produced h264 elementary stream can be played by vlc, also recognized as 1920x1080,

    that's great. (But one thing I'm not sure is if I need to allocate the buffer still as 1920x1088, and then set the used dimension to 1920x1080, it seems I should do so according

    to your user guide.)

     

    2.

       For global header, with your help, I noticed that it's not part of 14496-10, but it's part of 14496-15, and as your gstreamer dmai plugin supports mp4, I'll take that as a reference, but maybe still need your help. (Yes, the global header seems to be SPS,PPS,SEI, in reference to ffmpeg and x264's definition)

     

    3.

        Regarding IVIDENC1_DynamicParams, I should use interface VIDENC1_control, right? And for the input dimension, among inputHeight in IVIDENC1_DynamicParams and

    frameHeight in IVIDEO1_BufDescIn, which one is used, or they should be the same?

     

        Thanks for your help.

     

    Thanks,

    Colin

  •  

    Hi Colin,

    here is my reply.

    >But one thing I'm not sure is if I need to allocate the buffer still as 1920x1088, and then set the used dimension to 1920x1080, it seems I should do so according

    >to your user guide.)

    Yes.  You need to allocate buffer of size 1920x1088.

     

       > Regarding IVIDENC1_DynamicParams, I should use interface VIDENC1_control, right?

    Yes.

    And for the input dimension, among inputHeight in IVIDENC1_DynamicParams and frameHeight in IVIDEO1_BufDescIn, which one is used, or they should be the same?

    Settings of both these parameters is required and they should be set to same value.

    Thank you and Best Regards,

    bhushan.