AR# 70845

ZCU106 VCU TRD - LogiCORE H.264/H.265 Video Codec Unit (VCU) - Where can I find an example of using the GStreamer Appsrc and Appsink with the Zynq UltraScale+ MPSoC VCU?

描述

Where can I find an example of using the GStreamer appsrc and appsink with the Zynq UltraScale+ MPSoC VCU?

解决方案

The information below is for reference only and does not come with any support from Xilinx.

Here are the available resources:

  • First, although it is not specific to the Zynq UltraScale+ MPSoC VCU, users should look at the Video Data Modification in the GStreamer Application Wiki Page.
    This page shows an example of using the appsink to modify input data before feeding it to an output device.
  • Second, and more specifically to the Zynq UltraScale+ MPSoC VCU there are two use-cases where appsrc could be used.

    1. File based source and sink (described below)
    2. Live source and sink (currently no examples provided)

File based source and sink:

The source code is attached in the 2018-03-05_-_appsrc-appsink.zip file.

Appsrc use-case:

This is a sample application based on appsrc which plays an mp4 file. After receiving End OF Stream (EOS), the pipeline seeks back to 0 and re-starts the playback from the beginning.

It is similar to the ZCU106 VCU TRD File playback use-case, in which the user selects one mp4 and plays it. The playback will continue until the user stops it.

Note: The user can quit the app at any time by entering the q option from the command prompt.

Command to run:

./appsrc_example /media/card/a.mp4

Appsink use-case:

This is a sample application based on appsink which captures data from the video0 node, encodes it and dumps it into a file.

This is similar to the record option in the ZCU106 VCU TRD. The difference is that instead of muxed data ( an MP4 file), the output is dumping the encoded stream (*.264).

Note: The user can quit the app at any time by entering the q option from the command prompt.

Prerequisite: Video0 node configuration needs to be set prior to running the .exe file. 

The .exe expects that video0 will be configured and will give data in the following format:

width=3840, height=2160, framerate=30/1.

Command to run:

./appsink_example /media/card/record.264

Encoded data can be played by using the following command:

gst-launch-1.0 filesrc location=/media/card/record.264 ! video/x-h264, width=3840, height=2160, profile=main,parsed=true,framerate=30/1 ! h264parse ! omxh264dec op-mode=1 ip-mode=1  ! queue ! kmssink driver-name=xilinx_drm_mixer

附件

文件名 文件大小 File Type
2018-03-05_-_appsrc-appsink.zip 47 KB ZIP

链接问答记录

主要问答记录

相关答复记录

AR# 70845
日期 12/03/2019
状态 Active
Type 综合文章
器件
Tools
IP
Boards & Kits