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.

Best settings for MPEG4 encoder on DM355

Hi All,

We are struggling to decrease the blockiness of the DM355 MPEG encoder under shaky/high movement conditions.

We are using DVSDK 1.30, with dm355_codecs_1_14_003, and our parameter settings are as below:

  params.size                  = sizeof(IMP4VENC_Params);
    params.encodingPreset = XDM_USER_DEFINED;   
    params.rateControlPreset     = IVIDEO_STORAGE;
    params.maxHeight             = 720;
    params.maxWidth              = 1280;
    params.maxFrameRate          = 30000;
    params.maxBitRate            = 8000000;
    params.inputChromaFormat     = XDM_YUV_422ILE;
    params.dataEndianness        = XDM_BYTE;
    params.maxInterFrameInterval = XDM_DEFAULT;
    params.inputContentType      = IVIDEO_PROGRESSIVE;
    params.reconChromaFormat      = XDM_DEFAULT;


  memcpy(&extParams.videncParams, &params, sizeof(VIDENC1_Params));
    extParams.subWindowHeight = 720;
    extParams.subWindowWidth = 1280;
    extParams.intraFrameInterval = 10;
        extParams.meRange = 31;
        extParams.meAlgo = 2;    //0:8421H ME, 1:44421H ME
      extParams.SkipMBAlgo = 1;
        extParams.IIDC = 1;    
    extParams.intraThres = 192;
    extParams.intraAlgo = 1;
    extParams.numMBRows = 5;
    extParams.initQ = 3;
  extParams.rcQ_MAX = 31;
    extParams.rcQ_MIN = 1
  extParams.rateFix = 0;
    extParams.rateFixRange = 4;
    extParams.rotation = 0;
    extParams.UMV = 1;
    extParams.InitQ_P = 4;
    extParams.VBV_size = 10000;


We have also tried ignoring all these settings and using the encodingPreset XDM_HIGH_QUALITY but still the result is blocky picture.

If we alter the settings to rcQ_MAX = 4, and InitQ_P = 3 we get quite good quality, but sometimes our compression bitrate reaches > 12Mbit which we cannot save to storage fast enough and we end up with buffer overruns.

What we'd like to know is are the settings above appropriate for high quality on the codec, and if so, where else on the image pipeline we looking at to decrease the blockiness in the streamed video, or is this as good as it gets.

If anyone is interested we have video comparing our output with other DVR devices at the same bitrate except using H.264, instead of MPEG4-SP and the difference in quality is noticeable.  I can upload this or FTP, please PM me.

Thanks for your support.

  • Hi Ben,

    You have not mentioned the bit-rate (targetBitRate) you are trying to achieve. Assuming it is 8Mbps (=maxBitRate), and seeing that you have all the high quality tools enabled, I don't see any improvements parameter-wise that I could suggest to make it better.

    In your analysis of the output stream, I trust that the encoder is staying faithful to the indicated bit rate and not falling short. If that the case, then I'm afraid this is as good as it gets. 

    In any case, if you could upload a sample of the encoded file, I'll take a look and give my feedback.

    Regards,

    Akshay