UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
518 Views
Registered: ‎10-21-2018

How to encode 1920x1080i using H265

Jump to solution

In pg252-vcu-v12.pdf, it says the VCU can decode and encode of interlaced video like 1920x1080i.

I use ZCU106 with rdf0428-zcu106-vcu-trd-2018.3 vcu_sdirx prebuilt. The format of sdi-input is "1920x1080x50i"

The output of command "xmedia-ctl -p -d /dev/media0":

Media controller API version 4.14.0

Media device information
------------------------
driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
driver version 4.14.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:UYVY8_1X16/1920x540@1000/25000 field:alternate]
-> "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:UYVY8_1X16/1920x1080 field:alternate]
<- "a0030000.v_smpte_uhdsdi_rx_ss":0 [ENABLED]
pad1: Source
[fmt:UYVY8_1X16/1920x1080 field:alternate]
-> "vcap_sdi output 0":0 [ENABLED]

And I used the gstreamer to test:

 gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,interlace-mode=alternate,format=NV16,width=1920,height=1080,framerate=25/1 ! omxh265enc ! filesink location="/mnt/de.h265"

But the output is not correct. 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
391 Views
Registered: ‎08-01-2007

Re: How to encode 1920x1080i using H265

Jump to solution

PG252 December 5th, 2018 page 135 has some examples of how to use the VCU with interlaced video.

1. filesrc -> omxh265dec -> omxh265enc -> filesink

gst-launch-1.0 filesrc location=file_1080i.h265 ! omxh265dec ! omxh265enc target-bitrate=10000 control-rate=2 ! queue max-size-bytes=-1 ! filesink location=file.h265


2. v4l2src -> omxh265enc -> omxh265dec -> kmssink

gst-launch-1.0 v4l2src io-mode=4 ! video/x-raw,interlace-mode=alternate,format=NV16_10LE32,width=1920,height=1080,framerate=30/1 ! omxh265enc target-bitrate=10000 control-rate=2 ! omxh265dec ! queue max-size-bytes=-1 ! kmssink bus-id=drm-pl-disp-drv connector-properties="props,sdi_mode=0,sdi_data_stream=2,is_frac=0"

 

I recommend you try doing a filesrc and filesink before tyring to do a live source and sink.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
9 Replies
Contributor
Contributor
507 Views
Registered: ‎10-21-2018

Re: How to encode 1920x1080i using H265

Jump to solution

The error of gstreamer is :

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: Could not read from resource. Additional debug info: ../../../git/sys/v4l2/gstv4l2bufferpool.c(1091): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: poll error 1: Invalid argument (22) Execution ended after 0:00:00.063317956 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...

0 Kudos
Scholar watari
Scholar
499 Views
Registered: ‎06-16-2013

Re: How to encode 1920x1080i using H265

Jump to solution

Hi @gefei-liuqi 

 

I'm not sure. But would you change height parameter from 1080 to 540 ?

 

Best regards,

0 Kudos
Contributor
Contributor
465 Views
Registered: ‎10-21-2018

Re: How to encode 1920x1080i using H265

Jump to solution
Hi, @watari
Thanks for your response. when I changed height parameter from 1080 to 540, it also occurs error.
xmedia-ctl -d /dev/media0 -p
------------------------
driver xilinx-video
model Xilinx Video Composite Device
serial
bus info
hw revision 0x0
driver version 4.14.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:UYVY8_1X16/1920x540@1000/25000 field:alternate]
-> "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:UYVY8_1X16/1920x540 field:alternate]
<- "a0030000.v_smpte_uhdsdi_rx_ss":0 [ENABLED]
pad1: Source
[fmt:VYYUYY8_1X24/1920x540 field:alternate]
-> "vcap_sdi output 0":0 [ENABLED]
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,interlace-mode=alternate,format=NV12,width=1920,height=540 ! queue ! filesink location="/mnt/en.h265"

The error is:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL .
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not read from resource.
Additional debug info:
../../../git/sys/v4l2/gstv4l2bufferpool.c(1091): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Invalid argument (22)
Execution ended after 0:00:00.493733813
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
0 Kudos
Contributor
Contributor
434 Views
Registered: ‎10-21-2018

Re: How to encode 1920x1080i using H265

Jump to solution

Hello, anyone can give some advice? 

Thanks!

0 Kudos
Xilinx Employee
Xilinx Employee
392 Views
Registered: ‎08-01-2007

Re: How to encode 1920x1080i using H265

Jump to solution

PG252 December 5th, 2018 page 135 has some examples of how to use the VCU with interlaced video.

1. filesrc -> omxh265dec -> omxh265enc -> filesink

gst-launch-1.0 filesrc location=file_1080i.h265 ! omxh265dec ! omxh265enc target-bitrate=10000 control-rate=2 ! queue max-size-bytes=-1 ! filesink location=file.h265


2. v4l2src -> omxh265enc -> omxh265dec -> kmssink

gst-launch-1.0 v4l2src io-mode=4 ! video/x-raw,interlace-mode=alternate,format=NV16_10LE32,width=1920,height=1080,framerate=30/1 ! omxh265enc target-bitrate=10000 control-rate=2 ! omxh265dec ! queue max-size-bytes=-1 ! kmssink bus-id=drm-pl-disp-drv connector-properties="props,sdi_mode=0,sdi_data_stream=2,is_frac=0"

 

I recommend you try doing a filesrc and filesink before tyring to do a live source and sink.

Chris
Video Design Hub | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
355 Views
Registered: ‎11-09-2015

Re: How to encode 1920x1080i using H265

Jump to solution

Hi @gefei-liuqi ,

Do you have any update on this topic?

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

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

Thanks and Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
349 Views
Registered: ‎10-21-2018

Re: How to encode 1920x1080i using H265

Jump to solution

Thanks for your reply @florentw 

I donot get some progress unitl now. It cannot work for encoding 1080i50 using h265.

It is very important for us because the vpss-deinterlace cannot work. So we have to encode 1080i50 using h265.

I used the commands as you list, but still cannot work.

what else should I try?

Thanks

0 Kudos
Moderator
Moderator
342 Views
Registered: ‎11-09-2015

Re: How to encode 1920x1080i using H265

Jump to solution

Hi @gefei-liuqi ,

Can you share the file you have used for the interlaced input?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Contributor
Contributor
311 Views
Registered: ‎10-21-2018

Re: How to encode 1920x1080i using H265

Jump to solution

Thanks! @florentw 

I donot have the file file_1080i.h265 . I tested the H265's encoder  with the 1080i-SDI input in ZCU106.

I tried your command  buf it failed and I want to know:

What format should be set for v_proc_ss and vcap_sdi Entities in V4L2 video pipeline? 

I have tried many formats through Xmedia-ctl, but cannnot work.

Thanks Very Much!

0 Kudos