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.

DV8168 dvrlib based on mcfw: custom chain problem - no video detected

Other Parts Discussed in Thread: TVP5158

Dear friends!

I works with udworks DVR, based on DM8168, and try to create custom chain that perform very simple operations: capture -> H264 encode -> stream via RTSP.

I want to capture only 8 channels (D1 resolution), only primary stream, no secondary stream, encode captured channels for H264 and send to streammer. 

Application into function DVR_StartSystem(..) applyed to my "custom usecase". This usecase used followed links connected as is below:

 SYSTEM_LINK_ID_CAPTURE =>

    SYSTEM_LINK_ID_DEI_0 =>

       SYSTEM_LINK_ID_NSF_0 =>

          SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0 =>

              SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0 =>

                   SYSTEM_LINK_ID_VENC_0 =>

                         SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0 =>

                                SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0 =>

                                    SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0

 

capture parameters are as following:

 

 for (vipInstId = 0u; vipInstId < (Uint32)capturePrm.numVipInst; vipInstId++) {   pCaptureInstPrm                     = &capturePrm.vipInst[vipInstId];   pCaptureInstPrm->vipInstId          = (SYSTEM_CAPTURE_INST_VIP0_PORTA+              vipInstId)%SYSTEM_CAPTURE_INST_MAX;   pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP5158_DRV;   pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;   pCaptureInstPrm->standard           = SYSTEM_STD_MUX_4CH_D1;   pCaptureInstPrm->numOutput          = 1;

  pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];   pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;   pCaptureOutPrm->scEnable            = FALSE;   pCaptureOutPrm->scOutWidth          = 0;   pCaptureOutPrm->scOutHeight         = 0;      pCaptureOutPrm->outQueId            = 0;  }

 

H264 encoder parameters are as following:

  EncLink_CreateParams_Init(&encPrm);

  /* Primary Stream Params - D1 */   for (i = 0; i < encChannels; i++)   {    pLinkChPrm  = &encPrm.chCreateParams[i];    pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

   pChPrm      = &gVencModuleContext.vencConfig.encChannelParams[i];    pDynPrm     = &pChPrm->dynamicParam;

   pLinkChPrm->format                  = IVIDEO_H264HP;    pLinkChPrm->profile                 = gVencModuleContext.vencConfig.h264Profile[i];    pLinkChPrm->dataLayout              = IVIDEO_FIELD_SEPARATED;    pLinkChPrm->fieldMergeEncodeEnable  = FALSE;    pLinkChPrm->enableAnalyticinfo      = pChPrm->enableAnalyticinfo;    pLinkChPrm->maxBitRate              = pChPrm->maxBitRate;    pLinkChPrm->encodingPreset          = pChPrm->encodingPreset;    pLinkChPrm->rateControlPreset       = pChPrm->rcType;

   pLinkDynPrm->intraFrameInterval     = pDynPrm->intraFrameInterval;    pLinkDynPrm->targetBitRate          = pDynPrm->targetBitRate;    pLinkDynPrm->interFrameInterval     = 1;    pLinkDynPrm->mvAccuracy             = IVIDENC2_MOTIONVECTOR_QUARTERPEL;    pLinkDynPrm->inputFrameRate         = pDynPrm->inputFrameRate;    pLinkDynPrm->rcAlg                  = pDynPrm->rcAlg;    pLinkDynPrm->qpMin                  = pDynPrm->qpMin;    pLinkDynPrm->qpMax                  = pDynPrm->qpMax;    pLinkDynPrm->qpInit                 = pDynPrm->qpInit;    pLinkDynPrm->vbrDuration            = pDynPrm->vbrDuration;    pLinkDynPrm->vbrSensitivity         = pDynPrm->vbrSensitivity;   }

  encPrm.inQueParams.prevLinkId    = ipcInVideoId;   encPrm.inQueParams.prevLinkQueId = 0;   encPrm.outQueParams.nextLink     = ipcBitsOutVideoId;

  for (i = 0; i < ENC_LINK_MAX_BUF_ALLOC_POOLS; i++) {    encPrm.numBufPerCh[i] = 3;//VN_NUM_ENCODE_D1_BUFFERS;   }

 }

 

After compilation my application (encoder and streammer) started successfully, I saw printed stream' URL's, but have message - "no video detected" from all captured' channels.

I would be very glad if you can help to fx the problem. The majority of code for my custom chain taken from original chain supplied with DvrRDK demo with removal unnecesary for me displays, duplications, decoder and merge links.

 

Thank you very much and best regards.