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: Gdkpixbufoverlay issue

Part Number: AM5728

Tool/software: Linux

Hi,

I am trying to overlay  PNG images and text messege in real-time video stream, I'm testing with the following pipeline:

gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=2 ! jpegdec ! textoverlay text="TEXT1:ABC" halignment=4 valignment=3 deltax=100 deltay=100 ! gdkpixbufoverlay location=target.png offset-x=200 offset-y=200 overlay-width=240 overlay-height=320 alpha=0.8 ! waylandsink

When I run the above pipeline, I get an error:

(gst-launch-1.0:1787): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0: Could not load overlay image.
Additional debug info:
../../../gst-plugins-good-1.8.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.c(508): gst_gdk_pixbuf_overlay_start (): /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0:
Couldn't recognize the image file format for file 'target.png'
Setting pipeline to NULL ...
Freeing pipeline ...

Thank you

  • Hello,

    What is the PSDK version that you are using?

    BR
    Margarita
  • Hi,
    Thank you for quick reply. My SDK version is 4.3.0.5.
    Best regards
  • Hello,

    esmaill kazemian said:
    ERROR: from element /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0: Could not load overlay image.
    Additional debug info:
    ../../../gst-plugins-good-1.8.3/ext/gdk_pixbuf/gstgdkpixbufoverlay.c(508): gst_gdk_pixbuf_overlay_start (): /GstPipeline:pipeline0/GstGdkPixbufOverlay:gdkpixbufoverlay0:
    Couldn't recognize the image file format for file 'target.png'

    I

    t seems like something is wrong with  target.png.

    Please try with different png file.

    Here is the link to our multimedia guide:

    http://processors.wiki.ti.com/index.php/Processor_Training:_Multimedia

    I would recommend you to check ducatimjpegdec element.

    I will try element gdkpixbufoverlay on my side.

    I will let you know the results probably tomorrow.

    BR
    Margarita

  • Hello,

    I tested this on my side. The error is not because wrong png image. Here are all steps that you must follow:

    1.You must build gdk-pixbuf first.

    Please follow this guide to archive this:

    but the last step must be

    MACHINE=am57xx-evm bitbake gdk-pixbuf

    instead of MACHINE=am57xx-evm bitbake arago-core-tisdk-image

    2. After that in /home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdk-pixbuf/2.34.0-r0/deploy-ipks/armv7ahf-neon

    you will find ipk file.

    3.Copy these two files on target board:

    sudo cp '/home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdk-pixbuf/2.34.0-r0/deploy-ipks/armv7ahf-neon/libgdk-pixbuf-2.0-loader-jpeg_2.34.0-r0_armv7ahf-neon.ipk' /media/mms/rootfs/home/root/

    sudo cp '/home/mms/tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gdk-pixbuf/2.34.0-r0/deploy-ipks/armv7ahf-neon/libgdk-pixbuf-2.0-loader-png_2.34.0-r0_armv7ahf-neon.ipk' /media/mms/rootfs/home/root/

    First for jpeg, second for png as you could see.

    4. You must install these packages on target board. These are the commands that you must execute:

    root@am57xx-evm:~# opkg install libgdk-pixbuf-2.0-loader-jpeg_2.34.0-r0_armv7ahf-neon.ipk

    root@am57xx-evm:~# opkg install libgdk-pixbuf-2.0-loader-png_2.34.0-r0_armv7ahf-neon.ipk

    5. root@am57xx-evm:~# /etc/init.d/weston stop

    6. I generated png file by using videotestsrc:

    gst-launch-1.0 -v videotestsrc num-buffers=1 ! pngenc !  pngparse ! filesink location=image.png

    7.

    root@am57xx-evm:~# gst-launch-1.0 -v videotestsrc pattern=18 ! 'video/x-raw,format=(string)YUY2,width=800,height=600' ! gdkpixbufoverlay location=image.png ! kmssink
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:03.961143325
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Capture pipeline that is working also:

    root@am57xx-evm:~# gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8  ! gdkpixbufoverlay location=image.png ! kmssink

    Hope this helps.

    BR
    Margarita

  • Hello,

    Please if this answers your question click the "This resolved my issue" button.

    BR
    Margarita