Jetson TX2 - GStreamer - VP8

From RidgeRun Developer Wiki


Previous: GStreamer/H265 Index Next: GStreamer/nvgstcapture-1.0





Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help.

VP8 encoding

videotestsrc

ARM load: 156% but only videotestsrc consumes 100%. According to the NVIDIA forum when using videotestsrc the system is also doing memory copies to feed the encoder with NVMM memory buffers so that loads more of the ARM.

gst-launch-1.0 videotestsrc num-buffers=150 ! 'video/x-raw, format=(string)I420,width=(int)640, height=(int)480' ! omxvp8enc ! qtmux ! filesink location=test.mp4 -e

VLC can play the file correctly at 30fps and reports as codec: Google/On2's VP8 Video (VP80). The fan on top of the SoC didn't turn on.

nvcamerasrc


gst-launch-1.0 -e nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! \
nvvidconv flip-method=2 ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxvp8enc bitrate=8000000 ! qtmux ! filesink location=test.mp4 -e

VLC reports a bitrate of ~8Mbps.

ARM consumption ~50% of one core (4 cores available 400% - this means something like 15.5% of total). However, only the capture is 11.25% so the VP8 consumes 4.25%

RAM 1442/7853MB (lfb 1134x4MB) cpu [0%@1267,off,off,0%@1267,0%@1267,0%@1267]
RAM 1442/7853MB (lfb 1134x4MB) cpu [16%@345,off,off,12%@345,15%@345,14%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [11%@345,off,off,17%@345,14%@345,17%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [17%@345,off,off,18%@345,13%@345,10%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [19%@345,off,off,18%@345,14%@345,9%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [13%@499,off,off,14%@499,15%@499,17%@499]
RAM 1442/7853MB (lfb 1134x4MB) cpu [16%@345,off,off,15%@345,8%@345,11%@345]
RAM 1443/7853MB (lfb 1134x4MB) cpu [14%@345,off,off,13%@345,9%@345,15%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [9%@345,off,off,16%@345,13%@345,9%@345]
RAM 1443/7853MB (lfb 1134x4MB) cpu [10%@345,off,off,15%@345,8%@345,14%@345]
RAM 1442/7853MB (lfb 1134x4MB) cpu [11%@345,off,off,19%@345,10%@345,15%@345]
RAM 1443/7853MB (lfb 1134x4MB) cpu [14%@345,off,off,23%@345,10%@345,13%@345]
RAM 1443/7853MB (lfb 1134x4MB) cpu [14%@345,off,off,20%@345,8%@345,12%@345]
RAM 1443/7853MB (lfb 1134x4MB) cpu [15%@345,off,off,21%@345,6%@345,10%@345]

 1574 root      20   0  9.979g 264008  44716 S  45.7  3.3  14:43.58 nvcamera-daemon                                                                                                                                                    
13065 nvidia    20   0  719944  14140   9996 S   9.2  0.2   0:09.34 gst-launch-1.0          

The encoder exposes the following parameters

bitrate             : Target bitrate
                        flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4000000 
  quant-i-frames      : Quantization parameter for I-frames (0xffffffff=component default)
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295 
  quant-p-frames      : Quantization parameter for P-frames (0xffffffff=component default)
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295 
  quant-b-frames      : Quantization parameter for B-frames (0xffffffff=component default)
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295 
  iframeinterval      : Encoding Intra Frame occurance frequency
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0 
  SliceIntraRefreshEnable: Enable Slice Intra Refresh while encoding
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false
  SliceIntraRefreshInterval: Set SliceIntraRefreshInterval
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 60 
  bit-packetization   : Whether or not Packet size is based upon Number Of bits
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false
  vbv-size            : virtual buffer size = vbv-size * (bitrate/fps)
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 30 Default: 10 
  temporal-tradeoff   : Temporal Tradeoff value for encoder
                        flags: readable, writable, changeable only in NULL or READY state
                        Enum "GstOmxVideoEncTemporalTradeoffType" Default: 0, "Do not drop frames"
                           (0): Do not drop frames - GST_OMX_VIDENC_DROP_NO_FRAMES
                           (1): Drop 1 in 5 frames - GST_OMX_VIDENC_DROP_1_IN_5_FRAMES
                           (2): Drop 1 in 3 frames - GST_OMX_VIDENC_DROP_1_IN_3_FRAMES
                           (3): Drop 1 in 2 frames - GST_OMX_VIDENC_DROP_1_IN_2_FRAMES
                           (4): Drop 2 in 3 frames - GST_OMX_VIDENC_DROP_2_IN_3_FRAMES
  EnableMVBufferMeta  : Enable Motion Vector Meta data for encoding
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false
  qp-range            : Qunatization range for P and I frame,
			 Use string with values of Qunatization Range 
			 in MinQpP-MaxQpP:MinQpI-MaxQpP:MinQpB-MaxQpB order, to set the property.
                        flags: readable, writable
                        String. Default: "-1,-1:-1,-1:-1,-1"
  MeasureEncoderLatency: Enable Measure Encoder latency Per Frame
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false
  EnableTwopassCBR    : Enable two pass CBR while encoding
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false
  preset-level        : HW preset level for encoder
                        flags: readable, writable, changeable only in NULL or READY state
                        Enum "GstOMXVideoEncHwPreset" Default: 0, "UltraFastPreset"
                           (0): UltraFastPreset  - UltraFastPreset for high perf
                           (1): FastPreset       - FastPreset
                           (2): MediumPreset     - MediumPreset
                           (3): SlowPreset       - SlowPreset


Previous: GStreamer/H265 Index Next: GStreamer/nvgstcapture-1.0