Overview
StreamVault uses MPV as its media player, providing high-quality playback of any video format without transcoding. The integration uses named pipes (IPC) on Windows for bidirectional communication, enabling progress tracking, resume playback, and watch history.MPV Integration
StreamVault controls MPV through inter-process communication using Lua scripts.IPC via Named Pipes
On Windows, StreamVault uses named pipes for MPV communication:Lua Tracking Script
A Lua script runs inside MPV to save progress:- Every 2 seconds while playing
- On pause/unpause
- On seek
- On file end
- On MPV shutdown
Progress File Format
%APPDATA%/StreamVault/mpv_progress/{media_id}.json
Supported Formats
MPV supports virtually all video formats without transcoding:Video Codecs
- H.264 / AVC
- H.265 / HEVC
- VP8 / VP9
- AV1
- MPEG-2 / MPEG-4
- XviD / DivX
Container Formats
HDR Support
- HDR10
- HDR10+
- Dolby Vision
- HLG (Hybrid Log-Gamma)
Audio Codecs
- AAC
- MP3
- FLAC
- DTS / DTS-HD
- TrueHD / Atmos
- AC3 / EAC3
- Opus
- Vorbis
MPV uses hardware acceleration when available (DXVA2, NVDEC, D3D11VA on Windows) for smooth playback of high-resolution content.
Resume Playback
StreamVault automatically saves your position and resumes where you left off.Progress Tracking
Progress Info Structure
Database Persistence
Progress is saved to the database after MPV exits:Resume Threshold
Progress is cleared if you’ve watched ≥95% of the video:Watch History
StreamVault tracks all your viewing activity.History Storage
Fetching History
- Last watched timestamp
- Resume position (if not completed)
- Progress percentage
- For TV episodes: Series title, S01E01 format, episode thumbnail
Clear History
Videasy Streaming Player
For online content, StreamVault includes an embedded Videasy player as a fallback.Streaming History
Separate table for online streaming progress:Save Streaming Progress
Cloud Streaming
StreamVault can stream directly from Google Drive without downloading.Authentication Headers
MPV receives the access token for authenticated streaming:Streaming Options
- Forward buffer: 500 MiB
- Backward buffer: 100 MiB
- Adaptive streaming enabled
Disk Caching
Optional persistent cache for cloud videos:- Play cached files instantly on re-watch
- No re-download from cloud
- Survives app restart
Process Monitoring
StreamVault monitors the MPV process to detect when playback ends.Windows Process Check
Background Monitoring
- Every 500ms while MPV is running
- One final time after MPV exits (with 300ms grace period)
MPV Options
StreamVault configures MPV with optimal settings:Windows Console Hiding
Troubleshooting
”MPV not found”
- Install MPV from mpv.io
- Add MPV to system PATH
- Or set custom path in Settings
”Playback stuttering”
- Enable disk cache in Settings for cloud files
- Check your internet speed (minimum 10 Mbps for HD)
- Reduce MPV cache size if low on RAM
”Progress not saving”
- Check permissions for
%APPDATA%/StreamVault/ - Ensure MPV isn’t being force-killed
- Wait a few seconds after closing MPV for final save
”Audio/video out of sync”
This is an MPV issue, not StreamVault. Try:- Updating MPV to the latest version
- Using a different video output driver in MPV config
- Disabling hardware acceleration if corrupted frames appear