This guide explains how to use the new ExifTool-based automatic LUT detection system for MPV.
The ExifTool Auto LUT script uses exiftool to detect gamma information directly from video files and automatically applies appropriate LUTs. This method is more reliable than XML parsing and works with a wider variety of video files.
- Primary Detection:
Acquisition Record Group Item Value: s-log3-cine - Fallback Detection:
CaptureGammaEquation,TransferCharacteristics,Gamma - Fast Switching: Cached metadata for quick playlist navigation
- Multiple Formats: Supports Sony, Canon, Panasonic, DJI, and more
| Gamma Type | LUT File | Description |
|---|---|---|
s-log3-cine |
SLog3SGamut3.CineToLC-709.cube |
Sony S-Log3 Cine to Rec.709 |
s-log3 |
SLog3SGamut3.CineToLC-709.cube |
Sony S-Log3 to Rec.709 |
s-log2 |
SLog3SGamut3.CineToSLog2-709.cube |
Sony S-Log2 to Rec.709 |
v-log |
VLog_to_V709_forV35_ver100.cube |
Panasonic V-Log to Rec.709 |
canon-log2 |
CinemaGamut_CanonLog2-to-Canon709_65_Ver.1.0.cube |
Canon Log2 to Rec.709 |
canon-log3 |
CinemaGamut_CanonLog3-to-Canon709_65_Ver.1.0.cube |
Canon Log3 to Rec.709 |
dji-osmo-p3 |
Neutral_Osmo_P3.cube |
DJI Osmo Pocket 3 Neutral |
rec709 |
(none) | Rec.709 (No LUT needed) |
The script automatically detects gamma information when you load a video file in MPV. No manual intervention required.
Press Ctrl+E in MPV to manually trigger gamma detection and LUT application.
Use the provided test scripts to verify detection works with your video files:
PowerShell (Recommended):
.\test_exiftool_detection.ps1 "C:\path\to\your\video.mp4"Batch:
test_exiftool_detection.bat "C:\path\to\your\video.mp4"Edit script-opts/exiftool_auto_lut.conf to customize behavior:
enabled=yes # Enable/disable the script
auto_apply=yes # Automatically apply LUTs
show_detection=yes # Show detection results in console
lut_base_path=~~home/lut/ # Base path for LUT files
fast_switching=yes # Enable fast LUT switching
cache_metadata=yes # Cache metadata for speed
exiftool_path=exiftool # Path to exiftool executable
timeout=5 # Timeout for exiftool executionThe script uses the following priority order for gamma detection:
- Acquisition Record Group Item Value (most reliable for Sony cameras)
- CaptureGammaEquation (alternative Sony format)
- TransferCharacteristics (standard video metadata)
- Gamma (basic gamma information)
Make sure exiftool is installed and available in your PATH:
exiftool -ver- Check if your video file contains metadata
- Try the test script to see what metadata is available
- Some video files may not contain gamma information
- Check the detected gamma value in the console output
- Add custom mappings to the
lut_mappingtable in the script - Verify the LUT file exists in the
lut/directory
When detection is successful, you'll see output like:
=== EXIFTOOL AUTO LUT ===
Video file: sample.mp4
=== METADATA DETECTED ===
Acquisition Record Group Item Value: s-log3-cine
Detected Gamma: s-log3-cine
✓ SUCCESS: Applied: Sony S-Log3 Cine to Rec.709
- Caching: Metadata is cached to avoid repeated exiftool calls
- Fast Switching: Playlist navigation is optimized for speed
- Background Processing: Detection runs in background to avoid blocking playback
The script is automatically loaded via mpv.conf:
script=scripts/exiftool_auto_lut.luaThe old XML-based script is disabled to avoid conflicts:
# script=scripts/sony_xml_auto_lut.lua # Disabled in favor of exiftool detection