The invention relates to the technical field of
wireless network communication, real-time audio and
video transmission and rapid equipment
pairing, in particular to a
local area network image transmission method based on two-dimensional code session guidance, which comprises the following steps: after an image transmission device is connected with routing WiFi or a
client hotspot, starting an HTTP control service and an audio and video
stream pushing service; the plug flow service comprises plug flow based on a UDP (
User Datagram Protocol) and an optional RTSP (Real Time Streaming Protocol) session service; and the device obtains a
local area network IP and a port to construct a control URI and a media URI, and packages control or
media access information, a one-time session token, a validity period, a device public key commitment value and a transmission strategy parameter into
JSON session guide information to generate a two-dimensional code for display. The user side scans the two-dimensional code and then verifies the commitment value and the session token, a secure session bound with the equipment is established, and a
control channel is upgraded to a
WebSocket two-way channel after HTTP
handshake; a
media channel adopts UDP transmission and feeds back time
delay change and
packet loss statistics through an RTCP, a sending end performs congestion control based on time
delay gradient estimation and an adaptive threshold value, and adaptively selects mixed NACK or FEC
packet loss recovery and
jitter buffer target
delay according to round-trip time delay and a
packet loss rate. Therefore, quick connection, impersonation resistance and low-delay stable preview can be realized under the weak network condition.