Always on top window preview with AirPlay receiver support (if on macOS 12+, turn-off built-in AirPlay receiver from system preferences)
- Nibless cocoa app
- OpenGL/Metal renderer with HiDPI support
- CoreGraphics based capturer (looking for alternative)
- No third party dependency
- Uses private framework for native pip support
- AirPlay backend from https://github.com/FDH2/UxPlay and https://github.com/KqSMea8/AirplayServer
- Clone any visibile window
- Clone multiple active display
- Camera preview with audio monitoring
- HLS live streaming of any preview (window, display, or camera)
- Airplay sender (unstable)
- Crop the preview
- Auto and manual resize preserving the aspect ratio
- Multiple window preview from same process,
cmd+nto open andcmd+wto close - Pinch to zoom
- Native picture in picture support
cmd+p - Transparency/opacity control (slider in right click menu)
- Minimal modern UI
- Upto 10 parallel airplay sessions (soft limit)
PiP can stream any preview window over your local network using HLS (HTTP Live Streaming). Any device with a web browser on the same network can watch the live feed.
- Right-click any active preview window and select Stream > Start Streaming
- The stream URL (e.g.
http://192.168.1.42:8080) appears at the bottom of the Stream menu - Open that URL on any device's browser to watch the live stream
- Use Copy URL or Open in Browser for quick access
| Preset | Resolution | Bitrate | FPS |
|---|---|---|---|
| Low | 720p | 1.5 Mbps | 24 |
| Medium | 1080p | 3 Mbps | 30 |
| High | Native | 6 Mbps | 30 |
Change quality on the fly via Stream > Quality.
The streaming pipeline is fully self-contained with no third-party dependencies:
Frame Capture → H.264 Video Encoder → MPEG-TS Muxer → HLS Writer → HTTP Server
↑
Audio Capture
- Frame Capture – grabs RGBA frames from the preview's OpenGL/Metal renderer
- Video Encoder – hardware-accelerated H.264 encoding via VideoToolbox
- TS Muxer – multiplexes video (and optional audio) into MPEG-TS segments
- HLS Writer – manages a ring buffer of
.tssegments and generates the.m3u8playlist - HTTP Server – lightweight embedded server that serves the playlist, segments, and a built-in web viewer with hls.js
brew install --cask amitv87-pip
# checkout code
git clone https://github.com/amitv87/PiP.git
cd pip
# build using xcode
xcodebuild -alltargets
open build/Release/PiP.app
# or simply
./run.sh