Skip to content

Instantly share code, notes, and snippets.

@aphexcx
Created January 24, 2026 08:22
Show Gist options
  • Select an option

  • Save aphexcx/e4521fb10b00e32dca5b57b607ca3319 to your computer and use it in GitHub Desktop.

Select an option

Save aphexcx/e4521fb10b00e32dca5b57b607ca3319 to your computer and use it in GitHub Desktop.
M20 Relay Architecture Diagrams
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 200" fill="none">
<defs>
<linearGradient id="camGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#EF4444;stop-opacity:1" />
<stop offset="100%" style="stop-color:#DC2626;stop-opacity:1" />
</linearGradient>
<linearGradient id="go2rtcGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#8B5CF6;stop-opacity:1" />
<stop offset="100%" style="stop-color:#7C3AED;stop-opacity:1" />
</linearGradient>
<linearGradient id="webrtcGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#10B981;stop-opacity:1" />
<stop offset="100%" style="stop-color:#059669;stop-opacity:1" />
</linearGradient>
<linearGradient id="vidGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#3B82F6;stop-opacity:1" />
<stop offset="100%" style="stop-color:#1D4ED8;stop-opacity:1" />
</linearGradient>
<filter id="shadow2" x="-20%" y="-20%" width="140%" height="140%">
<feDropShadow dx="1" dy="2" stdDeviation="2" flood-opacity="0.15"/>
</filter>
<marker id="flowArrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
<polygon points="0 0, 8 3, 0 6" fill="#6B7280"/>
</marker>
</defs>
<!-- Title -->
<text x="400" y="25" text-anchor="middle" font-family="system-ui, sans-serif" font-size="18" font-weight="bold" fill="#1F2937">Video Streaming Pipeline</text>
<!-- RTSP Camera -->
<g filter="url(#shadow2)">
<rect x="30" y="60" width="130" height="100" rx="10" fill="url(#camGrad)"/>
<text x="95" y="95" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" font-weight="bold" fill="white">RTSP Camera</text>
<text x="95" y="115" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">Front: video1</text>
<text x="95" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">Rear: video2</text>
<text x="95" y="148" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="rgba(255,255,255,0.7)">10.21.31.103:8554</text>
</g>
<!-- Arrow 1 -->
<path d="M165 110 L210 110" stroke="#6B7280" stroke-width="2" marker-end="url(#flowArrow)"/>
<text x="187" y="100" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#6B7280">RTSP</text>
<!-- go2rtc -->
<g filter="url(#shadow2)">
<rect x="215" y="60" width="130" height="100" rx="10" fill="url(#go2rtcGrad)"/>
<text x="280" y="95" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" font-weight="bold" fill="white">go2rtc</text>
<text x="280" y="115" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">RTSP → WebRTC</text>
<text x="280" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">Transcoder</text>
<text x="280" y="148" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="rgba(255,255,255,0.7)">Port 1984</text>
</g>
<!-- Arrow 2 -->
<path d="M350 110 L395 110" stroke="#6B7280" stroke-width="2" marker-end="url(#flowArrow)"/>
<text x="372" y="100" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#6B7280">SDP</text>
<!-- WebRTC -->
<g filter="url(#shadow2)">
<rect x="400" y="60" width="130" height="100" rx="10" fill="url(#webrtcGrad)"/>
<text x="465" y="90" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" font-weight="bold" fill="white">WebRTC</text>
<text x="465" y="110" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">Peer Connection</text>
<text x="465" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">ICE/STUN</text>
<text x="465" y="148" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="rgba(255,255,255,0.7)">H.264 / VP8</text>
</g>
<!-- Arrow 3 -->
<path d="M535 110 L580 110" stroke="#6B7280" stroke-width="2" marker-end="url(#flowArrow)"/>
<text x="557" y="100" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="#6B7280">RTP</text>
<!-- Browser Video -->
<g filter="url(#shadow2)">
<rect x="585" y="60" width="130" height="100" rx="10" fill="url(#vidGrad)"/>
<text x="650" y="90" text-anchor="middle" font-family="system-ui, sans-serif" font-size="14" font-weight="bold" fill="white">Browser</text>
<text x="650" y="110" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">&lt;video&gt; element</text>
<text x="650" y="130" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="rgba(255,255,255,0.8)">MediaStream API</text>
<text x="650" y="148" text-anchor="middle" font-family="system-ui, sans-serif" font-size="9" fill="rgba(255,255,255,0.7)">~300ms latency</text>
</g>
<!-- Bottom info -->
<rect x="200" y="175" width="400" height="20" rx="4" fill="#FEF3C7"/>
<text x="400" y="189" text-anchor="middle" font-family="system-ui, sans-serif" font-size="10" fill="#92400E">Browser connects: ws://&lt;relay-ip&gt;:1984/api/ws?src=front</text>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment