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.

On the fly encoders creation

Hi,

Is it possible to create and destroy encoder channels on the fly (with different resolutions and FPS) ?

Or changing those parameters on the fly, and let the encoder start a new GOP with a relevant SPS?

for example: for the first minute of the input video i want to encode some of the input frame to an output movie of size D1 and some of the input frame to an output movie of size QVGA, and for the 3rd minute of the movie i want to encode some of the input frame to QVGA and another part of the input frame to QCIF (just for an example)

so after the 1st minute i can close the D1 encoder and QVGA encoder and in the 3rd minute open a new encoder of size QVGA and another one of size QCIF --- can it be done ?

Thanks,

Amit

  • You don't have to delete and create encLink channels for supporting resolution change.. You should create the encoder channel for max resolution. Enclink will dynamically detect change in resolution and automatically insert SPS/PPS at point of resolution change. Application can also reconfigure fps of encoder dynamically.

    If you are changing codec type from H264 to say MPEG4 or switch from interlaced to progressive encode it requires deletion and creation of encoder alg and this is supported in DVRRDK .Refer Venc_switchCodecAlgCh API.

     

  • Hi, Badri Narayanan:
    I want to realize the function : In H. 264 video coding algorithm, Can dynamic support High Profile/Main Profile/Baseline Settings.
    My method :
    Refer the Venc_switchCodecAlgCh (pChPrm, codecType, profile, vencChnId),
    H. 264 is constant (codecType = VCODEC_TYPE_H264), the profile is variable(High Profile/Main Profile/Baseline).
    When running, there is an error :

    [m3video] 2013841: ENCODE: CH0:
    [m3video] Queueing codec switch reqObj into IVA [0]
    [m3video] MemoryLeak:STAGE:0 HEAPNUM:0 ALLOC=13888 FREED=11992
    [m3video] 2013867:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_h264.c:[232]::INTERNAL ERROR:-1
    [m3video] ALGCONTROL FAILED:CMD:1
    [m3video] ERROR: XDM_UNSUPPORTEDPARAM = 14,
    [m3video] ERROR: XDM_FATALERROR = 15
    [m3video] ERROR: IH264ENC_UNSUPPORTED_VIDENC2DYNAMICPARAMS = 30,
    [m3video]
    [m3video] 2013867:ERR::linkID:10000021::channelID:0::errorCode:-5::FileName:links_m3video/iva_enc/encLink_h264.c::linuNum:1270::errorCondition:(algStatus == XDM_EOK)
    [m3video] 2013870: Assertion @ Line: 937 in links_m3video/iva_enc/encLink_common.c: retVal == ENC_LINK_S_SUCCESS : failed !!!

    how I might resolve these issues?
    thk!