I have an interesting problem that I think can be solved using only gstreamer, but I’m unsure how.
I am using my Jetson to constantly record 30 minute segments of video onto a hard drive. I’ve noticed that the file size seems to be much larger when recording during the evening (in lowlight situations) compared to when recording during daylight.
For example, a 30 minute recording taken during the day is 700MB. A 30 minute recording taken at lowlight is ~5GB
I’ve looked into the files to see what was happening, and I’ve found the issue. Here is a screenshot from each video file:
As you can see, during low light situations, there is some artifacting going on that makes compression much harder to do, causing the file size to be much larger.
I’m not doing anything fancy with gstreamer, right now I am simply using a v4l2src liike so (in python):
The artifacting also happens when I stream in this manner: gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw, width=2560, height=1440' ! nvvidconv ! omxvp8enc ! rtpvp8pay ! udpsink host=192.168.1.111 port=5000 sync=false async=false
Anyone have any idea how to remove this low light effect so that my file sizes aren’t so huge at night?
Hi,
We have deprecated omx plugins. Please try nvv4l2h265enc and set the property:
control-rate : Set control rate for v4l2 encode
flags: readable, writable, changeable only in NULL or READY state
Enum "GstV4l2VideoEncRateControlType" Default: 1, "constant_bitrate"
(0): variable_bitrate - GST_V4L2_VIDENC_VARIABLE_BITRATE
(1): constant_bitrate - GST_V4L2_VIDENC_CONSTANT_BITRATE
qp-range : Qunatization range for P, I and B frame,
Use string with values of Qunatization Range
in MinQpP-MaxQpP:MinQpI-MaxQpI:MinQpB-MaxQpB order, to set the property.
flags: readable, writable
String. Default: null
In low light the scene has more noise which triggers higher bitrate in encoding. Encoding rate is more stable while the scene is clear.
Hi,
Video quality and bitrate are tradeoff. You would need to adjust the properties to find balance between quality and bitrate. The property qp-range works in VBR mode. Please set control-rate=0 along with it.