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.

How to capture video frames in DM8148 evm kit?

I am trying to develop a real-time video enhancement program on DM814 EVM.
The task is simply 1. capture frames from the video source; 2. perform image processing algorithms(for ex. histogram equalization); 3. display the video on the monitor.
As I know, DM814 EVM has a video-input module and a video-output module, and is able to perform such tasks.

At first, I tried it using OMX. In OMX, there are some examples for video capture and encode, but I couldn't find any places where I can manipulate pixels in the captured frames.

Now, I'm trying V4L2 dirver examples which are located in 'ezsdk/example-applications/linux-driver-examples-psp04.04.00.01/video/', however, the examples are not working.

For these problems, I have few questions.
1. Is it possible to perform video enhancement(pixel manipulation) using OMX? If it possible, then, how to do it?
2. What are the differences between using OMX and V4l2 driver in the view of video processing? Is it more efficient to use V4L2 driver than OMX?
3. Please give me some idea to handle real-time video processing. (plz link url)

I have another problem that is not related to this topic. Until few days ago, OMX sample code works properly. But it doesn't work now. For this reason, I deleted all files and re-installed, re-compiled. But it still doesn't work. Can anyone tell me what should I do?

  • Hello,

    I would suggest you to check for more information:

    OMX user guilde (/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/omx_05_02_00_48).

    Also :

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide

    Shengzhe Li said:

    I have another problem that is not related to this topic. Until few days ago, OMX sample code works properly. But it doesn't work now. For this reason, I deleted all files and re-installed, re-compiled. But it still doesn't work. Can anyone tell me what should I do?

    What you mean by not working? Provide more details.

    Shengzhe Li said:

    Now, I'm trying V4L2 dirver examples which are located in 'ezsdk/example-applications/linux-driver-examples-psp04.04.00.01/video/', however, the examples are not working.

    Provide more details about video source, how is connected to the board, what error you are observing etc.

    BR

    Margarita

  • Thank you Margarita!

    Below text is entire printed message when I tryed video capture using OMX sample code.
    Source is 'video component' and out port is 'HDMI'.



    root@dm814x-evm:/usr/share/ti/ti-omx# ./capture_encode_a8host_debug.xv5T -o samp
    le.h264 -m 1080p -f 60 -b 1000000 -d 0 -n 500
    output file: sample.h264
    bit_rate: 1000000
    frame_rate: 60
    num_frames: 500
    mode: 1080p
    display_id: 0
     Capture-Encode example
    ===============================
     OMX_Init completed
     UIAClient is ready to send a UIA configuration command
    UIAClient received UIA_CONFIGURE_ACK
    UIAClient is done sending requests
    UIAClient is ready to send a UIA configuration command
    UIAClient received UIA_CONFIGURE_ACK
    UIAClient is done sending requests
     openeing file
     capture compoenent is created
     control TVP compoenent is created
    Buffer Size computed: 3110400
    set input port params (width = 1920, height = 1080)enable capture output port
    got eventEnable/Disable Event
     dei compoenent is created
    set input port params (width = 1920, height = 1080)
    set output port params (width = 1920, height = 1080)set output port params (width = 1920, height = 1080)set number of channelsset i
    nput resolutionset output resolutionenable dei input port
    got eventEnable/Disable Event
    enable dei output port 0
    got eventEnable/Disable Event
    enable dei output port 1
    got eventEnable/Disable Event
     encoder compoenent is created
    found handle 0x1244f8 for component OMX.TI.VPSSM3.VFDC
     got display handle
    found handle 0x128500 for component OMX.TI.VPSSM3.CTRL.DC
    Buffer Size computed: 4147200
    set input port params (width = 1920, height = 1080)setting input and output memory type to defaultenable input port
    got eventEnable/Disable Event
     connect call for capture-Dei
      connect call for dei- encoder
      connect call for dei-display
     got eventState changed to: OMX_StateIdle
     Capture outport buffers allocated
     got eventState changed to: OMX_StateIdle
     Capture is in IDLE state
     Dei input port use buffer done
      DEI outport buffers allocated
     got eventState changed to: OMX_StateIdle
     DEI is in IDLE state
     encoder input port use buffer done
      encoder outport buffers allocated
     got eventState changed to: OMX_StateIdle
     Encoder state IDLE
     got eventState changed to: OMX_StateIdle
     ctrl-dc state IDLE
      display buffers allocated
     waiting for IDLEgot eventState changed to: OMX_StateIdle
     display state IDLE
     got eventState changed to: OMX_StateExecuting
     display control state execute
     got eventState changed to: OMX_StateExecuting
     display state execute
     got eventState changed to: OMX_StateExecuting
     encoder state execute
     got eventState changed to: OMX_StateExecuting
     dei state execute
     got eventState changed to: OMX_StateExecuting
     capture state execute


    At here, progress is stopped and I can see only white in hdmi display.
    As I told you previously, It worked properly. But not now.

    20131101_115326.jpg



  • And I have more question.
    After some attempt, I tryed video capture using psp-examples instead of OMX.
    But it printed fail message and did not work either.
    What's the problem?


    --------------printed message----------------
    root@dm814x-evm:~/dm814x-evm/usr/share/ti/ti-psp-examples# ./saLoopBack
    failed to open capture device
    Error in opening capture device for channel 0

  • Hello,

    Shengzhe Li said:
    At here, progress is stopped and I can see only white in hdmi display.
    As I told you previously, It worked properly. But not now.

    Are you made some changes?

    Could you try:

    make clean

    make all

    make install

    and cp the capture_encode binary?

    I cannot open the .jpg file could you attach it here ?

    Could you check your video source (plug-unplug)?

    BR

    Margarita

  • Hello,

    Before to run the v4l2 capture demos you should:

    # /etc/init.d/matrix-gui-e stop
    # /etc/init.d/pvr-init stop
    # cd /usr/share/ti/ti-media-controller-utils/
    # ./load-hd-firmware.sh stop
    # ./load-hd-v4l2-firmware.sh start

    BR

    Margarita

  • Hi Margarita,

    Thanks for you quick reply.

    My problem was exactly as you said.

    Now my board can run the v4l2 demos.

  • Hello,

    I am glad that the issue is solved.

    BR

    Margarita