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 set encode params in omx encode demo on EVM8168 ?

Hi,

   I run the omx encode demo in EZSDK5.05 using an input file in.yuv which is produced after running the decode demo. The demo runs successfully with no errors, but the output file out.264 isn't quite right. The framerate and color are abnormal. It seems that some params set incorrect. 

  The input video format for the decode demo is 640*480 25P H264.

   So, could someone help me to set the correct params? Thanks very much ! Appreciate your repaly !

  • Hello,

    Have you checked that:

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

    Is that what are you trying out?

    BR

    Vladimir

  • Hi Vladimir,

         Thanks for your quick replay ! I have checked the wiki page before. It does not mention the encode example. I have done something with the OMX_EZSDK_Examples, such as multichannel decoder. But, when I move to the encode example, this problem appears. 

         So, could you run the encode example to check out if there are some issues?

         Appreciate your replay ! 

  • For the encode demo you can check:

    <EZSDK_HOME>/component-sources/omx_XX/OMX_XX_UserGuide.pdf

    4.2.2 Encode example

    Please, first try the same command line to verify that everything in your setup is correct; this should work. To try other resolution, I think some modifications are needed.

    BR

    Vladimir

  • Hi Vladimir,

        Thanks for your replay ! I have tried that before, and the result is almost the same. I read the codes, and I am sure the video size and framerate do not effect the results.

         I compare the params of the decoder and encoder, the video format, video size, framerate and bitrate, and find nothing wrong. So, I need to know exactly where the problem is and move on. Could you help me to check it out ?

  • OK, I'll try to reproduce this issue and I'll let you know soon. Sorry for the inconvenience.

    BR

    Vladimir

  • Thanks so much, Vladimir !

  • Hi Vladimir,

     I decode the output file back to yuv format and find that the Y component is normal as well as the U and V components are abnormal. The pictures are below. The fisrt one is the original yuv picture. The second one is the yuv picture decoded from the abnormal encoder output file. The third one is the Y component of the second one. It seems that the size of the U and V components is 1/4 of Y. I try to change the params of the decode but still make no progress.

        

       

       

       

      Bing

  • Hi Bing,

    Encoder takes 420 SP input only. Decoder o/p in the decode example is not exactly what decoder produces. It is modified to remove padding, as well format is changed before writing into file so that it can be played easily in any player. If you remove those padding only and retain the color format, you can give that to encoder. Infact, you can write an IL client having only decoder and encoder, that would work fine. ( Only thing to take care is decoder o/p pitch is with padding and 128 byte alignemnet, so same pitch should be set in encoder)

    Regards

    Vimal

  • Hi Vimal,

        Thanks for your reply! I found the issue and managed to encode successfully. The OMX manual said that the decoder output format and encoder input format were both 420SemiPlanar. But actually the output in the decode example is YV12 not NV12. So, the encoder input mismatched. I modified the decode example and made the output file to the right format. Then, the encoder worked fine and produced right h264 output.