cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
conghong
Observer
Observer
952 Views
Registered: ‎03-07-2018

[ZCU102, Petalinux] Could not initialize supporting library (omxh264dec-omxh264dec0)

I use Petalinux to build the system run on ZCU102 board. I have played .webm video format sucessfully, but when I try to play a .mp4 video format I met an error:
The error is shown below:

root@xilinx-zcu102-2020_1:~/honglc_samples/segmentation# gst-launch-1.0 filesrc location=./video/traffic.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! omxh264dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1
Setting pipeline to PAUSED ...
[2020-08-19 05:02:20.494530490] [omx_core.cpp:181] [OMX_GetHandle] Couldnt allocate dma allocator (tried using /dev/allegroDecodeIP)
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: Could not initialize supporting library.
Additional debug info:
../../../../git/gst-libs/gst/video/gstvideodecoder.c(2614): gst_video_decoder_change_state (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
Failed to open decoder
Setting pipeline to NULL ...
Freeing pipeline ...

I have installed the H264 enc/dec libaries, but can not fix the error:

root@xilinx-zcu102-2020_1:~/honglc_samples/segmentation# gst-inspect-1.0 | grep h264
typefindfunctions: video/x-h264: h264, x264, 264
rtp: rtph264depay: RTP H264 depayloader
rtp: rtph264pay: RTP H264 payloader
uvch264: uvch264mjpgdemux: UVC H264 MJPG Demuxer
uvch264: uvch264src: UVC H264 Source
omx: omxh264enc: OpenMAX H.264 Video Encoder
omx: omxh264dec: OpenMAX H.264 Video Decoder
videoparsersbad: h264parse: H.264 parser

Could you help me on this?

Thanks

Tags (1)
0 Kudos
5 Replies
florentw
Moderator
Moderator
872 Views
Registered: ‎11-09-2015

Hi @conghong 

The ZCU102 does not include the Video Codec Unit (VCU) which allows to encode/decode H264/H265 video files. Thus there is no HW to do the decoding. I guess this is the issue you are facing.

You need to use a board which has a ZU-EV part as the ZCU104 or ZCU106.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
watari
Teacher
Teacher
856 Views
Registered: ‎06-16-2013

Hi @conghong 

 

Would you share the followings to investigate the route cause ?

 

- Boot log message

  => Make sure whether some IPs are properly initialized or not.

- debug log with gst-debug-level

  => Run the following command to output debug message. Make sure how to launch gstreamer's pipeline.

 

gst-launch-1.0 --gst-debug-level=3 filesrc location=./video/traffic.mp4 ! qtdemux name=demux demux.video_0 ! h264parse ! omxh264dec ! queue max-size-bytes=0 ! kmssink bus-id=fd4a0000.zynqmp-display fullscreen-overlay=1

 

- make sure file information of "traffic.mp4" to set properly caps. on gstreamer's pipeline. (=> I guess it's the route cause.)

  => Run the following to make sure file information by ffmpeg

 

ffmpeg -i traffic.mp4

 

Best regards,

0 Kudos
conghong
Observer
Observer
825 Views
Registered: ‎03-07-2018

Hi,

Thank you for your replying, I have fixed this error.

The solution is we need to install the avdec_h264 plugin for GStreamer.

By the way in the file petalinux_project_dir/project-spec/meta-user/conf; we need to add following lines:

PACKAGECONFIG_append_pn-gstreamer1.0-plugins-ugly = " x264"

Thanks all.

watari
Teacher
Teacher
821 Views
Registered: ‎06-16-2013

Hi @conghong 

 

Thank you for sharing your solution.

 

Oh, I forgot the device on ZCU102 is ZCU9EG. Not EV series.

So, you can't use omxh264dec...

 

>By the way in the file petalinux_project_dir/project-spec/meta-user/conf; we need to add following lines:

>PACKAGECONFIG_append_pn-gstreamer1.0-plugins-ugly = " x264"

 

Yes. You need software decoder for H.264. So, you need to add "x264" (software decoder element) on "gstreamer1.0-plugins-ugly".

 

I hope it helps.

 

Best regards,

0 Kudos
peng_jimmy
Observer
Observer
362 Views
Registered: ‎02-08-2021

Hi,

I have the same problem and I need to add the avdec_h264 plugin. However, when I added PACKAGECONFIG_append_pn-gstreamer1.0-plugins-ugly = " x264" to the path:

petalinux_project_dir/project-spec/meta-user/conf/layer.conf

After building the petalinux project, there was still no avdec_h264 plugin.

I use petalinux2020.1 and ZCU104. Is there something I forgot when I added this plugin?

Thanks.

0 Kudos