Live mode streams a face-swapped video feed from your webcam in real time. Deep-Live-Cam reads frames from the camera, runs face detection and swapping on each frame in a background thread, and displays the processed output in a floating preview window. You can then capture that window with OBS or any screen-capture tool to use the feed as a virtual camera.Documentation 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.
Prerequisites
Before starting a live session you need:- A source face image (
.png,.jpg,.jpeg,.gif, or.bmp). - A connected webcam recognized by your operating system.
- Deep-Live-Cam installed with all models downloaded to the
models/folder. - ffmpeg installed and on your
PATH(required for video pipeline; live mode also uses it internally).
On Windows, cameras are enumerated via DirectShow (
pygrabber). On macOS, indices 0 and 1 are exposed. On Linux, Deep-Live-Cam probes /dev/video0 through /dev/video9 and lists every device that opens successfully.Starting a live session
Select a source face
Click Select a face and choose the image whose face you want to project onto the webcam feed. A 200 × 200 thumbnail appears in the source drop zone.
Choose your camera
In the Camera card at the bottom of the main window, pick your webcam from the dropdown. If no cameras are detected the dropdown is disabled.
Click Live
Click the Live button. Deep-Live-Cam loads the face analyser and face swapper models, then opens the Live Preview window.
Using OBS to capture the output
OBS Studio can capture the Live Preview window and publish it as a virtual camera or stream source:Add a window capture source
In OBS, click + in the Sources panel and choose Window Capture. Select the Live Preview window from Deep-Live-Cam.
Crop to the feed
Right-click the source and choose Filters → Crop/Pad to remove any window chrome around the video feed.
Live mirror
The--live-mirror flag (or the Live Mirror toggle in the GUI if available) flips the preview horizontally:
gpu_flip(temp_frame, 1) on every frame before passing it through the face swap pipeline.
Live resizable window
By default the Live Preview window has a fixed size. Pass--live-resizable to allow dragging the window edges:
VideoCapturer requests 960 × 540 at 60 fps from the camera regardless of the preview window size.
Changing the source face mid-session
You can hot-swap the source face without restarting. With the Live Preview window open, click Select a face in the main window and choose a new image. The processing worker detects the path change on the next frame (source_path != last_source_path) and reloads the source face immediately.
Performance tips
Use GPU acceleration
Pass
--execution-provider cuda (NVIDIA), --execution-provider coreml (Apple Silicon), or --execution-provider directml (Windows/AMD) to offload inference to the GPU. CPU-only mode is substantially slower.Skip the face enhancer
Set the Face Enhancer dropdown to None to avoid the second ONNX model pass on every frame. Enhancers add significant latency per frame.
Disable Show FPS in release
The Show FPS overlay calls
cv2.putText on every frame, which is cheap but adds a small constant cost. Disable it when sharing your feed publicly.Close other GPU workloads
The face swap and detection models share GPU memory with the rest of your system. Close GPU-heavy applications to reduce VRAM contention and improve frame rates.
Camera capture internals
TheVideoCapturer class in modules/video_capture.py manages camera access. On Windows it opens with DirectShow (CAP_DSHOW) using MJPG codec negotiated at construction time to avoid USB bandwidth limitations from uncompressed YUYV. On Linux and macOS it uses the default OpenCV backend. After opening, the class measures the actual FPS empirically by timing a 30-frame burst rather than trusting the value reported by CAP_PROP_FPS, which can be inaccurate on DirectShow.
The live pipeline runs on two background threads:
_CaptureWorker— reads raw frames from the camera into a bounded queue (max size 2). Drops frames on overflow to prevent memory build-up._ProcessingWorker— pulls raw frames, runs face detection and swapping, pushes processed frames to a second queue. The UI timer polls this queue at roughly twice the camera frame rate.
The 10–30 second warm-up on first launch is caused by ONNX Runtime loading and optimising the model graphs. Subsequent sessions in the same process start faster because the models remain loaded.