Tool/software:
Hi
I'm currently running the RTSP server on the AM62A.
When streaming from the PC, the screen doesn't update after the first frame.
However, after running the RTSP server on the PC, streaming from the AM62A works normally.
Testing was performed using the files and commands below.
Additionally, I confirmed that JPEG works normally.
The issue occurs when using h264.
send:
# rtsp_multi_cam_server.py from gi.repository import Gst, GstRtspServer, GObject, GLib Gst.init(None) class MultiCamRTSPServer: def __init__(self): self.server = GstRtspServer.RTSPServer() self.server.set_address("192.168.0.5") self.server.set_service("8554") # 기본 포트 mounts = self.server.get_mount_points() # === 스트림 정의 함수 === def make_pipeline(width, height, pt): return f""" ( videotestsrc is-live=true ! video/x-raw,format=NV12,width={width},height={height},framerate=30/1 ! v4l2h264enc extra-controls=\"controls,prepend_sps_and_pps_to_idr=1\" ! h264parse ! rtph264pay pt={pt} name=pay0 config-interval=1 ) """ # 스트림 1: /cam1 (/dev/video4) factory1 = GstRtspServer.RTSPMediaFactory() factory1.set_launch(make_pipeline(1920, 1080, 96)) factory1.set_shared(True) mounts.add_factory("/cam1", factory1) # 스트림 2: /cam2 (/dev/video5) factory2 = GstRtspServer.RTSPMediaFactory() factory2.set_launch(make_pipeline(1920, 1080, 97)) factory2.set_shared(True) mounts.add_factory("/cam2", factory2) # 스트림 3: /cam3 (/dev/video6) factory3 = GstRtspServer.RTSPMediaFactory() factory3.set_launch(make_pipeline(640, 480, 98)) factory3.set_shared(True) mounts.add_factory("/cam3", factory3) self.server.attach(None) print("RTSP 서버 실행 중:") print(" rtsp://<IP>:8554/cam1") print(" rtsp://<IP>:8554/cam2") print(" rtsp://<IP>:8554/cam3") if __name__ == '__main__': server = MultiCamRTSPServer() loop = GLib.MainLoop() loop.run()
receive:
gst-launch-1.0 rtspsrc location=rtsp://192.168.0.5:8554:/cam1 ! rtph264depay ! avdec_h264 ! autovideosink