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.

OMX example decode_display problems.

Hello,

I'm using EZSDK 5.05 and DM8168 EMV Rev C with video confernece I/O board.

i've face some problem with decode_display example.

Here is my configuration for test.

1. Change resolution from 1080p to 720p. (Because the camera I used for test support uptp 720p.)

2. Modify Capture_encode Example code to support HDMI input. (-c options, 0 means HDMI and 1 for component input)

I use Capture_encode_decode_display.tar.gz for the reference.

2. Modify Capture_Encode example code to test CBR/VBR.

    In IL_ClientSetEncodeParams(), tEncodePreset.eRateControlPreset = OMX_Video_RC_None --> OMX_Video_RC_Low_Delay(CBR), OMX_Video_RC_Storate(VBR)

3. Run Capture_Encode example like below. It works well.

./capture_encode_a8host_debug.xv5T -o test0.h264 -m 720p -f 60 -b 1000000 -c 0 -d 0 -n 100

4. Run decode_display example(with any modifications), then the application is not working.

./decode_display_a8host_debug.xv5T -i ./test0.h264 -w 1280 -h 720 -f 60 -c h264 -d 0 -g 0

the result message is

root@dm816x-evm:~/dm816x-evm/usr/share/ti/ti-omx# ./decode_display_a8host_debug.
xv5T -i ./test0.h264 -w 1280 -h 720 -f 60 -c h264 -d 0 -g 0
input file: ./test0.h264
width: 1280
height: 720
frame_rate: 60
gfx: fbdev disable
codec: h264
display_id: 0
 Decoder-Display 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
 opening file
 decoder compoenent is created
PADX: 32 PADY: 24
 level set is 12
 scalar compoenent is created
set input port params (width = 1280, height = 720)
set output port params (width = 1280, height = 720)
set number of channels
set input resolution
set output resolution
enable scalar input port
got eventEnable/Disable Event
enable scalar output port
got eventEnable/Disable Event
found handle 0x143068 for component OMX.TI.VPSSM3.VFDC
 got display handle
found handle 0x147070 for component OMX.TI.VPSSM3.CTRL.DC
Buffer Size computed: 1843200
set input port params (width = 1280, height = 720)
setting input and output memory type to default
enable input port
got eventEnable/Disable Event
 connect call for decoder-scalar
  connect call for scalar-display
  decoder inport buffers allocated
  decoder outport buffers allocated
 got eventState changed to: OMX_StateIdle
 decoder state IDLE
  Scalar input port use buffer done
  scalar outport buffers allocated
 got eventState changed to: OMX_StateIdle
 scalar state IDLE
 got eventState changed to: OMX_StateIdle
 ctrl-dc state IDLE
 got eventState changed to: OMX_StateIdle
 display state IDLE
 got eventState changed to: OMX_StateExecuting
 display control state execute
 got event*** unrecoverable error: OMX_ErrorBadParameter (0x80001005)

How can I run decode_display application with my encoded file?

And I have another question.

When tEncodePreset.eRateControlPreset is set to (1. omx_video_rc_none, 2. omx_video_rc_low_delay, 3, omx_video_rc_storage)

with tEncodePreset.eEncodingModePreset to omx_video_enc_default, which result file has the most size?

In my case for 100 frames, rc_none option has the largest file size and rc_low_delay option has the smallest file size. Is it correct?

Best Regards,

Jongpil.

  • Hello,

    OMX_ErrorBadParameter (0x80001005) means that one or more parameters were not valid.

    First can you verify, that your captured video is playable on PC via VLC or other player.

    Best Regards,

    Margarita

  • Hello,

    Could you run LoggerSMDump Utility for more information.

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

    Best Regards,

    Margarita

  • Hi Margarita Gashova,

    I was able to encode a raw YUV file of 1920X1080 to h264 and run that in DM8148 board. I can see the video in h264 format.

    I was trying the same application with a raw file of 1920X1200, while conversion I was getting an error saying 

     got event*** unrecoverable error: OMX_ErrorBadParameter (0x80001005)

    The Log file is as follows:

    root@dm814x-evm:/media/card# ./encode_a8host_debug.xv5T -o sample_1200.h264 -i 1  
    920X1200.yuv -f 30 -b 1000000 -w 1920 -h 1200 -c h264
    output file: sample_1200.h264
    input file: 1920X1200.yuv
    bit_rate: 1000000
    frame_rate: 30
    codec: h264
    width: 1920
    height: 1200
     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
     opening file  
     encoder component is created  
     encoder input port allocate buffer done  
      encoder outport buffers allocated  
     got event*** unrecoverable error: OMX_ErrorBadParameter (0x80001005)

    Can you please tell me any changes to be made.

    My requirement is to encode the 1920X1200 file to h264 and display it.

    Thanks in advance,

    Regards,

    Baz

  • root@dm814x-evm:/media/card# ./encode_a8host_debug.xv5T -o sam_120.h264 -i 1920X  
    1200.yuv -f 30 -b 1000000 -w 1920 -h 1200 -c h246
    output file: sam_120.h264
    input file: 1920X1200.yuv
    bit_rate: 1000000
    frame_rate: 30
    codec: h246
    width: 1920
    height: 1200
     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
     opening file  
     encoder component is created  
    ERROR: src/ilclient_utils.c: 614: failed to set Encode bitrate

    It says failed to set the bitrate. Can you please suggest me how to set the bitrate.

    Regards,

    Baz

  • Hello Baz,

    I am sorry for delay. I am seeing that you are trying resolution 1920x1200.

    If you want to use this resolution you should make some changes in the overlay package, this is the reason you to observed bad params error. Could you try with 1920x1080, this should work. 

    Also you could check the omx user guide the vfcc component, the supported resolution is up to Full HD.

    Best Regards,

    Margarita

  • Hi Margarita,

    I am sorry, can you please tell me what you mean by overlay packages.

    Can you suggest me exactly where we need to do the changes in overlay package. 

    Q1:- My goal is to produce an 1920X1200 video file with h264 encoding and audio (wav or pcm) interleaved to it, in an AVI container. 

    Q2:- Can we create a bookmark kind of thing, where a particular timestamp can be recorded and saved, So that if the saved file is played later they can click the bookmark and start playing the file from that particular time stamp.

    Thanking you,

    Regards,

    Baz

  • Hi Basavaraju,

    Overlay package is the source package that contains the source code for HDVPSS driver. This package should be licensed from TI separately. 

    Currently the HDVPSS firmware doesn't support WUXGA 1920x1200, eventhough the hardware supports WUXGA. If you need to add support for it, you'll have to modify the HDVPSS firmware and the corresponding Linux drivers. 

  • Hi Renjith Thomas,

    Do you have any idea how to interleave audio on a video file using OMX api's.

    I have been struggling to do that. I want use the capture encode application and modify that, in order to save audio into it.

    Regards,

    Basavaraju Gandla

  • Hi Basavaraju,

    I'm not a multimedia expert, but I believe that's its quite easy to write two different streams to a file. There might be sample applications available for this. 

  • Hi Renjith Thomas,

    Can you refer me to TI multimedia expert, to whom I can explain my problem.

     

    Regards,

    Basavaraju Gandla

  • Basavaraju,

    You can ping Badari Narayan or Brijesh Jadav from TI through this forum.

  • Hello Badari Narayan,

    I have been referred by Renjith Thomas.

    Can you please guide me in interleaving audio on video file.

    In the capture encode application I would like to add audio and save that in an .avi container.

    Thanking you,

    Regards,

    Basavaraju Gandla

  • Hi Renjith Thomas,

    I have to achive the 1920x1200 resolution. So can you please guide me, what are all the modification required at different levels to achive the same for using the OMX.

    Regards,

    Basavaraju Gandla

  • Hi Basavaraju,

    I don't think enabling WUXGA can be done over the forum. It needs modification from both M3 firmware and Linux side. Please send me an email and we can discuss this offline.

  • Hi Renjith,

    I am using DM8148 kit, I have a requirement to capture video at 1920*1200 at 30fps. I have the following queries:

    1)How to make the HDVPSS to support WUXGA 1920x1200? IF any package is required in the EZSDK, how to download it, please provide the link? If any licensing is required, then how to do do that, please explain?


    2) In the EZSDK OMX framework is used for capture video which is using HDVPSS?  Does OMX video capture component (VFCC) supports capturing at 1920*1200? If not then which other framework can be used?

  • Hi Debasish,

    You'll have to license the firmware. We can discuss this offline. Please send an email to me.