Deep-Live-Cam launches a PySide6 desktop application when you runDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/hacksider/Deep-Live-Cam/llms.txt
Use this file to discover all available pages before exploring further.
python run.py without providing -s or -t arguments. The dark-themed window gives you point-and-click access to every processing option — no terminal flags required for most workflows. All toggle states are written to switch_states.json on disk so your preferences persist between sessions.
Launching the GUI
Window layout
The main window is fixed at 640 × 820 pixels (ROOT_WIDTH = 640, ROOT_HEIGHT = 820). It is divided into five vertical sections stacked from top to bottom:
Source and target image row
Two 200 × 200 drop zones sit side by side. Select a face opens a file browser filtered to images (
*.png, *.jpg, *.jpeg, *.gif, *.bmp). Select a target accepts images and videos (*.mp4, *.mkv). A ↔ swap button between the two zones exchanges the source and target paths when both are images. A 🔄 button fetches a random AI-generated face from thispersondoesnotexist.com.Action buttons
Start begins image/video processing. Preview opens a scrubable preview window. Destroy halts processing and exits the application.
Options card controls
Keep fps
When enabled, the output video preserves the original frame rate detected by
ffprobe. When disabled, the output defaults to 30 fps.Keep audio
Copies the original audio track from the source video into the output file using
ffmpeg. Enabled by default.Keep frames
Retains the temporary PNG frame files on disk after processing. Useful for debugging or post-processing individual frames.
Many faces
Swaps every detected face in each frame rather than only the primary (leftmost) face. Uses the same source image for all targets.
Map faces
Opens the Source × Target Mapper dialog so you can assign a different source face to each unique target face. Requires detection to run first.
Show FPS
Overlays a real-time frames-per-second counter on the live preview window, rendered with
cv2.putText in green at position (10, 30).Poisson Blend
Applies Poisson blending to the face edges for smoother integration with the surrounding skin tone.
Fix Blueish Cam
Corrects the blue or green color cast produced by some webcam sensors.
Face enhancer dropdown
The Face Enhancer dropdown lets you choose a super-resolution post-processing model to sharpen the swapped face:| Selection | Model key |
|---|---|
| None | No enhancement |
| GFPGAN | face_enhancer (GFPGANv1.4) |
| GPEN-512 | face_enhancer_gpen512 |
| GPEN-256 | face_enhancer_gpen256 |
Refinement sliders
The Refinement card contains three horizontal sliders:| Slider | Range | Default | Effect |
|---|---|---|---|
| Transparency | 0.0 – 1.0 | 1.0 | Blends between the original face (0%) and the fully swapped face (100%). Setting to 0 disables face swapping entirely. |
| Sharpness | 0.0 – 5.0 | 0.0 | Sharpens the enhanced face output. Only meaningful when a face enhancer is active. |
| Mouth Mask | 0 – 100 | 0 | Exposes the original mouth region on top of the swap. 0 = fully swapped mouth; 100 = original mouth to chin. Starts disabled on every launch regardless of saved state. |
Preview window
Clicking Preview opens a resizable overlay that renders a single processed frame. The preview window scales output to fit within 1200 × 700 pixels (PREVIEW_MAX_WIDTH = 1200, PREVIEW_MAX_HEIGHT = 700). For video targets a scrub slider lets you jump to any frame without running the full pipeline.
Language selector
The UI language is set at launch with the-l / --lang flag. For example, to launch in French:
LanguageManager class in modules/gettext.py translates all labels and tooltips at startup. Changing language requires a restart.
Status bar
The italic label at the bottom of the window shows live progress messages — such asProcessing..., Detecting fps..., or Processing to image succeed! — emitted by ui.update_status(). The function is thread-safe and routes messages through a Qt signal when called from a background thread.
All toggle states (keep fps, keep audio, many faces, etc.) are saved to
switch_states.json in the working directory after each change. Mouth mask is always reset to disabled on launch even if a non-zero value was saved.