cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jchewpoc
Adventurer
Adventurer
2,171 Views
Registered: ‎04-16-2019

2019.1 SDI Tx/Rx ZCU106 TRD Support for 3G or less SDI Camera

Jump to solution

Hello Xilinx,

I am having trouble establishing a gstreamer pipeline using the SDI Rx/Tx TRD project. I am currently using a 3G SDI camera input into the ZCU106 board. After running the media-ctrl command, the SDI format and color is recognized, however, I am receiving AXIS underflow errors. Could this be due to the TRD is expecting a 12G SDI camera input? Is there a way to change the TRD to support a 3G SDI input?

Thank you

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
jchewpoc
Adventurer
Adventurer
1,562 Views
Registered: ‎04-16-2019

Hello @watari , @kvasantr ,

I was able to get the pass through video pipeline by adding the videoconvert cap to convert the video into the mixers compatible format. Of course, the video was laggy/glitchy probably due to the processor computing. The next step would be to scale/color convert/resample chroma etc. to remove the video glitches. Being new to video, for this conversion:

NV16_10LE32/UYVY10 4:2:2 -> NV12/YUV 4:2:0

Will I need the "full fledged" video processing subsystem or can I just use the scaler only VPSS?

Thank you

View solution in original post

0 Kudos
21 Replies
kvasantr
Moderator
Moderator
2,119 Views
Registered: ‎04-12-2017

Hello @jchewpoc 

Please ignore the AXIS underflow error that you observe if you are able to lock the SDI camera data and able to see the correct media graph.

Are you able to run the pipelines that you intend to test?

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
jchewpoc
Adventurer
Adventurer
2,096 Views
Registered: ‎04-16-2019

Hello @kvasantr ,

I was not able to successfully run the gst pipeline command:

GST_DEBUG=*:4 gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=UYVY10_1X20, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, profile=main ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

 

Turning on the debug verbose, I received the following error:

erroneous pipeline: could not link v4l2src0 to omxh265enc-omxh265enc0, neither element can handle caps video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY10_1X20, framerate=(fraction)60/1

Any clue to solve this?

Thank you

 

0 Kudos
watari
Teacher
Teacher
2,055 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

Would you try to change the format from "UYVY10_1X20" to "NV16_10LE32" ?

 

Best regards,

0 Kudos
jchewpoc
Adventurer
Adventurer
2,043 Views
Registered: ‎04-16-2019

hello @watari ,

After changing the format to NV16_10LE32, here is my error output:

** (gst-launch-1.0:2714): WARNING **: 08:24:10.831: Property 'latency-mode' is deprecated and have no effect. Use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g. ... ! omxh264enc ! video/x-h264,alignment=nal ! ...).

** (gst-launch-1.0:2714): WARNING **: 08:24:10.834: Property 'latency-mode' is deprecated. For 'normal' and 'reduced' mode, use 'low-latency' boolean property instead. For 'low' mode, use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g. ... ! video/x-h264,alignment=nal ! omxh264dec low-latency=1 ! ...).
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000423882
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I had previously choosen UYVY10_1X20 format due to thats what the sdi rx ss is detecting from my camera. I verified this using media-ctl command:

root@zcu106_vcu_trd:~# media-ctl -d /dev/media0 -p
Media controller API version 4.19.0

Media device information
------------------------
driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
driver version 4.19.0

Device topology
- entity 1: vcap_sdi output 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "a0080000.v_proc_ss":1 [ENABLED]

- entity 5: a0030000.v_smpte_uhdsdi_rx_ss (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Source
[fmt:UYVY10_1X20/1920x1080@1000/60000 field:none]
-> "a0080000.v_proc_ss":0 [ENABLED]

- entity 7: a0080000.v_proc_ss (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[fmt:RBG888_1X24/1280x720 field:none colorspace:srgb]
<- "a0030000.v_smpte_uhdsdi_rx_ss":0 [ENABLED]
pad1: Source
[fmt:Y10_2X8_PADHI_LE/1920x1080 field:none colorspace:srgb]
-> "vcap_sdi output 0":0 [ENABLED]

I noticed that my formats are all incorrect for the scaler IP. Could that be affecting my pipeline?

 

Thank you.

0 Kudos
watari
Teacher
Teacher
2,036 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

It's improper issue.

Would you make sure capability by the following commands ?

 

$ gst-inspect-1.0 omxh265enc

$ gst-device-monitor-1.0

 

After that, you must set proper value on format property.

 

[Additional information]

As you already noticed, you must set consistent value on v4l2 graph and gstreamer pipeline.

I don't know whether SDI Rx IP has color conversion and bit expander or not.

You can describe conversion and bit expander as capability on gstreamer pipeline.

Of cause you must add proper gstreamer plugin.

 

[Additional information (2)]

You must set proper format by xmedia-ctl on sink of entity 7, too.

 

Best regards,

0 Kudos
jchewpoc
Adventurer
Adventurer
2,005 Views
Registered: ‎04-16-2019

Hello @watari ,

I have verified that I have both commands you specified. When you refer to v4l2 graph, what do you mean by this?

I changed the formatting for entity 7. media card now appears like so:

root@zcu106_vcu_trd:/media/card# media-ctl -d /dev/media0 -p
Media controller API version 4.19.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial
bus info
hw revision     0x0
driver version  4.19.0

Device topology
- entity 1: vcap_sdi output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "a0080000.v_proc_ss":1 [ENABLED]

- entity 5: a0030000.v_smpte_uhdsdi_rx_ss (1 pad, 1 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:UYVY10_1X20/1920x1080@1000/60000 field:none]
                -> "a0080000.v_proc_ss":0 [ENABLED]

- entity 7: a0080000.v_proc_ss (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                [fmt:UYVY10_1X20/1080x720 field:none]
                <- "a0030000.v_smpte_uhdsdi_rx_ss":0 [ENABLED]
        pad1: Source
                [fmt:UYVY10_1X20/1920x1080 field:none]
                -> "vcap_sdi output 0":0 [ENABLED]

Using the gstreamer command with the NV16_10LE32 format, I am now receiving this error:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, profile=main ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

** (gst-launch-1.0:2849): WARNING **: 10:13:24.010: Property 'latency-mode' is deprecated and have no effect. Use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! omxh264enc ! video/x-h264,alignment=nal ! ...).

** (gst-launch-1.0:2849): WARNING **: 10:13:24.013: Property 'latency-mode' is deprecated. For 'normal' and 'reduced' mode, use 'low-latency' boolean property instead. For 'low' mode, use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! video/x-h264,alignment=nal ! omxh264dec low-latency=1 ! ...).
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(697): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.069343659
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@zcu106_vcu_trd:/media/card#

So it looks like we did get passed the data stream error. Any advice on allocating enough memory?

Thank you.

 

0 Kudos
watari
Teacher
Teacher
1,997 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

Would you share these results ?

 

$ gst-device-monitor-1.0

$ gst-launch-1.0 --gst-debug-level=5 ...

 

Best regards,

jchewpoc
Adventurer
Adventurer
1,981 Views
Registered: ‎04-16-2019

Hello @watari ,

 

Device Display command:

root@zcu106_vcu_trd:/media/card# gst-device-monitor-1.0
Probing devices...

[ 2505.632881] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.642051] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.649118] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.657238] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.666384] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.673316] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.681468] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.690629] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.697696] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.705862] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.715012] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.722338] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.733259] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.742401] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.749553] xlnx-sdi-audio a0010000.v_uhdsdi_audio: stream params: channels = 2 sample_rate = 44100 bits = 24
[ 2505.762518] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.770643] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.779787] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.787031] xlnx-sdi-audio a0010000.v_uhdsdi_audio: stream params: channels = 2 sample_rate = 44100 bits = 24
[ 2505.797206] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio disabled
[ 2505.807753] xlnx_formatter_pcm a0000000.audio_formatter: stream 0 : format = 1 mode = 3 ch_limit = 2
[ 2505.816918] xlnx-sdi-audio a0010000.v_uhdsdi_audio:  sdi tx audio enabled
[ 2505.824111] xlnx-sdi-audio a0010000.v_uhdsdi_audio: stream params: channels = 2 sample_rate = 44100 bits = 24

Device found:

        name  : Monitor of Built-in Audio Stereo
        class : Audio/Source
        caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        properties:
                device.description = "Monitor\ of\ Built-in\ Audio\ Stereo"
                device.class = monitor
                alsa.card = 0
                alsa.card_name = "DisplayPort\ monitor"
                alsa.long_card_name = "DisplayPort\ monitor"
                device.bus_path = /devices/platform/amba/fd4a0000.zynqmp-display/fd4a0000.zynqmp-display:zynqmp_dp_snd_card/sound/card0
                sysfs.path = /devices/platform/amba/fd4a0000.zynqmp-display/fd4a0000.zynqmp-display:zynqmp_dp_snd_card/sound/card0
                device.form_factor = internal
                device.string = 0
                module-udev-detect.discovered = 1
                device.icon_name = audio-card
        gst-launch-1.0 pulsesrc device=alsa_output.0.stereo-fallback.monitor ! ...


Device found:

        name  : Monitor of Built-in Audio Stereo
        class : Audio/Source
        caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        properties:
                device.description = "Monitor\ of\ Built-in\ Audio\ Stereo"
                device.class = monitor
                alsa.card = 1
                alsa.card_name = xlnx-sdi-snd-card-0
                alsa.long_card_name = xlnx-sdi-snd-card-0
                device.bus_path = "/devices/platform/amba_pl\@0/a0000000.audio_formatter/xlnx_snd_card.0.auto/sound/card1"
                sysfs.path = "/devices/platform/amba_pl\@0/a0000000.audio_formatter/xlnx_snd_card.0.auto/sound/card1"
                device.form_factor = internal
                device.string = 1
                module-udev-detect.discovered = 1
                device.icon_name = audio-card
        gst-launch-1.0 pulsesrc device=alsa_output.1.stereo-fallback.monitor ! ...


Device found:

        name  : Built-in Audio Stereo
        class : Audio/Sink
        caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        properties:
                alsa.resolution_bits = 16
                device.api = alsa
                device.class = sound
                alsa.class = generic
                alsa.subclass = generic-mix
                alsa.name = ""
                alsa.id = "\(null\)\ xilinx-dp-snd-codec-dai-0"
                alsa.subdevice = 0
                alsa.subdevice_name = "subdevice\ \#0"
                alsa.device = 0
                alsa.card = 0
                alsa.card_name = "DisplayPort\ monitor"
                alsa.long_card_name = "DisplayPort\ monitor"
                device.bus_path = /devices/platform/amba/fd4a0000.zynqmp-display/fd4a0000.zynqmp-display:zynqmp_dp_snd_card/sound/card0
                sysfs.path = /devices/platform/amba/fd4a0000.zynqmp-display/fd4a0000.zynqmp-display:zynqmp_dp_snd_card/sound/card0
                device.form_factor = internal
                device.string = hw:0
                device.buffering.buffer_size = 65536
                device.buffering.fragment_size = 32768
                device.access_mode = mmap+timer
                device.profile.name = stereo-fallback
                device.profile.description = Stereo
                device.description = "Built-in\ Audio\ Stereo"
                module-udev-detect.discovered = 1
                device.icon_name = audio-card
        gst-launch-1.0 ... ! pulsesink device=alsa_output.0.stereo-fallback


Device found:

        name  : Built-in Audio Stereo
        class : Audio/Sink
        caps  : audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, S24LE, S24BE, S24_32LE, S24_32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
                audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ];
        properties:
                alsa.resolution_bits = 32
                device.api = alsa
                device.class = sound
                alsa.class = generic
                alsa.subclass = generic-mix
                alsa.name = ""
                alsa.id = "\(null\)\ a0010000.v_uhdsdi_audio-0"
                alsa.subdevice = 0
                alsa.subdevice_name = "subdevice\ \#0"
                alsa.device = 0
                alsa.card = 1
                alsa.card_name = xlnx-sdi-snd-card-0
                alsa.long_card_name = xlnx-sdi-snd-card-0
                device.bus_path = "/devices/platform/amba_pl\@0/a0000000.audio_formatter/xlnx_snd_card.0.auto/sound/card1"
                sysfs.path = "/devices/platform/amba_pl\@0/a0000000.audio_formatter/xlnx_snd_card.0.auto/sound/card1"
                device.form_factor = internal
                device.string = hw:1
                device.buffering.buffer_size = 35264
                device.buffering.fragment_size = 8832
                device.access_mode = serial
                device.profile.name = stereo-fallback
                device.profile.description = Stereo
                device.description = "Built-in\ Audio\ Stereo"
                module-udev-detect.discovered = 1
                device.icon_name = audio-card
        gst-launch-1.0 ... ! pulsesink device=alsa_output.1.stereo-fallback


Device found:

        name  : vcap_sdi output 0
        class : Video/Source
        caps  : video/x-raw, format=(string)NV16_10LE32, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 16, 32768 ], height=(int)[ 1, 8191 ], interlace-mode=(string)alternate;
                video/x-raw, format=(string)NV16_10LE32, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 16, 32768 ], height=(int)[ 1, 8191 ], interlace-mode=(string){ progressive, interleaved };
        properties:
                udev-probed = true
                device.bus_path = "platform-amba_pl\@0:vcap_sdi"
                sysfs.path = "/sys/devices/platform/amba_pl\@0/amba_pl\@0:vcap_sdi/video4linux/video0"
                device.subsystem = video4linux
                device.product.name = "vcap_sdi\ output\ 0"
                device.capabilities = :
                device.api = v4l2
                device.path = /dev/video0
                v4l2.device.driver = xilinx-vipp
                v4l2.device.card = "vcap_sdi\ output\ 0"
                v4l2.device.bus_info = platform:vcap_sdi:0
                v4l2.device.version = 267008 (0x00041300)
                v4l2.device.capabilities = 2216693760 (0x84201000)
                v4l2.device.device_caps = 69210112 (0x04201000)
        gst-launch-1.0 v4l2src ! ...

I have attached the debug gst launch log. I did not allocate a large enough scrollback, so I was not able to capture the full log. The log does have enough and good information on where the error occurs. Let me know what you think.

Thank you.

0 Kudos
watari
Teacher
Teacher
1,976 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

You set wrong resolution on entity 7.

 

- entity 7: a0080000.v_proc_ss (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                [fmt:UYVY10_1X20/1080x720 field:none]
                <- "a0030000.v_smpte_uhdsdi_rx_ss":0 [ENABLED]
        pad1: Source
                [fmt:UYVY10_1X20/1920x1080 field:none]
                -> "vcap_sdi output 0":0 [ENABLED]

 

Change this resolution value to 1920x1080 or proper value.

 

Best regards,

jchewpoc
Adventurer
Adventurer
1,958 Views
Registered: ‎04-16-2019

hello @watari ,

Here is the non-debug output:

root@zcu106_vcu_trd:/media/card# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, profile=main ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

** (gst-launch-1.0:3343): WARNING **: 11:05:46.166: Property 'latency-mode' is deprecated and have no effect. Use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! omxh264enc ! video/x-h264,alignment=nal ! ...).

** (gst-launch-1.0:3343): WARNING **: 11:05:46.170: Property 'latency-mode' is deprecated. For 'normal' and 'reduced' mode, use 'low-latency' boolean property instead. For 'low' mode, use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! video/x-h264,alignment=nal ! omxh264dec low-latency=1 ! ...).
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
!! Warning : Adapting profile to support bitdepth and chroma mode[ 4699.003971] al5e a0100000.al5e: VCU: unavailable resources or wrong configuration

!! The specified Level is too low and will be adjusted !!
![ 4699.016217] al5e a0100000.al5e: Failed on create channel
! Warning specified CPBSize is higher than the Max CPBSize allowed for this level and will be adjusted !!
!! Warning specified InitialDelay is bigger than CPBSize and will be adjusted !!
Failed to create Encoder:
/!\ ERROR:encoder: hardware doesn't have enough resources (142)
[E] [TreatSetStateCommand]: OMX_ALG_ErrorChannelResourceUnavailable
ERROR: from element /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: GStreamer encountered a general supporting library error.
Additional debug info:
../../git/omx/gstomxvideoenc.c(3424): gst_omx_video_enc_handle_frame (): /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0:
Failed to enable OMX encoder: Component doesn't have enough hardware resources available to process the channel (0x90001001)
Execution ended after 0:00:00.076577532
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

I have attached the debug command output as well. 

 

Thank you.

0 Kudos
watari
Teacher
Teacher
1,955 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

It seems almost all issues are fixed.

There is still wrong profile setting or wrong parameter issue for al5e.

You can find some warning messages in gstreamer log message.

 

So, what are your target profile or parameter for H.265 encoding ?

These errors will be fixed after you set proper parameters at omxh265enc.

 

Best regards,

0 Kudos
jchewpoc
Adventurer
Adventurer
1,942 Views
Registered: ‎04-16-2019

Hello @watari ,

This is the main GST command:

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, profile=main ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

 

I have tried also:

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc ! h265parse ! omxh265dec ! kmssink bus-id="a0070000.v_mix" (produces internal data stream error)

 

It seems like using the NV16_10LE32 format is causing some errors:

"format NV16_10LE32 has a pstride of 0, cannot compute padded with"

 

0 Kudos
watari
Teacher
Teacher
1,915 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

Would you remove profile property and add alignment property ?

 

gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, alignment=au ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

 

Best regards,

 

0 Kudos
jchewpoc
Adventurer
Adventurer
1,880 Views
Registered: ‎04-16-2019

Hello @watari ,

It seems like I receive the same error:

root@zcu106_vcu_trd:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true latency-mode=normal ! video/x-h265, alignment=au ! h265parse ! omxh265dec internal-entropy-buffers=5 latency-mode=normal ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"

** (gst-launch-1.0:3269): WARNING **: 13:17:59.255: Property 'latency-mode' is deprecated and have no effect. Use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! omxh264enc ! video/x-h264,alignment=nal ! ...).

** (gst-launch-1.0:3269): WARNING **: 13:17:59.258: Property 'latency-mode' is deprecated. For 'normal' and 'reduced' mode, use 'low-latency' boolean property instead. For 'low' mode, use a caps filter with 'alignment' field set to 'au' for normal latency and 'nal' for subframe latency (e.g.  ... ! video/x-h264,alignment=nal ! omxh264dec low-latency=1 ! ...).
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
!! Warning : Adapting profile to support bitdepth and chroma mode[ 4979.039647] al5e a0100000.al5e: VCU: unavailable resources or wrong configuration

!! The specified Level is too low and will be adjusted !!
![ 4979.051941] al5e a0100000.al5e: Failed on create channel
! Warning specified CPBSize is higher than the Max CPBSize allowed for this level and will be adjusted !!
!! Warning specified InitialDelay is bigger than CPBSize and will be adjusted !!
Failed to create Encoder:
/!\ ERROR:encoder: hardware doesn't have enough resources (142)
[E] [TreatSetStateCommand]: OMX_ALG_ErrorChannelResourceUnavailable
ERROR: from element /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: GStreamer encountered a general supporting library error.
Additional debug info:
../../git/omx/gstomxvideoenc.c(3424): gst_omx_video_enc_handle_frame (): /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0:
Failed to enable OMX encoder: Component doesn't have enough hardware resources available to process the channel (0x90001001)
Execution ended after 0:00:00.080201663
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@zcu106_vcu_trd:~#

When using the command:

gst-launch-1.0 videotestsrc ! omxh265enc ! filesink location=”file location”

It successfully encodes the test video source, so I know the VCU encoding capability is there. Would simplifying my gst pipeline command help?

Thank you.

0 Kudos
jchewpoc
Adventurer
Adventurer
1,849 Views
Registered: ‎04-16-2019

Hello @watari ,

This AR looks very similar to the issues I am currently seeing except on the decoding path:

https://www.xilinx.com/support/answers/72080.html

It says that it was resolved in 2019.1 and I am using the 2019.1 SDI TRD..

 

watari
Teacher
Teacher
1,829 Views
Registered: ‎06-16-2013

Hi @jchewpoc 

 

Would you fix warning messages ?

I don't use latency-mode in my Gstreamer pipeline.

 

Best regards,

0 Kudos
kvasantr
Moderator
Moderator
1,664 Views
Registered: ‎04-12-2017

Hello @jchewpoc 

I checked all the error messages and error logs shared by you so far.

If I am correct you are using following design:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/115933262/Zynq+UltraScale+MPSoC+VCU+TRD+2019.1+-+SDI+Video+Capture+and+SDI+Display

If you look closely this above design doesn't supports XV20 format meanwhile as per your media graph I see that the format that you are feeding is XV20 meanwhile the format it can max support is NV12. Our 2019.1 design already has arrangement which scales down YUV 422 10bit to YUV420 8bit. 

Source Pad:

xmedia-ctl -d /dev/media0 -V ' "a0080000.v_proc_ss":0 [fmt:UYVY10_1X20/1920x1080 field:none]'
 
Sink PAD:
 
xmedia-ctl -d /dev/media0 -V ' "a0080000.v_proc_ss":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]'
 
Let me know if it helps.
 
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
jchewpoc
Adventurer
Adventurer
1,612 Views
Registered: ‎04-16-2019

Hello @kvasantr ,

Here is my output after your recommendations:

root@zcu106_vcu_trd:~# gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw, width=1920, height=1080, format=NV16_10LE32, framerate=60/1 ! omxh265enc qp-mode=auto gop-mode=basic gop-length=60 b-frames=0 target-bitrate=60000 num-slices=8 control-rate=constant prefetch-buffer=true low-bandwidth=false filler-data=true ! video/x-h265, profile=main ! h265parse ! omxh265dec internal-entropy-buffers=5 ! queue max-size-bytes=0 ! kmssink bus-id="a0070000.v_mix"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../git/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.000451775
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@zcu106_vcu_trd:~#

I have also attached a debug log to the GST command as well. It appears from lines 3965-3972, it fails to open frei0r-1 files. Further along the log, it fails on gst_base_parse_sink_event_default function on line 5394. 

1. Is there a difference between xmedia-ctl vs media-ctl? I am assuming xilinx gst streamer application utilizes the xmedia-ctl graph?

2. Is there a simple gst command to capture 1-10 frames and save to raw file? Encoding/Decoding the frame could even be left out of gst command.

 

Thank you.

0 Kudos
jchewpoc
Adventurer
Adventurer
1,563 Views
Registered: ‎04-16-2019

Hello @watari , @kvasantr ,

I was able to get the pass through video pipeline by adding the videoconvert cap to convert the video into the mixers compatible format. Of course, the video was laggy/glitchy probably due to the processor computing. The next step would be to scale/color convert/resample chroma etc. to remove the video glitches. Being new to video, for this conversion:

NV16_10LE32/UYVY10 4:2:2 -> NV12/YUV 4:2:0

Will I need the "full fledged" video processing subsystem or can I just use the scaler only VPSS?

Thank you

View solution in original post

0 Kudos
kvasantr
Moderator
Moderator
1,539 Views
Registered: ‎04-12-2017

Hello @jchewpoc 

you will need to enable Chroma resampler to remove Cr data. Please refer our TRD designs only in which we are already showing how its done.

Basically you will need to enable CSC block of VPSS IP.

Thank you.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
samk
Moderator
Moderator
1,438 Views
Registered: ‎10-04-2017

Hi @jchewpoc,

 

Is everything clear for you on this topic?

If your question is answered or your issue is solved, please kindly mark the response which helped find a solution (click on "Accept as solution" button below the reply)

If this is not solved/answered, please reply to the thread giving more information on your current status.

Thanks and Regards,

Don't forget to reply, kudo, and accept as solution.

Xilinx Video Design Hub
0 Kudos