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.

Streamer issue

Other Parts Discussed in Thread: DM385

Hi all,

SW: ipnc rdk v3.2
HW: dm385

   Using full feature use case and modified it.My data flow is,
   Capture-->cameraLink(vpss)-->isp(vpss)-->ipcM3Out(vpss)-->ipcM3In(M3)-->encoder(M3)-->ipcBitsOut(M3)-->IpcBitsIn(A8)-->Streamer.

Here, I am not able to see RTSP streaming startup logs !! How to enable the streamer? {Pls note that streaming works if  I use default fullfeature usecase.}

Thanks in advance :)

  • Hi,

    Streaming is started by default by system_server.

    Do you see message similar to one shown below in your log:

    Play this stream using the URL:
     rtsp://172.24.190.76:8557/PSIA/Streaming/channels/2?videoCodecType=H.264

    Can you share your complete log?

    regards,

    Anand

  • Yes I am lookig for something like,
    "Play this stream using the URL:
     rtsp://172.24.190.76:8557/PSIA/Streaming/channels/2?videoCodecType=H.264
    " But No such logs visible when I run my use case. How to invoke that? 

    Thanks in advance :)



  • Hi Ravikiran,

    From your log it looks like encoder is not running properly, enc link prints shown all 29 frames are skipped hence on A8 bitstream is not written to streaming circular buffer and streaming is not started.

    Boot proc process times out since it didn't find any encoded frame in the streaming buffer and didn't start streaming process.

    Can you pl. debug your chain for any stalls?

    regards,

    Anand

     

     

  • Anand Kulkarni,

    Thank you for the response... I will debug from my side and get back.

    So if encoder runs fine do you see the possibility of running streamer successfully?

  • Hi Ravikiran,

    Yes,once encoded bitstream is written to streaming circular buffer,streaming process will start.

    regards,

    Anand

     

  • Hi Anand Kulkarni,

    My encoder thread is running. It consumes the inputs buffers in encLink_tsk.c by calling EncLink_codecProcessData().
    But If I check the output queue of the encoder inside the function EncLink_codecGetProcessedData() using Utils_queIsEmpty(&pObj->processDoneQue), It always says encoder output queue is empty. I am not sure why this is happening. Dynamic/Static params. what I set are as below:

     [m3video]  staticParams->videnc2Params.rateControlPreset =5
     [m3video]  staticParams->maxIntraFrameInterval=2147483640
     [m3video]  staticParams->maxIntraFrameInterval=2147483640
     [m3video]  staticParams->enableLongTermRefFrame =0
     [m3video]  staticParams->videnc2Params.maxInterFrameInterval=1
     [m3video]  staticParams->videnc2Params.maxHeight=1920
     [m3video]  staticParams->videnc2Params.maxWidth=1920
     [m3video]  staticParams->vuiCodingParams.numUnitsInTicks=1000
     [m3video]  staticParams->videnc2Params.inputDataMode =3
     [m3video]  staticParams->videnc2Params.outputDataMode =3
     [m3video]  dynamicParams->videnc2DynamicParams.targetFrameRate = 60000
     [m3video]  dynamicParams->videnc2DynamicParams.targetBitRate = 2000000
     [m3video]  dynamicParams->videnc2DynamicParams.intraFrameInterval = 30  
     [m3video]  dynamicParams->videnc2DynamicParams.generateHeader =0
     [m3video]  dynamicParams->videnc2DynamicParams.captureWidth = 1920
     [m3video]  dynamicParams->videnc2DynamicParams.forceFrame = -1
     [m3video]  dynamicParams->videnc2DynamicParams.intraFrameInterval = 30
     [m3video]  dynamicParams->videnc2DynamicParams.inputWidth = 1920
     [m3video]  dynamicParams->videnc2DynamicParams.inputHeight= 1080
     [m3video]  dynamicParams->videnc2DynamicParams.size = 236
     [m3video]  dynamicParams->videnc2DynamicParams.intraFrameInterval = 30
     [m3video]  dynamicParams->videnc2DynamicParams.interFrameInterval = 1

    Appreciate your help .

  • Now I enabled the ecoder logs. EncoderLink  submit batches to the using "encoderEncLink_SubmitBatch()", if it return success, it puts full frames to the out queue ie processdone queue. But It is able to process only first 3/4 frames and suddenly stops somewhere. Can some one help me to know why it stops? 

    My data Path is,
    NullSrc-->ipcOutVpss-->ipcInM3-->Encoder-->ipcBitsOutM3-->IpcBitsIn(A8).

     [m3vpss ]  5880: IPC_FRAMES_OUT   : Create Done !!!
     [m3vpss ] DCC server task running
     [m3vpss ]  5890: NULL_SRC: Create in progress !!!
     [m3vpss ]  5926: NULL_SRC: Create Done !!!
     [m3vpss ]  5926: IPC_OUT_M3   : Create in progress !!!
     [m3vpss ]  5928: IPC_OUT_M3   : Create Done !!!
     [m3video]  5929: IPC_IN_M3   : Create in progress !!!
     [m3video]  5929: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ...
     [m3video]  5930: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ...
     [m3video]  5931: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
     [m3video]  5933: IPC_IN_M3   : Create Done !!!
     [m3video]  5934: ENCODE: Create in progress ... !!!
    Starting telnet daemon [m3video]  5989: ENCODE: Creating CH0 of 1920 x 1080, pitch = (1920, 1920) [PROGRESSIVE] [NON-TILED  ], bitrate = 2000
     Kbps ...
     [m3video]  staticParams->videnc2Params.rateControlPreset =5
    .
     [m3video]  staticParams->maxIntraFrameInterval=2147483640
     [m3video]  staticParams->maxIntraFrameInterval=2147483640
     [m3video]  staticParams->enableLongTermRefFrame =0
     [m3video]  staticParams->videnc2Params.maxInterFrameInterval=1
     [m3video]  staticParams->videnc2Params.maxHeight=1920
     [m3video]  staticParams->videnc2Params.maxWidth=1920
     [m3video]  staticParams->vuiCodingParams.numUnitsInTicks=1000
    Starting syslogd/klogd:  [m3video]  staticParams->videnc2Params.inputDataMode =3
     [m3video]  staticParams->videnc2Params.outputDataMode =3
     [m3video]  dynamicParams->videnc2DynamicParams.targetFrameRate = 60000

     [host] IpcBitsInLink_tskMain:Entered
     [host]  1017: IPC_BITS_IN   : Create in progress !!!

     [m3video]  $$$ Enc: ProcessDoneQueue is not empty $$$
     [m3video] ENC : IVAHDID : 0 Number of Req Objs exceeded limit: 1
     [m3video] ENC : IVAHDID : 0 Batch creation ... DONE !!!28] ...
     [m3video] ENC : IVAHDID : 0 Number of Req Objs in Batch : 1
     _____                    _____           _         _   8] ...
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ tRate = 2000000
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
     [host]  1025: IPC_BITS_IN   : System_linkGetInfo done !!!
    Arago Project http://arago-project.org dm814x-evm ttyO0
     [host]  1025: IPC_BITS_IN   : Create Done !!!
    Arago 2010.11 dm814x-evm ttyO0
     [host] USECASE SETUP DONE
    dm814x-evm login: root (automatic login)cParams.intraFrameInterval = 30  
     [m3video] ENC : IVAHDID : 0 Channels included in Batch:Header =0
     [m3video] ENC : IVAHDID : 0 0
     [m3video] ENC : IVAHDID : 0 Submitting Batchms.captureWidth = 1920
     [m3video] ENC : IVAHDID : 0 Entering EncLink_SubmitBatch. = -1
     [m3video] IVAHDID : 0 Entering Enclink_h264EncodeFrameBatch
     [m3video] ENC : IVAHDID : 0 processMulti Call with BatchSize : 1!!= 30
     [m3video] ENC : IVAHDID : 0 Returned from  processMulti Call!!
     [m3video] IVAHDID : 0 Leaving Enclink_h264EncodeFrameBatch with error code : 0
     [m3video] ENC : IVAHDID : 0 Leaving EncLink_SubmitBatch with status 0
     [m3video]  $$$ Enc: ProcessDoneQueue is not empty $$$eight= 1080
     [m3video] ENC : IVAHDID : 0 Number of Req Objs exceeded limit: 1
     [m3video] ENC : IVAHDID : 0 Batch creation ... DONE !!!meInterval = 30
     [m3video] ENC : IVAHDID : 0 Number of Req Objs in Batch : 1terval = 1
     [m3video] ENC : IVAHDID : 0 Channels included in Batch:
     [m3video] ENC : IVAHDID : 0 0CH Create ... DONE !!!
     [m3video] ENC : IVAHDID : 0 Submitting Batch
     [m3video] ENC : IVAHDID : 0 Entering EncLink_SubmitBatch.
     [m3video] IVAHDID : 0 Entering Enclink_h264EncodeFrameBatch
     [m3video] ENC : IVAHDID : 0 processMulti Call with BatchSize : 1!!
     [m3video] ENC : IVAHDID : 0 Returned from  processMulti Call!!
     [m3video] IVAHDID : 0 Leaving Enclink_h264EncodeFrameBatch with error code : 0
     [m3vpss ] *********** isif_reg->HSIZE=20 ****************
     [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
     [host] MCFW_IPCFRAMES:Received first frame notify...
     [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:1
     [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:2   frameWidth:320  frameHeight:1440        timeStamp:6285  virtAddr[0][0]:(nil)    phyAd
    dr[0][0]:0xb8f6f100
     [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print.. [m3video] ENC : IVAHDID : 0 Leaving EncLink_SubmitBatch with status 0
     [m3video]  $$$ Enc: ProcessDoneQueue is not empty $$$
     [m3video] ENC : IVAHDID : 0 Number of Req Objs exceeded limit: 1
     [m3video] ENC : IVAHDID : 0 Batch creation ... DONE !!!
     [m3video] ENC : IVAHDID : 0 Number of Req Objs in Batch : 1
     [m3video] ENC : IVAHDID : 0 Channels included in Batch:
     [m3video] ENC : IVAHDID : 0 0
     [m3video] ENC : IVAHDID : 0 Submitting Batch
     [m3video] ENC : IVAHDID : 0 Entering EncLink_SubmitBatch.
     [m3video] IVAHDID : 0 Entering Enclink_h264EncodeFrameBatch
     [m3video] ENC : IVAHDID : 0 processMulti Call with BatchSize : 1!!
     [m3video] ENC : IVAHDID : 0 Returned from  processMulti Call!!
     [m3video] IVAHDID : 0 Leaving Enclink_h264EncodeFrameBatch with error code : 0
     [m3video] ENC : IVAHDID : 0 Leaving EncLink_SubmitBatch with status 0

     [host] ITT server task running !!!

     [host]
     ITT ittServer_run

     [host] ITT Server Message initialization successful

     [host]
     ITT capture task created
     [m3video]  $$$ Enc: ProcessDoneQueue is not empty $$$

     [host] DCC server Message ques is open succefully

     [host] Setting cmd <1> in message <40cb7c80>

     [host] Posting message <40cb7c80> in QId <20002>
     [m3vpss ] Command 1 recived from HOST A8

     [host] Response from M3 is : 1

     [host] Response from M3 is : 1

     [host] Default parameters were sent sucessfully

     [host] Server Socket created with ID <21>
     [m3vpss ] Command 2 recived from HOST A8
     [m3vpss ] New DCC data of size <33603>
     [m3vpss ] Call to VNF_LINK_CMD_UPDATE_DCC -1
    mkdosfs 2.11 (12 Mar 2005)
    unable to get drive geometry, using default 255/63/dev/sbulla has 255 heads and 63 sectors per track,
    logical sector size is 512,
    using 0xf8 media descriptor, with 1024 sectors;
    file system has 2 12-bit FATs and 4 sectors per cluster.
    FAT size is 1 sector, and provides 247 clusters.
    Root directory contains 512 slots.
    Volume ID is 4d81fae2, no volume label.
    g_file_storage gadget: No serial-number string provided!
    g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
    g_file_storage gadget: Number of LUNs=1
    g_file_storage gadget-lun0: ro=0, nofua=0, file: /dev/sbulla
    Simple mixer control 'PGA',0
      Capabilities: cvolume cswitch penum
      Capture channels: Front Left - Front Right
      Limits: Capture 0 - 119
      Front Left: Capture 80 [67%] [40.00dB] [on]
      Front Right: Capture 80 [67%] [40.00dB] [on]
    root@dm814x-evm:~# queue id:0
    ApproDrvInit: 3
    Creat queue id:131076
    queue id:131076
    queue id:0
    ApproDrvInit: 7
    queue id:131076
    TimeOut occure in boot_proc.

    Thanks in advance :)

  • Hi Ravikiran,

    Pl. check the following points:

    • In EncLink_codecGetProcessedData() fn Utils_bitbufPutFull() is called and next link is notified via System_sendLinkCmd().
    • EncLink_getFullBufs() and EncLink_putEmptyBufs() are called these APIs switch buffers with the next link.

    regards,

    Anand

  • Hi,

     

    Could you also check if notifyNextLink/notifyPrevLink are set to TRU?

     

    Rgds,

    Brijesh

  • Hi Anand Kulkarni,

    • As i stated in my previous reply, pObj->processDoneQue() is Empty. That means Encoder has not placed any valid data in out queue. It calls Utils_bitbufPutFull() only if there is some valid data in pObj->processDoneQue(). In this case since there is no encoder output Utils_bitbufPutFull() is not called!!
    • It will inform next link only if there are some  valid output in outQueue. I tried forcing the SendNotification to next Link to true every time. and NextLink i.e.IpcBitsOut(M3) runs, but it is not receiving any dat, bcz no buffers available @ outQueue of previous Link.
    • By Tracing this issue, I found some Problem with the EncLink_codecProcessTskFxn(). This is thread which is supposed to submit the batches to the codec & call Enclink_h264EncodeFrameBatch() function to process the data. This thread stops somehow after processing 2/3 frames. Can you tel me how to debug, why the thread stops!!
      Looking forward for your reply .
      Appreciate Your help.
  • Hi

    If the encoder puts proper data in the output queue, then only we set notifynextLink = TRUE. In this case, My EncLink_codecProcessTskFxn() itself is not running properly.

    It process first 2/3 frames and then stop running. So I am failing to submit any input to the encoder!! Looking forward for suggestions ..

    Thank you :)

  • Hi Ravikiran,

    In your first post you mentioned streaming works in default full feature usecase and you are facing issues only in your modified usecase.

    So assuming there are no changes in enc parameters and enc link code,encoder should not have any issues.

    So i suggest you to check part of chain that you have modified,you can connect isp link to a null link and check if it is fine.

    regards,

    Anand

  • Hi Anand,

                I haven't modified anything in the original codebase except  multich_tristream_fullfeature.c.(Say other parts of the code are Original code only)
    I am sing full feature  application in RULES.make i.e multich_tristream_fullfeature.c.

    So in multich_tristream_fullfeature.c file I have done following changes.

    • Disabled cameraLink. 
    • Enable NullSrc
    • disable dup/merge/fd/swosd/sclr/ etc.
    • Connected my NullSRC to ipcM3OutVpss Link.

      The data flow is as below here onwards.
      NullSrc ---> ipcOutM3vpss -->ipcM3IN-->ENCODER-->ipcBitsOutM3-->IpncBitsIn(A8)

    ISSUE:

    1. Streamer is not getting started!!
    2. I am able to see encoder Logs as below, indicates encoder thread works fine(Resolved previous issue).
    3. Some Error logs observed while running but encoder still works fine!!.


      ENCODER LOGS:

    Usecase is Active !!!

     [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
     [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3video]  ==================== EncLink_PrintDetails ===================
    =
     [m3video]      837244: HDVICP-ID:0
     [m3video]              totalAcquire2wait in msec:2030712572
     [m3video]              totalWait2Isr in msec:  377266
     [m3video]              totalIsr2Done in msec:       2
     [m3video]              totalWait2Done in msec:  377268
     [m3video]              totalDone2Release in msec:       0
     [m3video]              totalAcquire2Release in msec:       0
     [m3video]              totalAcq2acqDelay in msec:       0
     [m3video]              totalElapsedTime in msec:       0
     [m3video]              numAccessCnt:       0
     [m3video]              IVA-FPS :       0
     [m3video]  
     [m3video]  *** ENCODE Statistics ***
     [m3video]  
     [m3video]  Elasped Time           : 59 secs
     [m3video]  
     [m3video]  
     [m3video]  CH  | In Recv In Skip In User  Out Latency  
     [m3video]  Num | FPS     FPS     Skip FPS FPS Min / Max
     [m3video]  --------------------------------------------
     [m3video]    0 |      30       0        0  30 255 / 837220
     [m3video]  
     [m3video] Multi Channel Encode Average Submit Batch Size
     [m3video] Max Submit Batch Size : 24
     [m3video] IVAHD_0 Average Batch Size : 1
     [m3video] IVAHD_0 Max achieved Batch Size : 1
     [m3video]  =================================================================

     [host]
    Usecase is Active !!!

    Error Logs in run time :

    [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
     [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print..ApproDrvExit: 7
    Error: WaitStreamReady Fail.
    Error: SemWait: Invalid Semaphore handler
     [host]
    Force IDR on Channel: 0
     [host]
    Force IDR on Channel: 1Error: SemRelease: Invalid Semaphore handler
    SystemInit success
    Schedule manager init success
    Dmva Schedule manager init success
    umount: /mnt/mmc: not mounted
    FAT: bogus number of reserved sectors
    VFS: Can't find a valid FAT filesystem on dev mmcblk0.
    mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    killall: dhcpcd: no process killed
    nfs: server 192.168.1.218 not responding, still trying
    nfs: server 192.168.1.218 not responding, still trying
    nfs: server 192.168.1.218 not responding, still trying
     [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
     [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print..

    Looking forward for your reply.

  • Hi Ravikiran,

    The default usecase for IPNC is 'tristream' so when streamType is tristream system server waits for third stream to be available before starting streaming process.

    But in your case third stream is not available so streaming doesn't start so you will see "Error: WaitStreamReady Fail"

    You can do 2 things:

    1. You can change STREAMTYPE_DEFAULT to 0 (single stream) in ../ipnc_rdk/ipnc_app/interface/inc/system_default.h file and build the code.Also you need to delete sysenv.cfg file present in /mnt/nand on IPNC so that your new default value is saved in nand.
    2. From web GUI change to single stream.

    regards,

    Anand

  • Hi Anand, 

    I am able to resolve the issue after deleting sysenv.cfg..!!

    Appreciate your help :)