laughing-man
Webcam Laughing Man face overlay (Ghost in the Shell style) using MediaPipe BlazeFace, OpenCV, and Pillow.
Install
From PyPI
Stable releases are published on PyPI:
pip install laughing-man
With uv you can use:
uv pip install laughing-man
After installing, run laughing-man or laughing-man --help (the laughing-man console script is on your PATH).
From source (development)
You need uv on your PATH. Clone the repository:
git clone https://github.com/rnorris7756/laughing-man.git
cd laughing-man
Using direnv (recommended)
direnv loads the repo’s .envrc automatically when you cd into the project (after you allow it once per machine). That keeps the development environment consistent without manually activating a venv each time:
- Install direnv and hook it into your shell (Bash, Zsh, Fish, etc.).
- In the repo root, run
direnv allowso.envrcis trusted. - The next time the environment loads,
.envrcwill:- create
.venvand runuv sync --group devif the venv does not exist yet (installs runtime + dev dependencies fromuv.lock); sourcethat venv whenever you are inside the directory;- run
uv run pre-commit installif the Git pre-commit hook is missing (so Ruff and ty match CI before each commit).
- create
After that, use laughing-man or uv run laughing-man as usual; commands see the activated environment while you stay in the tree.
Without direnv
Install dependencies and the pre-commit hook yourself:
uv sync --group dev
uv run pre-commit install
uv run laughing-man
Run uv run pre-commit install once per clone so Ruff and ty run before each commit (same checks as CI). Git invokes hooks with uv on your PATH.
Virtual webcam (Discord, OBS, browsers)
Use --virtual-cam to expose the composited video as a camera other apps can select.
Linux: v4l2loopback
The virtual device is provided by the v4l2loopback kernel module. Load it before starting the app (often required once per boot):
sudo modprobe v4l2loopback
You can create a named device on a fixed number (example):
sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="LaughingMan"
Then point the CLI at that device if needed:
laughing-man --virtual-cam --v4l2-device /dev/video10
Use --no-preview to stream only to the virtual camera (no OpenCV window); stop with Ctrl+C.
If the module loads at boot and grabs /dev/video0, the real webcam may move to /dev/video1. The CLI defaults to --camera auto, which on Linux picks the first /dev/video* that is not a v4l2loopback output (opening loopback for capture can crash OpenCV). You can also pin the real device with --camera /dev/video1 or load loopback on a fixed high number: sudo modprobe v4l2loopback devices=1 video_nr=10 card_label="LaughingMan".
Package names vary by distro (e.g. v4l2loopback-dkms on Debian/Ubuntu).
Other platforms
On Windows and macOS, pyvirtualcam may use OBS Virtual Camera or other backends when available.
Metadata
Release files for laughing-man 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| laughing_man-1.2.4.tar.gz | 466.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| laughing_man-1.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 793.9 kB
Release files / laughing_man-1.2.4.tar.gz
| Download URL | laughing_man-1.2.4.tar.gz |
|---|---|
| Size | 466.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ee56380949aea0a793485080a83611e995db07449862c0e515a7e21cf441397
|
|
BLAKE2b-256 checksum How to use checksums |
31020f3ce04743fcf0ef0be88b9967ffd60dd4ba432440a8ae2d333307648297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.
Transparency logRelease files / laughing_man-1.2.4-py3-none-any.whl
| Download URL | laughing_man-1.2.4-py3-none-any.whl |
|---|---|
| Size | 327.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f32e904383847c08215bb9950142bbcff9c5dada6a3f4f6e0c24e85d9b86b0ed
|
|
BLAKE2b-256 checksum How to use checksums |
957e73023b34cf76153c38fcb7e2d2a9fb19d2b00b75824b37fae7686ac257a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.
Transparency log