Posts

Showing posts from 2026

Plan 9: Audio-Video Pipeline

Image
Video pipeline in action Two important points about videos: A video is a series of images. RGB format is used for display. YUV format is used for storage and transmission.  Recording   ──────────────────────────────────────────────────────── [Video Source] → [Frame Processing] → [Video Encode] ┐                                                                                                      ├→ [Mux] → [Container Stream] [Audio Source] → [Audio Processing] → [Audio Encode] ┘ Playback   ──────────────────────────────────────────────────────── [Container Stream] → [Demux] → [Video Decode] → [Video Sink]                                   ...

Plan 9: Real Time Streaming

Image
Stream a single window or the whole screen via Real Time Streaming Protocol (RTSP). This uses MJPEG stream over TCP-interleave . Plan 9 /dev/screen and /dev/window produces RGBA byte stream with Plan 9 headers. This is converted to JPEG using tojpg and streamed using RTSP. In the video, host port 12554 port is being forwarded to 554 in the Plan 9 VM.  ffplay -rtsp_transport tcp rtsp://localhost:12554/ stream1       Code https://gitlab.com/atamariya/plan9front/-/blob/dev/sys/src/cmd/rtsp/server.c https://gitlab.com/atamariya/plan9front/-/blob/dev/sys/src/cmd/jpg/tojpg.c https://gitlab.com/atamariya/plan9front/-/blob/dev/sys/src/cmd/jpg/writejpg.c ( Update 16/03/2026 : server.c is moved to /sys/src/cmd/stream/rtsp/)   Youtube Live Use Real-Time Messaging Protocol ( RTMP ) to feed into Youtube / Twitch Live. video/hj264 -f 25 /dev/screen | video/rtmp -a /dev/audio rtmp://.... rtmp://...         Note:   The encoder and the publisher pr...

Plan 9: WiFi Protected Setup

Image
  Demo of Wifi router connection using WiFi Protected Setup (WPS). WiFi Protected Setup (WPS) allows you to connect to an Access Point (router) via Push Button Control (PBC) or a temporary PIN.   Authentication Flow   Direction Message / Contents Phase / Purpose Supplicant → AP Authentication Request 802.11 Authentication Supplicant ← AP Authentication Response Supplicant → AP Association Request 802.11 Association Supplicant ← AP Association Response Supplicant → AP EAPOL-Start EAP Initiation Supplicant ← AP EAP-Request Identity Supplicant → AP EAP-Response Identity (Identity: “WFA-SimpleConfig-Registrar-1-0”) Supplicant ← AP WSC Start Enrollee → Registrar (M1) N1 || Descripti...