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.

DM8127IPNC minimal implementation of capture/encoding

Other Parts Discussed in Thread: DM385

I hope you guys can give me some advice on this.

There are too many features in the IPNC RDK I really don't need. I just want a triple stream capture/encoding.
The 1080p h264 stream will be saved to permanent storage, downsized D1 will be processed by DSP, MJPEG will be used for web viewing.

1. Can I achieve this by using only the MCFW demo application? in other words, I will try to get rid of the system_server, avi_save, rtsp streaming,alarm,etc.

2. I am saving the h264 elementary stream by modifying ti_mcfw_ipcbits.c: App_streamSysVidWrite(), is this a proper place to do this?

thanks for your input.

  • Hi Hongfeng ,

    On (1), you can get rid of system_server, avi_save, rtsp streaming,alarm. Where do you want to store the stream? Depending upon your flow, you may need to hookup the appropriate logic / link on the A8 core.

    On (2), ti_mcfw_ipcbits.c is the correct place to modify.

    Please do let us know more details on what you like to achieve, like data rate, what is the storage container - sata, sd card, pcie...etc.

    Regards

    Rajat

  • Thanks for the reply, Rajat.

    The stream will be stored to SATA or USB drive, as h264 elementary stream. Bit rate should be configurable,usually around ~2mbps due to drive capacity limit.

    a couple of more questions:

    1) What's the proper way to adjust video bitrate dynamically. Can I just call stream_feature_setup() directly in ti_mcfw_ipnc_main.c?

    2) If i get rid of system_server, is there any complications? I see "boot_proc" is used in init script. I don't know exactly what role it plays, and if I just want one stand alone application, is that still needed?

    I have many more questions for you.

  • I'm attempting to do something similar right now.

    I'm working with DM385 IPNC RDK and I wish to save video to the SD card. Right now data rate and resolution don't matter. I just want to be able to save captured video in a file.

    Later on I'd wish to do it when an alarm trigger goes off, being able to keep video starting X seconds before alarm trigger and Y seconds after.

    It'd be great if you could share some knowledge about this or point me in the direction where I could learn about implementing this.

    Thank you.

  • Hi Rajat,

    I am doing something similar on DM8127 IPNC with ipnc_rdk V3.5. Sensor used is MT9J003 which is setup to work with 1080p mode.

    Till now, I am able to successfully set my custom path. i.e capture-->encode MJPEG Only -->SINGLE_STREAM streaming over RTSP(1080p).  Now I am looking to change the sensor to 8MP mode i.e width=3264 height=2448 (supported by MT9J003). But My JPEG encoder throws below errors continuously.  

    ERROR LOGS:
     [m3video] ENCLINK:ERROR in Enclink_JPEGEncodeFrame.Status[-1]
     [m3video] 15975:WARN
     [m3video] ENC : IVAHDID : 0 ENCLINK:ERROR in EncLink_SubmitBatch.Status[-1]
     [m3video] 16083:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_jpeg.c:[216]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED
     [m3video] JPEG Extended error 8000

    We called XDS_GETSTATUS control call with status after each process call & the status logs are as below.

    status.extendederror0=0
    status.extendederror1=0
    status.extendederror2=0
    status.extendederror3=0

    Debug Static and dynamic params:

      inputBufDesc        :Width=3264 Height=2448
      outputBufDesc      :numBufs=1 size in bytes bytes=34564644 w=34564644 h=0
      static parameters  : Width=3328 Height=2560 InputFormat=9 profile=100 level=-1
      dynamic param.    :Width=3264 H=2448 CaptureWidth=3296

    Note:

    Sensor configurations are fine. I verified this by dumping 3264x2448 YUV data to file system. I am able to view proper 8MP image using YUV player.

    Appreciate any help on this towards resolving the problem.

  • @eliba: yes, this could be done. 

    1) I replaced the stock rootfs with ubuntu 12.04 armel, so it's completely fresh start.

    2) copy /opt/ipnc/bin, /opt/ipnc/scripts, /opt/ipnc/kermod, /opt/ipnc/firmware to your new rootfs

    3) after kernel starts up, call a script to start remote_debug_client.out, insert syslink.ko and cmem.ko, etc.

    4) starts ipnc_rdk_mcfw.out, now video should be captured and encoded.

    Let me know which part you need further details

  • @Hongfeng Wang

    I'm not sure I understand what you mean. Is switching to ubuntu 12.04 necessary to be able to save a video sequence on a file?

  • @eliba: no, it is not neccessary, but you could easily get lost if you are beginner with RDK, so i was just trying to showing what's the MINIMAL configuration needed for RDK to run. so you don't script A calling script B, which is calling script C

  • I see, 

    I have a few more questions for you:

    1) What image version should I pick? OMAP3/OMAP4? Could you direct me to a more detailed description of the process?

    2) How would I implement alarm dependent video capture to file after I do the steps you described?


    Thanks for your help. I see the alarm mechanism is already implemented on the IPNC. 

    I see there are several types of images of ubuntu 12.04 for ARM processors, which one should I get in case I decided to install it on the IPNC?

  • Hi Hongfeng, Eliba,

    The alarm trigger based recording is already implemented in IPNC RDK. You can set it up from the GUI itself.

    Regards

    Rajat

  • @eliba, I am using this: http://old-releases.ubuntu.com/releases/ubuntu-core/releases/12.04/release/ubuntu-core-12.04-core-armel.tar.gz

    Alarm is implemented in IPNC, but I completely got rid of system_server, etc. I save last couple minutes of h264 elementary stream frames into DDR, when event(alarm, for example)happens, you save what's in the DDR already as well as frames after the event. this way you have a pre-roll capability as well.

  • @Hongfeng

    Did you make your own implementation of this? Could you share it here?

    Also, why did you choose to get rid of system_server?

  • @eliba, I still use the ipnc_rdk_mcfw.out binary from RDK, but I got rid of the ipnc_app part, including the system_server. I need a complete different web interface. I also prefer a community distribution like Ubuntu, which gives me a lot of flexibility. I installed openssh, lighttpd, php5-cgi, gdb etc.

    ipnc_rdk_mcfw.out alone gives the capability to capture, encode and store videos, that's just enough for what I needed.