cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
561 Views
Registered: ‎06-19-2020

Failed to decode 8 h264 1920x1080p 30pfs using gstreamer.

I am trying to stream 8 h264  videos from laptop to zc106 evm board, and save them on hard-disk. I am using custom design for vcu without PL DDR.

I am able to build and run peta linux with gst-launch app. I have followed PG252 (v1.2) June 3, 2020 document for building process.

When I am trying to run below script I am encountering the following error please help in resolving it.

Script 

gst-launch-1.0 udpsrc port=50000 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_1.yuv" &
gst-launch-1.0 udpsrc port=50001 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_2.yuv" &
gst-launch-1.0 udpsrc port=50002 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_3.yuv" &
gst-launch-1.0 udpsrc port=50003 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_4.yuv" &
gst-launch-1.0 udpsrc port=50004 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_5.yuv" &
gst-launch-1.0 udpsrc port=50005 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_6.yuv" &
gst-launch-1.0 udpsrc port=50006 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_7.yuv" &
gst-launch-1.0 udpsrc port=50007 buffer-size=60000000 caps="application/x-rtp, media=video, clock-rate=90000, payload=96, encoding-name=H264" ! rtpjitterbuffer latency=1000 ! queue ! rtph264depay ! h264parse ! omxh264dec low-latency=1 ! queue max-size-bytes=0 ! filesink location="multy_8.yuv" &

Error 

[ 731.552689] al5d a0120000.al5d: VCU: unavailable resources or wrong configuration
[ 731.560196] al5d a0120000.al5d: Channel wasn't created.
[2020-07-27 08:29:17.372117916] [module_dec.cpp:147] [EndDecoding[ 731.571316] al5d a0120000.al5d: VCU: unavailable resources or wrong configuration
] decoder: hardware doesn't have enough resources (142)
[ 731.581181] al5d a0120000.al5d: Channel wasn't created.
[2020-07-27 08:29:17.400253837] [module_dec.cpp:147] [EndDecoding] decoder: hardware doesn't have enough resources (142)
[2020-07-27 08:29:17.436531022] [omx_component.cpp:1830] [TreatSetStateCommand] OMX_ALG_ErrorChannelResourceUnavailable
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec4: GStreamer encountered a general supporting library error.
Additional debug info:
../../git/omx/gstomxvideodec.c(2290): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec4:
OpenMAX component in error state Component doesn't have enough hardware resources available to process the channel (0x90001001)
Execution ended after 0:00:12.932840264
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
[2020-07-27 08:29:17.453770475] [omx_component.cpp:1830] [TreatSetStateCommand] OMX_ALG_ErrorChannelResourceUnavailable
[2020-07-27 08:29:17.637398222] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.637454398] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.637571520] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.637612444] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.790793339] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.790851015] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.790961966] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:17.791002520] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
Setting pipeline to NULL ...
[2020-07-27 08:29:18.113542727] [omx_component.cpp:428] [SendCommand] OMX_ErrorInvalidState
[2020-07-27 08:29:18.113643247] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.120462139] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.120622975] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.120672450] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.128741186] [omx_component.cpp:428] [SendCommand] OMX_ErrorInvalidState
[2020-07-27 08:29:18.128836095] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.135754787] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.135920303] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState
[2020-07-27 08:29:18.135967168] [omx_component.cpp:830] [GetParameter] OMX_IndexParamPortDefinition: OMX_ErrorInvalidState

Thanks 

Keshava

Tags (1)
0 Kudos
8 Replies
Highlighted
Moderator
Moderator
500 Views
Registered: ‎11-09-2015

HI @keshava7887 

It seems that you do not have enough ressources.

Did you configure the VCU correctly in vivado (with 8 1080p30 streams)? This is the first thing I would check.

Then in case you are not already using 2020.1, I would recommend moving to it.

Finally, check the debugging section in the PG252 and see if there is anything which can help (for example increasing the cma size)

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Visitor
Visitor
463 Views
Registered: ‎06-19-2020

Hi

 

I am using petalinux 2020.1, we are not using PL DDR for VCU and I have configured VCU for 8 x 1080 30fps .  I default CMA size was set to 1024000kB.

I tried increasing CMA size by UBOOT command  'setenv bootargs ${bootargs} cma=1100M' and 'run bootcmd' to boot,  

 Screenshot from 2020-08-01 20-32-07.png

but linux failed with kernel panic.

Screenshot from 2020-08-01 21-27-40.png

I have tried increasing CMA values using 

peta-linux : "petalinux-config -c kernel" refereed below link

 https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842546/Xilinx+Zynq+UltraScale+MPSoC+Video+Codec+Unit?view=blog 

Device Drivers→Generic Driver options→ DMA Contiguous Memory Allocator

but I  could not find DMA Contiguous Memory Allocator option  in Device Drivers→Generic Driver options.

Screenshot from 2020-08-01 21-39-39.png

Please guide me in increasing CMA size to run 8 1080p streams.

 

Thanks 

Keshava murthy p 

0 Kudos
Highlighted
Moderator
Moderator
388 Views
Registered: ‎11-09-2015

Hi @keshava7887 

Did you try to do a search in the kernel config (using the key "/") to find the correct location for DMA Contiguous Memory Allocation setting?

As per pg252 you can also do the setting in u-boot using the bootarg


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Visitor
Visitor
363 Views
Registered: ‎06-19-2020

Hi Florentw,

Yes I have tried to  search in the kernel config (using the key "/") to find the correct location for DMA Contiguous Memory Allocation setting, but I didn't find anything.

Screenshot from 2020-08-06 14-11-24.png 

In previous post, I had mentioned that Even I have used to set CMA to 1500MB in uboot using the command suggest by pg252

setenv bootargs ${bootargs} cma=1500M

but it failed to set . Can you suggest any alternative way to set it or point to other document which might help in resolving the issue.

 

Thanks 

Keshava murthy p

 

0 Kudos
Highlighted
Moderator
Moderator
352 Views
Registered: ‎11-09-2015

HI @keshava7887 

The CMA configuration seems to have change location in the newer kernel. But you can find it by searching for CMA:

CMA.JPG

 


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor
Visitor
320 Views
Registered: ‎06-19-2020

Hi Florentw,

I have tried the option which you have mentioned, but still in could not increase the CMA size.

Screenshot from 2020-08-07 20-05-41.pngScreenshot from 2020-08-07 20-06-03.png  

Thanks 

Keshava murthy p

0 Kudos
Highlighted
Teacher
Teacher
296 Views
Registered: ‎06-16-2013

Hi @keshava7887 

 

I'd like to confirm your issue with linux boot up message.

Would you share boot up message to make sure how linux recognize reserved memory (cma setting) ?

 

Best regards,

0 Kudos
Highlighted
Moderator
Moderator
139 Views
Registered: ‎11-09-2015

HI @keshava7887 

For you search for CMA, you are only displaying 2% of the search result. You need to read the full result to find what you are looking for...


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos