Xilinx is now part ofAMDUpdated Privacy Policy
ngcodec-tile

HEVC/H.265 Encoder – Bitrate Optimized Edition

NGCodec's RealityCodec is a distribution broadcast-quality transcoder for H.265/HEVC, supporting ABR and running on both on-premises Alveo cards and in FPGA instances in the cloud.

Vendor: Xilinx

Last Update
Size Container Version
June 16, 2020 1.64 GB hevc_u200_v1.3
July 1, 2020 1.64 GB hevc_u50_v1.3

If you should have additional questions and/or want to report an issue with your user experience, please send your inquiry to alveo_video_ea@xilinx.com

Try or Buy

Obtain an entitlement to evaluate or purchase this product.


Begin a free trial and run the application example below.


Deployment Options

This application is containerized and can be easily run in a few minutes in the cloud, or on-premises.

On Premises
Alveo U50
View & Buy Product
  • Xilinx Runtime: 2020.1
  • Target Platform: xilinx_u50_gen3x4_xdma_base_2


 


Start Evaluation

Follow the instructions based on your deployment method.

Alveo U50

1.

Obtain an Account Access Key

An access key is required to authenticate a user and grant them access to the application based on their entitlements.  To obtain your account access key, follow these steps:

  • Login to the Xilinx App Store Portal
  • Click the button labeled "Manage Account" to view entitlements.
  • Click the "Access Key" link on the left side menu
  • Click the "Create an Access Key" button.
  • Download the resulting file "cred.json" to the location ABC

Note:  The resulting access key will enable all entitlements within your account.  If you have not yet obtained entitlements from the "TRY OR BUY" section above, you must do so before following these steps for generating your access key.


2.

Host Setup

The Xilinx Runtime (XRT) host application is supported on CentOS 7.x.  With sudo access, use the following command to download and run the setup script:

 


2.1 Clone GitHub Repository for Xilinx Base Runtime

    git clone https://github.com/Xilinx/Xilinx_Base_Runtime.git && cd Xilinx_Base_Runtime 

2.2 Run the Host Setup Script

    ./host_setup.sh -v 2020.1 -p alveo-u50 –skip-shell-flash


Note: 

  • Please wait for the installation to complete.  During this time you may need press [Y] to continue the host setup. 
  • The script for host setup can be used to setup other versions XRT and shell. Please check https://github.com/Xilinx/Xilinx_Base_Runtime for more details.

 


2.3 U50 Gen3x4 Shell Installation:

The U50 gen3x4 shell is available in Xilinx lounge at: https://www.xilinx.com/member/alveo-platform.html

Download the respective deployment target platform package, untar and install the sc, cmc and xdma base packages:

CentOS:

sudo yum remove -y xilinx-cmc-u50 xilinx-sc-fw-u50
sudo yum install ./<cmc rpm package>
sudo yum install ./<sc rpm package>

sudo yum install ./<xdma validate rpm package>
sudo yum install ./<xdma base rpm package>

sudo /opt/xilinx/xrt/bin/xbmgmt flash --update --shell xilinx_u50_gen3x4_xdma_base_2

Once the FPGA is flashed with new shell, do a cold reboot of the machine.


2.4 Install Docker (If not installed yet)

With sudo access, use the following command to run the utility script to install docker.


Go to Xilinx_Base_Runtime utilities directory

    cd Xilinx_Base_Runtime/utilities 

Run the Docker installation script

    ./docker_install.sh 


If docker is already installed, enable it:
systemctl restart docker
systemctl enable docker


2.5 Install Docker Image

Download Docker Image here.

Install

docker load --input [downloaded_docker_image.tar.gz]


3.

Application Execution

Enter the following commands in a terminal window to run the application:


3.1 Setup Environment Variables by script from Xilinx_Base_Runtime

    source Xilinx_Base_Runtime/utilities/xilinx_docker_setup.sh 


Make sure docker has write permissions in the output directory (/dev/shm by default)
chmod 777 /dev/shm/


3.2 Run the Docker Image

You can either run a single command or launch an interactive shell where you can run many commands.


3.2.1 Single command

    docker run -v /tmp/cred.json:/cred.json -v /dev/shm:/data $XILINX_DOCKER_DEVICES xilinxatg/dcg_video_nimbix:HEVC_U50_Centos7 /cred.json "-y -i /samples/in.mp4 -c:v NGC265 -vf fps=60 -b:v 5M -f rawvideo /data/1080p60_5mbs.265"

Description of command arguments:

  • -v /tmp/cred.json:/cred.json  - Map local cred.json dir : container dir
  • -v /dev/shm:/data -  Map the local dir : container dir for the generated output file
  • $XILINX_DOCKER_DEVICES  - Environment variable set by the host setup script 
  • /cred.json - Letting the runtime script know where to find the cred.json
  • -y -i /samples/in.mp4 -c:v NGC265 -vf fps=60 -b:v 5M -f rawvideo /data/1080p60_5mbs.265 - ffmpeg commandline arguments
  • "0" – Optional argument specifying which device id to unlock. "0 1" to unlock devices 0 and 1.

3.2.2 Interactive shell

    docker run -u alveo -v /tmp/cred.json:/cred.json -v /dev/shm:/data $XILINX_DOCKER_DEVICES --entrypoint bash -it xilinxatg/dcg_video_nimbix:HEVC_U50_Centos7

Description of command arguments:

  • -v /tmp/cred.json:/cred.json  - Map local cred.json dir : container dir
  • -v /dev/shm:/data -  Map the local dir : container dir for the generated output file
  • $XILINX_DOCKER_DEVICES  - Environment variable set by the host setup script 
  • /cred.json - Letting the runtime script know where to find the cred.json
  • --entrypoint bash -it  - Launch into a bash session and make it interactive

Unlock the fpga 

cd drmapp/

cp /cred.json .

./drmapp.exe &

This unlocks device 0 on the fpga. To unlock multiple, do ./drmapp.exe 0 1 &

cd ~/scripts/  

Run ffmpeg. You can use the sample scripts as an example. A sample input mp4 file can be found in /samples 

./1080p60_5mbs.cmd

Stop the DRM 

kill %1 

 


4.

Results

Once your job is complete, the output file(s) will be stored in /dev/shm/