thanks for your reply
-
what do you mean by “the camras first signals are still 2880x1616 and after about two packets, its th 1280x720”? how did you observe that first signals and two packets? if playing with VLC or other palyers, will the output resolution change?
I tested the connection with gst-launch-1.0 rtspsrc location=rtsp://xx.xx.xx.xx:yyy/stream! rtph264depay ! h264parse ! fakesink -v
from the debug logs, i can first see smth like
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164c032ffe1001e6764c032ac1b1aa02d00cba6e0202028000003000800000301e47844235001000568ef31b21b, level=(string)5, profile=(string)high
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164c032ffe1001e6764c032ac1b1aa02d00cba6e0202028000003000800000301e47844235001000568ef31b21b, level=(string)5, profile=(string)high, width=(int)2880, height=(int)1616,
where height and width are still 2880x1616, however in the same streeam after a few secs, it shows
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164c028ffe1001c6764c028ac1b1aa05005ba6e02020280000003008000001e4784423501000568ef31b21b, level=(string)4, profile=(string)high
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)0164c028ffe1001c6764c028ac1b1aa05005ba6e02020280000003008000001e4784423501000568ef31b21b, level=(string)4, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)30/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, colorimetry=(string)1:3:5:1, parsed=(boolean)true
where height and width is what i would expcect, 1280x720
-
do you mean using 5MP the app runs well on Jetson, after using 720p the app will hang? If so, could you share the dataild code or configuration modifications when using 5MP? Thanks!
yes, exactly. So on 5MP everything worked well. After changing the resolution i do not get any data. I defined my code in Stage classes, so its a lot to share actually. I hope these snippets will help. Otherwise would it be possible to share it with you private?
for the src stage:
def __init__(self, config: SourceStageConfig) -> None:
self.config = config
self.sources = config.sources
self.sensor_ids = config.sensor_ids
self.muxer_width = config.muxer_width
self.muxer_height = config.muxer_height
self.muxer_timeout = config.muxer_timeout
self._log = Logger(name="SourceStage").get_logger()
self.srcbin: Gst.Element | None = None
def build(self, pipeline: Gst.Pipeline) -> Gst.Element:
srcbin = create_element(GstElementNames.MULTI_URI_SRC_BIN, "multi-src")
self.srcbin = srcbin
if self.sources:
uri_list = ",".join(self.sources)
srcbin.set_property(GstProperties.URI_LIST, uri_list)
sensor_ids = []
for i, _ in enumerate(self.sources):
if getattr(self.config, "sensor_ids", None):
sensor_ids.append(self.config.sensor_ids[i])
else:
sensor_ids.append(f"source{i}")
srcbin.set_property("sensor-id-list", ",".join(sensor_ids))
if getattr(self.config, "sensor_names", None):
if len(self.config.sensor_names) == len(self.sources):
srcbin.set_property(
"sensor-name-list",
",".join(self.config.sensor_names),
)
max_batch = max(len(self.sources), int(getattr(self.config, "max_batch_size", 0)) or 1)
srcbin.set_property("max-batch-size", max_batch)
if self.muxer_width is not None:
srcbin.set_property("width", self.muxer_width)
if self.muxer_height is not None:
srcbin.set_property("height", self.muxer_height)
if self.muxer_timeout is not None:
# same unit as nvstreammux: nanoseconds
srcbin.set_property("batched-push-timeout", self.muxer_timeout)
srcbin.set_property("live-source", int(bool(self.config.is_live_source)))
try:
rest_ip = getattr(self.config, "rest_ip", "localhost")
rest_port = getattr(self.config, "rest_port", 9000)
srcbin.set_property("ip-address", rest_ip)
srcbin.set_property("port", str(rest_port))
self._log.info(f"REST API enabled at {rest_ip}:{rest_port}")
except Exception as e:
self._log.error(f"Failed to set REST API properties: {e}")
def _safe_set(elem: Gst.Element, prop: str, val):
try:
elem.set_property(prop, val)
except Exception:
pass
_safe_set(srcbin, "gpu-id", getattr(self.config, "gpu_id", 0))
# _safe_set(srcbin, "cudadec-memtype", getattr(self.config, "cuda_memory_type", 0))
# _safe_set(srcbin, "num-extra-surfaces", getattr(self.config, "num_extra_surfaces", 4))
# _safe_set(srcbin, "latency", 100)
pipeline.add(srcbin)
return srcbin
where height and width is set to 1920x720 when running on 5MP, or 1280x720 for lower ones
live-source is set to True, timeout to 40000
in my pipeline i use it like
self.multisrc = self.source_stage.build(self.pipeline)
self.q_after_mux = _mk_queue("q_after_mux")
self.pipeline.add(self.q_after_mux)
src_pad = self.multisrc.get_static_pad("src")
if src_pad:
src_pad.add_probe(Gst.PadProbeType.BUFFER, self._log_src_caps)
for logging i use
def _log_src_caps(self, pad, info, user_data=None):
caps = pad.get_current_caps() or pad.get_allowed_caps()
if not caps:
self.logger.warning("Source src pad: no caps available yet")
return Gst.PadProbeReturn.OK
s = caps.get_structure(0)
media_type = s.get_name()
width = s.get_value("width") if s.has_field("width") else None
height = s.get_value("height") if s.has_field("height") else None
framerate = None
if s.has_field("framerate"):
try:
ok, num, den = s.get_fraction("framerate")
if ok and den != 0:
framerate = f"{num}/{den}"
except TypeError:
# Fallback: just stringify whatever is there
try:
framerate = str(s.get_value("framerate"))
except Exception:
framerate = None
self.logger.info(
f"[SourceCaps] type={media_type}, width={width}, height={height}, "
f"framerate={framerate}, caps={caps.to_string()}"
)
pad.remove_probe(info.id)
return Gst.PadProbeReturn.OK
for the 2880x1616 Stream i cann see those logs, for lower resolutions it does not get fired at all.
tegrastats:
it seeems with jtop command, NDEC etc. all OFF
11-12-2025 09:37:35 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.75C soc2@53.781C soc0@55.187C tj@57.625C soc1@54.406C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/398mW VIN_SYS_5V0 2620mW/2620mW
11-12-2025 09:37:36 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [2%@729,3%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.687C soc2@53.937C soc0@54.968C tj@57.687C soc1@54.406C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/398mW VIN_SYS_5V0 2524mW/2572mW
11-12-2025 09:37:37 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.718C soc2@53.687C soc0@55.031C tj@57.718C soc1@54.531C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/398mW VIN_SYS_5V0 2524mW/2556mW
11-12-2025 09:37:38 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [1%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.875C soc2@53.718C soc0@54.875C tj@57.562C soc1@54.312C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/398mW VIN_SYS_5V0 2520mW/2547mW
11-12-2025 09:37:39 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,1%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.656C soc2@53.75C soc0@54.906C tj@57.656C soc1@54.375C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/398mW VIN_SYS_5V0 2524mW/2542mW
11-12-2025 09:37:40 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.687C soc2@53.687C soc0@54.937C tj@57.687C soc1@54.437C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 0mW/332mW VIN_SYS_5V0 2524mW/2539mW
11-12-2025 09:37:41 RAM 7565/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [1%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,1%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.406C soc2@53.625C soc0@54.75C tj@57.406C soc1@54.125C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 0mW/284mW VIN_SYS_5V0 2524mW/2537mW
11-12-2025 09:37:42 RAM 7565/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.406C soc2@53.656C soc0@54.781C tj@57.406C soc1@54.25C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 398mW/299mW VIN_SYS_5V0 2524mW/2536mW
11-12-2025 09:37:43 RAM 7565/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.406C soc2@53.5C soc0@54.781C tj@57.406C soc1@54.343C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 0mW/265mW VIN_SYS_5V0 2524mW/2534mW
11-12-2025 09:37:44 RAM 7564/30697MB (lfb 48x4MB) SWAP 0/15348MB (cached 0MB) CPU [1%@729,1%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@204 GR3D_FREQ 0%@[0,0] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@57.281C soc2@53.5C soc0@54.625C tj@57.281C soc1@54.062C VDD_GPU_SOC 1993mW/1993mW VDD_CPU_CV 0mW/239mW VIN_SYS_5V0 2524mW/2533mW
11-12-2025 09:37:45 RAM 7564/30697MB (lfb..
- if only using “nvmultiurisrcbin->queue->faksink”, will the app hang?
yes, i used a minimal script with just linking the nvmultisrcbin → queue→fakesink, with a probe log and this probe log also didnt get fired at all.