- About
- Features
- Screenshots
- Requirements
- Installation
- Quick Start
- Algorithm
- Project Structure
- Configuration
- Testing
- Build EXE
- Cleaning Scripts
- FAQ
- Contributing
- Acknowledgements
VidMark is a desktop application for embedding digital watermarks into video files. It utilizes a combination of Discrete Wavelet Transform (DWT) and Discrete Cosine Transform (DCT) with Quantization Index Modulation (QIM) to hide digital signatures that are robust against compression, noise, and filtering.
This project was created as part of a university elective course.
- DWT-DCT-QIM β Embedding in the frequency domain within the LL subband DCT coefficients.
- Adjustable Intensity β Presets: Invisible / Balanced / Robust, or manual delta input.
- Unique Seed β XOR of base seed + UUID + timestamp for enhanced security.
- Automatic Key Generation β A JSON key file is mandatory for extraction.
- Majority Voting β Extraction from N uniformly selected frames.
- Reed-Solomon Codes β Data recovery from corrupted bits.
- CRC-16 Verification β Integrity validation after extraction.
- SYNC Marker β Confirmation of watermark presence before parsing.
- 30+ Attack Types β Compression, noise, filtering, geometry, color transformations.
- H.264/H.265 Simulation β Real encoding/decoding via FFmpeg.
- NC/BER/PSNR Metrics β Calculated for every attack.
- CSV Export β Save results for analysis.
- PSNR β Peak Signal-to-Noise Ratio.
- SSIM β Structural Similarity Index.
- NC β Normalized Correlation.
- BER β Bit Error Rate.
- macOS-style Light Theme β Clean, modern QSS styling.
- Real-time Preview β Side-by-side comparison of original and watermarked frames.
- Detailed Logging β Operation log with timestamps and export capability.
- Settings Dialog β Wavelet/level/block/delta/CRF settings with compatibility tooltips.
Click to expand gallery
| Component | Version | Purpose |
|---|---|---|
| Python | 3.9+ | Runtime environment. |
| FFmpeg | 4.4+ | Video encoding/decoding, audio copying, A/V tag normalization, compression attack simulation (H.264/H.265). |
| ffprobe | (w/ FFmpeg) | Extracting video metadata (audio streams, format, duration). |
| ffplay | (w/ FFmpeg) | Video preview via ffplay (optional, right-click on preview). |
β οΈ FFmpeg is mandatory. VidMark requiresffmpeg,ffprobe, andffplayin the systemPATH. The application will show an error and exit if FFmpeg is not found.
Installing FFmpeg:
| Platform | Command |
|---|---|
| Windows | Download from ffmpeg.org, add to PATH. |
| macOS | brew install ffmpeg |
| Ubuntu | sudo apt install ffmpeg |
| Arch | sudo pacman -S ffmpeg |
git clone https://github.com/qexela/VidMark.git
cd VidMark
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
pip install -r requirements.txt- Launch:
ffmpeg -version # check ffmpeg installation python main.py - Embedding: Go to "Embedding" tab β Select Video β Enter Text β "Start" β Choose save path. Wait for processing β metrics will appear on the preview panel.
- Key:
β οΈ Save the.jsonkey file! Extraction is impossible without it. - Extraction: Go to "Extraction" tab β Select Watermarked Video β Select Key File β "Extract & Verify".
Result: β
CONFIRMED /
β οΈ MISMATCH / β NOT FOUND.
graph LR
Input(Input Frame) --> DWT[DWT Haar]
DWT --> LL[LL Subband]
LL --> DCT[DCT 8x8]
DCT --> QIM{Embed QIM}
QIM --> IDWT[IDWT]
IDWT --> Output(Output Frame)
The key file stores exact embedding parameters, including the scrambling seed. Without it, recovering the watermark is impossible.
π Expand file tree
VidMark/
βββ π main.py # Entry point
βββ βοΈ config.py # Global configuration
βββ π i18n.py # Internationalization (EN/RU)
βββ π requirements.txt
βββ π README.md
βββ π README.ru.md
βββ π LICENSE # GPLv3
βββ π .gitignore
β
βββ π core/ # Watermarking algorithms
β βββ π§ embedder.py # DWT-DCT-QIM Embedding
β βββ π extractor.py # DWT-DCT-QIM Extraction
β βββ π‘οΈ ecc.py # Reed-Solomon codes
β βββ π scrambler.py # Bit scrambling
β βββ π¦ payload.py # Payload formation and parsing
β βββ π metrics.py # PSNR, SSIM, NC, BER
β βββ π§ͺ attacks.py # Attack simulator
β βββ π keyfile.py # Key file management
β
βββ π ui/ # PyQt5 Interface
β βββ π main_window.py
β βββ π₯ embed_tab.py
β βββ π€ extract_tab.py
β βββ π§ͺ attack_tab.py
β βββ π log_tab.py
β βββ βοΈ settings_dialog.py
β
βββ π workers/ # Background threads
β βββ π video_worker.py
β
βββ π utils/ # Utilities
β βββ π¬ video_utils.py # Video I/O, FFmpeg
β βββ πΌοΈ image_utils.py # Image conversion
β
βββ π assets/
β βββ π¨ icon.ico
β βββ π¨ style.qss
β
βββ π scripts/
β βββ π¨ builder.py
β βββ π§Ή clean.bat / clean.sh / clean.ps1
β
βββ π tests/
β βββ π§ͺ test_*.py (10 modules, 30+ tests)
β
βββ π screenshots/
| Preset | Delta | PSNR (Typical) | Robustness | Application |
|---|---|---|---|---|
| Invisible | 20.0 | > 48 dB | Lower | Proof of authorship |
| Balanced | 35.0 | ~44-46 dB | Good | General use (Default) |
| Robust | 55.0 | ~40-43 dB | Maximum | Aggressive conditions |
| Wavelet | Level 1 | Level 2 | Min. Delta |
|---|---|---|---|
| haar | β Excellent | 25+ | |
| db2 | β Excellent | 30+ | |
| db4 | 40+ | ||
| bior4.4 | β Excellent | 30+ | |
| coif2 | β Poor | β Poor | 60+ |
pytest tests/ -v
python tests/test_cli.pypython scripts/build.py # Interactive menu
python scripts/build.py --build # Direct build
python scripts/build.py --build --console # With console windowScripts to clean the repository from temporary files (caches, build artifacts, etc.).
./scripts/clean.sh # Linux/macOS
scripts\clean.bat # Windows CMD
scripts\clean.ps1 # Windows PowerShellQ: Why can't I extract the watermark? A: Incorrect key file, excessive compression (CRF > 28), or geometric distortions (rotation > 2 deg).
Q: Can I embed a watermark into audio? A: No, VidMark works only with the video stream. Audio is copied unchanged.
Q: What happens if I lose the key file? A: The watermark cannot be recovered without the key.
This project was created as a university assignment and is open for educational contributions.
- Fork the repository
- Create a branch:
git checkout -b feature/improvement - Commit:
git commit -m 'Add improvement' - Push:
git push origin feature/improvement - Open a Pull Request
- PyWavelets β Wavelet transforms
- SciPy β DCT/IDCT
- OpenCV β Video processing
- FFmpeg β Video encoding
- reedsolo β Reed-Solomon codes
- PyQt5 β GUI framework (GPLv3 license)
- QtAwesome β Icon fonts
- Big Buck Bunny β Test video (CC BY 3.0)
Licensed under GPLv3 β’ Β© 2026 qexela





