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.

Linux/AM5728: IVA-HD H.264 encoder image with artifact problem

Part Number: AM5728

Tool/software: Linux

Hi TI experts,

We are trying to use H.264 encoder of IVA-HD but it generates color faded image with artifact. (please see below still image which converted .h264 to .mp4 by using ffmpeg)

The target platform is AM5728 GPEVM and the version of processor-sdk is 05.03.00.10 (Latest).

Also I rebuilt Yocto image. The target of bitbake is arago-base-tisdk-image and add below sentence to local.conf to enable GStreamer-pulugins.

IMAGE_INSTALL_append += " gstreamer1.0 \
                                                  gstreamer1.0-libav \
                                                  gstreamer1.0-plugins-base \
                                                  gstreamer1.0-plugins-good \
                                                  gstreamer1.0-plugins-bad \
                                                  gstreamer1.0-plugins-dsp66 \
                                                  gstreamer1.0-plugins-ducati \
                                                  gstreamer1.0-plugins-hevc \
                                                  gstreamer1.0-plugins-vpe \
                                                  libdce \
						  libdrm \
						  ipumm-fw \
"

LICENSE_FLAGS_WHITELIST += "commercial"

Then we executed gstreamer. This is same pipeline for file-to-file encoding which described in the document of processor sdk linux. 

http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_Multimedia.html

root@am57xx-evm:~/work# gst-launch-1.0 filesrc location="/home/root/work/airshow_p352x288.yuv" ! videoparse width=352 height=288 format=nv12 ! video/x-raw, width=352, height=288 ! ducatih264enc ! filesink location="/home/root/work/airshow_p352x288.h264"
Setting pipeline to PAUSED ...[  182.197631] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1

Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.111977781
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

The encoding task is successfully done, then we convert the output file(.264) to .mp4 by using ffmpeg to check the video image.

Is there any process I miss ?

How can I clearly identify the problem?

Best Regards,


  • Hello,

    Gstreamer plugins are already included in PSDK. No need to rebuild them except if you modify the source code for some reason.

    Please try this
    gst-launch-1.0 filesrc location=airshow_p352x288.yuv ! videoparse width=352 height=288 format=nv12 ! video/x-raw, width=352, height=288 ! queue ! ducatih264enc ! h264parse ! queue ! mp4mux ! filesink location=1.mp4

    or

    gst-launch-1.0 filesrc location=airshow_p352x288.yuv ! videoparse width=352 height=288 format=nv12 ! video/x-raw, width=352, height=288 ! vpe ! queue ! ducatih264enc ! h264parse ! queue ! mp4mux ! filesink location=1.mp4


    You could use this pipeline for decode->display on board:
    /etc/init.d/weston stop
    gst-launch-1.0 playbin uri=file:///usr/share/ti/video/1.mp4 video-sink=kmssink

    or

    /etc/init.d/weston start
    gst-launch-1.0 playbin uri=file:///usr/share/ti/video/1.mp4 video-sink=waylandsink

    I do not see artifacts.
    I tried on PSDK 5.2


    BR
    Margarita
  • Hi Margarita,

    Thanks. 

    > if you modify the source code for some reason.

    Yes. We would like to rebuild the image on Yocto because we will modify the ipumm-fw to implement the function which our customer need.

    And we tried bitbake target arago-base-tisdk-image because there are some errors on target arago-core-tisdk-image (Full SDK).

    But we found that we didn't install 32bit library of g++multilib (which is not described in TI's procedure but described in the document of arago-project) on the host machine.

    We will try to rebuild the image and execute gstreamer agein.

    BR

  • Hello,

    I would recommend you:
    1. Try with the default plugins;
    2. Add a parser element after encoder (h264parse);

    In my examples above, there is mp4mux element. This element merges streams, audio(if any) and video into mp4 file.
    Of course you could remove it and check the elementary stream. You could play the elementary stream on board with playbin(refer the both examples with kmssink or waylandsink).

    Best Regards,
    Margarita
  • Hi, Margarita,

    Thanks for your support.
    We found that the format of yuv file which we use was "YV12". We need "NV12" for the encoder on IVA-HD.
    Recently, we also design the h264 encoder on DSP (C66x), so we mistakes yuv files (Unfortunately the name and footage of files are same...)

    We appreciate all of your support.

    Best Regards,
    Ohira
  • Hello,

    This is correct the ducatih264enc requires NV12.
    I am glad that this issue is solved.
    If you have new questions/issues please open a new thread.
    Thank you!

    Best Regards,
    Margarita