XAVC Examples - 2023.1 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2023-05-16
Version
2023.1 English

Gstreamer Pipelines

gst-launch-1.0 v4l2src io-mode=4 device=/dev/video0 ! video/x-raw, width=3840, height=2160, format=NV16_10LE32, framerate=60/1 ! omxh264enc control-rate=variable target-bitrate=200000 gop-mode=basic gop-length=1 b-frames=0 prefetch-buffer=TRUE entropy-mode=CABAC num-slices=8 max-picture-sizes='<3333,0,0>' ! video/x-h264 , profile=xavc-high-4:2:2-intra-cbg ,alignment=nal ! filesink location=/run/costarica_crvar_xv20.xavc
gst-launch-1.0 v4l2src io-mode=4 device=/dev/video0 ! video/x-raw, width=3840, height=2160, format=NV16_10LE32, framerate=60/1 ! omxh264enc control-rate=constant target-bitrate=90000 gop-mode=basic gop-length=60 b-frames=0 prefetch-buffer=TRUE entropy-mode=CABAC num-slices=8 max-picture-sizes='<4500,1500,0>' ! video/x-h264, profile=xavc-long-gop-high-4:2:2-mxf, alignment=nal ! filesink location=/run/costarica_crconst_xv20.xavc
Note: Use the following calculations for max-picture-sizes value:
  • For IPPPP mode, use ” max-picture-sizes <3*target_bitrate_Kbps/fps, target_bitrate_Kbps/fps, 0>

    For example: 90 Mb/s, 60 fps, use max-picture-sizes=<4500, 1500, 0>

  • For I only mode, use ” max-picture-sizes <target_bitrate_Kbps/fps, 0, 0>

    For example: 90 Mb/s, 60 fps, use max-picture-sizes=<1500, 0, 0>

Control Software

ctrlsw_encoder -cfg Common_cavlc.cfg -i FoodMarket_4Kp60_XV20.yuv --input-format 
XV20 --input-width 3840 --input-height 2160 --profile XAVC_HIGH_422_INTRA_VBR 
--chroma-mode CHROMA_4_2_2 --ip-bitdepth 10 --num-slices 8 --gop-mode DEFAULT_GOP 
--gop-length 1 --gop-numB 0 --framerate 60 --bitrate 200000 --max-bitrate 200000 -o 
/run/TC_065_cvbr_ctrlsw_latest.xavc --ratectrl-mode CBR
ctrlsw_encoder -cfg Common.cfg -i Football_4Kp30_XV20.yuv --input-format XV20 
--input-width 3840 --input-height 2160 --profile XAVC_HIGH_422_INTRA_VBR 
--chroma-mode CHROMA_4_2_2 --ip-bitdepth 10 --num-slices 8 --gop-mode DEFAULT_GOP 
--gop-length 1 --gop-numB 0 --framerate 30 --bitrate 60000 --max-bitrate 75000 -o /
run/TC_198_cvbr_ctrlsw.xavc --ratectrl-mode VBR