Video Deepfake Detection
Detect deepfake videos, face replacement, video replay attacks, and liveness spoofing to prevent video-based identity fraud.
Video Deepfake Detection
Detect AI-generated and manipulated videos including face swaps, video replay attacks, and liveness spoofing to prevent video-based fraud.
Common Attack Vectors
Face Swap Videos
Real-Time Face Replacement:
- Live webcam feed with face replaced in real-time
- Software like DeepFaceLab, FaceSwap
- Can fool basic liveness checks
- Increasingly common in video KYC fraud
Pre-Recorded Face Swap:
- Legitimate user's verification video with face swapped
- Target person's face mapped onto real person's movements
- Synced with audio
- Very convincing if done well
Video Replay Attacks
Screen Playback:
- Playing pre-recorded video on phone/tablet screen
- Held up to webcam
- Can include real person performing liveness actions
- Detectable via screen moiré patterns
Virtual Camera:
- Software (OBS, ManyCam) feeds pre-recorded video to webcam
- No physical screen (harder to detect)
- Often used with deepfake face swap
- Can include interactive elements
AI-Generated Videos
Synthetic Person:
- Completely AI-generated person (doesn't exist)
- Generated frame-by-frame or video-to-video
- May include synthesized speech
- Very sophisticated attacks
Video-to-Video Translation:
- Target person's movements mapped to source video
- Maintains expressions and head movements
- Convincing for short clips
- Emerging threat
5 Credits Per video analysis
Detection Capabilities
1. Temporal Coherence Analysis
Analyze frame-to-frame consistency.
What We Check:
- Blinking Patterns: Natural vs. synthetic blinks
- Micro-Expressions: Subtle facial movements
- Head Movement: Natural motion patterns
- Background Consistency: Static background should remain static
- Lighting Changes: Abrupt vs. gradual changes
Deepfake Indicators:
- Unnatural blinking frequency (GANs struggle with eyes)
- Jittery movements (frame inconsistency)
- Face "pops" or sudden changes
- Background shifts when face moves (poor masking)
Analysis:
{
"temporalCoherence": {
"score": 45, // 0-100, lower = more suspicious
"issues": [
"Irregular blinking pattern (7 blinks in 3 seconds)",
"Micro-jitter in face region",
"Background shifts inconsistently with head movement"
],
"suspiciousFrames": [45, 67, 89, 112]
}
}2. Face Detection Consistency
Track face detection confidence across frames.
Authentic Video: Face detected with 95-99% confidence in all frames
Deepfake Video: Confidence drops or face lost in some frames
- GAN artifacts confuse face detector
- Poorly blended face swap
- Temporal inconsistency
{
"faceDetection": {
"averageConfidence": 72, // Should be 95+
"stableDetection": false,
"framesWithLowConfidence": 23, // out of 150 frames
"verdict": "suspicious"
}
}3. Optical Flow Analysis
Analyze motion patterns between frames.
Natural Motion:
- Smooth, continuous movement
- Consistent velocity
- Proper motion blur
Deepfake Motion:
- Abrupt changes in motion direction
- Inconsistent motion vectors
- Missing or incorrect motion blur
4. Audio-Visual Synchronization
Check if lip movements match audio.
Lip-Sync Analysis:
{
"audioVisualSync": {
"lipSyncScore": 68, // 0-100, authentic usually 90+
"issues": [
"Lip movements lag audio by 200ms",
"Mouth shape doesn't match phonemes",
"Audio quality inconsistent with video"
],
"verdict": "likely_deepfake"
}
}Common in:
- Voice cloning + face swap attacks
- Video with dubbed audio
- Screen replay with separate audio track
5. Screen Replay Detection
Detect videos played on screens and re-captured.
Detection Methods:
- Moiré Patterns: Interference from screen pixels
- Bezels/Edges: Screen edges visible in frame
- Refresh Rate Artifacts: Screen flicker at specific frequencies
- Reflection Analysis: Screen reflections
- Resolution Mismatch: Lower resolution from screen capture
{
"screenReplay": {
"detected": true,
"confidence": 89,
"indicators": [
"Moiré pattern detected in frames 23-145",
"Screen bezel visible in corner",
"60Hz screen refresh detected",
"Consistent rectangular region (device screen)"
]
}
}Liveness Detection
Passive Liveness
Analyze single frame or short video for spoofing.
Detection Methods:
- 3D depth estimation (flat photos lack depth)
- Texture analysis (paper/screen texture)
- Face movement naturalness
- Eye tracking (reflections, pupil dilation)
Result:
{
"passiveLiveness": {
"result": "fail",
"confidence": 92,
"spoofingType": "photo_attack",
"indicators": [
"No depth detected (flat surface)",
"Paper texture visible",
"No pupil dilation observed"
]
}
}Active Liveness
User performs specific actions (blink, smile, turn head).
Challenges:
- "Please blink twice"
- "Smile"
- "Turn your head to the left"
- "Turn your head to the right"
Analysis:
{
"activeLiveness": {
"result": "pass",
"challenges": [
{ "action": "blink", "response": "correct", "naturalness": 94 },
{ "action": "smile", "response": "correct", "naturalness": 88 },
{ "action": "turn_left", "response": "correct", "naturalness": 91 },
{ "action": "turn_right", "response": "correct", "naturalness": 90 }
],
"overallScore": 91
}
}Deepfake Challenges:
- Actions performed but movements unnatural
- Timing delays (deepfake processing lag)
- Artifacts during complex movements
Analysis Process
Step 1: Upload Video
const formData = new FormData();
formData.append('video', videoFile);
formData.append('analysisType', 'verification'); // or 'general'
formData.append('includeLiveness', 'true');
const job = await fetch('/api/v4/deepfake/analyse', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`
},
body: formData
});
// Returns job ID (processing takes 30-120s)
{
"jobId": "job_xyz789",
"status": "processing",
"estimatedTime": "45 seconds"
}Step 2: Processing
Analysis Pipeline (30-120 seconds):
- Video preprocessing (extract frames, audio)
- Frame-by-frame analysis (150-300 frames)
- Face detection and tracking
- Temporal coherence analysis
- Optical flow calculation
- Audio-visual sync check
- Liveness detection (if applicable)
- Screen replay detection
- Final risk scoring
Step 3: Receive Results
GET /api/v4/deepfake/jobs/:jobId
{
"jobId": "job_xyz789",
"status": "completed",
"video": {
"filename": "verification_video.mp4",
"duration": "12.5 seconds",
"frameCount": 375,
"resolution": "1280x720",
"fps": 30
},
"result": {
"isDeepfake": true,
"confidence": 89,
"manipulationType": "face_swap",
"riskScore": 85,
"recommendation": "reject"
},
"analysis": {
"temporalCoherence": {
"score": 42,
"issues": ["Irregular blinking", "Micro-jitter"]
},
"faceDetection": {
"averageConfidence": 76,
"stableDetection": false
},
"audioVisualSync": {
"lipSyncScore": 65,
"verdict": "poor_sync"
},
"screenReplay": {
"detected": false
},
"liveness": {
"result": "fail",
"spoofingType": "deepfake_video"
}
},
"suspiciousFrames": [
{
"frameNumber": 45,
"timestamp": "1.5s",
"issue": "Face detection dropped",
"confidence": 42
},
{
"frameNumber": 89,
"timestamp": "3.0s",
"issue": "Blending artifact",
"confidence": 68
}
]
}Confidence Scores
| Score | Assessment | Action |
|---|---|---|
| 90-100% | Highly likely deepfake | Reject |
| 70-89% | Likely deepfake | Manual review |
| 40-69% | Uncertain | Enhanced verification |
| 0-39% | Likely authentic | Accept |
Video Requirements
Technical Requirements
| Requirement | Specification |
|---|---|
| Format | MP4, MOV, WebM |
| Min Resolution | 640x480 pixels |
| Max Duration | 60 seconds |
| Max File Size | 50 MB |
| Min Frame Rate | 15 FPS |
| Recommended FPS | 30 FPS |
| Lighting | Evenly lit face |
| Audio | Required for lip-sync analysis |
Quality Checks
Reject If:
- Resolution < 640x480
- FPS < 15
- Face too small (< 200x200px)
- Face not visible in >20% of frames
- Extreme lighting (overexposed/underexposed)
- Heavy motion blur throughout
Integration with Verification
Enhanced Verification Workflow
{
"workflowType": "enhanced",
"livenessType": "active",
"enableDeepfakeCheck": true, // Video deepfake scan
"videoRequirements": {
"minDuration": 5, // seconds
"maxDuration": 15,
"requireActions": ["blink", "smile", "turn_head"],
"rejectDeepfakeThreshold": 70
}
}Flow:
- User records video with liveness actions
- Video uploaded
- Liveness check (user performed actions?)
- Deepfake scan (is video authentic?)
- Face match (matches ID document?)
- Decision: Approve/Reject/Manual Review
Best Practices
- Require active liveness - Harder to deepfake with random actions
- Set video duration 5-15 seconds - Enough frames to analyse, not too long
- Check audio-visual sync - Voice cloning often has sync issues
- Combine with image deepfake - Scan ID document too
- Manual review uncertain cases - 70-89% confidence range
- Limit retries - Fraudsters will retry until successful, limit to 3 attempts
- Monitor suspicious patterns - Multiple failed liveness from same device
Limitations
Detection Challenges
Current Performance:
- Face swap detection: 92%
- Screen replay: 97%
- Liveness spoofing: 94%
- Overall: 92%
Difficult Cases:
- High-quality real-time deepfakes (expensive hardware required)
- Short videos (<5 seconds, fewer frames to analyse)
- Low resolution (artifacts harder to detect)
- Poor lighting (masks deepfake artifacts)
False Positives
Common Causes:
- Webcam quality (low-end cameras have artifacts)
- Compression (heavy video compression adds artifacts)
- Lighting changes (moving between shadows)
- Network lag (in live video calls, can cause jitter)
Mitigation:
- Use 70%+ threshold
- Manual review 70-89% range
- Allow retake with better lighting/camera
Attack Evolution
Current Threats (2024)
-
Real-Time Face Swap:
- Software: DeepFaceLive, FaceSwap Live
- Requires: Powerful GPU, training data
- Effectiveness: Medium (detectable with temporal analysis)
-
Video-to-Video:
- Techniques: First Order Motion Model, Face2Face
- Quality: High for short clips
- Effectiveness: High (harder to detect)
-
Screen Replay:
- Simple but common
- Effectiveness: Low (easily detected)
Emerging Threats
- Neural Rendering: Real-time photorealistic face synthesis
- Audio-Driven Face Reenactment: Lip-sync from audio only
- Full-Body Deepfakes: Beyond just face replacement
Continuous Updates
Our detection models are updated monthly to counter new deepfake techniques. Keep your integrations up-to-date for best protection.
API Reference
Analyze Video
POST /api/v4/deepfake/analyse
// multipart/form-data
{
"video": File,
"analysisType": "verification" | "general",
"includeLiveness": boolean,
"returnSuspiciousFrames": boolean
}
// Returns
{
"jobId": "job_xyz789",
"status": "processing",
"estimatedTime": "45 seconds"
}Get Results
GET /api/v4/deepfake/jobs/:jobId
// Returns full analysis including frame-by-frame dataExtract Suspicious Frames
GET /api/v4/deepfake/jobs/:jobId/frames?frameNumbers=45,89,112
// Returns specific frames as images for manual reviewPricing
| Video Duration | Processing Time | Cost |
|---|---|---|
| Standard video | 30-120 seconds | 5 Credits |
| Extended videos | Contact us | Custom pricing |
Next Steps
Ready to get started?
Start with our free plan. No credit card required.