vfp_search - Video Fragment Search Tool¶
📦 Source Code: View on GitHub
Overview¶
vfp_search is a command-line tool that searches for a video fragment (like a commercial, intro, or specific scene) within a larger video. It uses pre-generated fingerprints to quickly locate where the fragment appears in the main video.
Features¶
- Find video fragments within full-length videos
- Detect commercials in broadcast recordings
- Locate specific scenes or clips
- Fast search without re-processing videos
- Returns exact timestamps of matches
Usage¶
Required Parameters¶
-f, --fragment: Path to the fragment fingerprint file (the video segment to search for)-m, --main: Path to the main video fingerprint file (where to search)
Optional Parameters¶
-d, --md: Maximum acceptable difference (default: 500)-l, --license: VisioForge license key (default: "TRIAL")
Examples¶
Search for a commercial in a TV recording¶
Search with stricter matching¶
Using license key¶
Output¶
The tool outputs: - Number of matches found - Timestamp for each match (format: HH:MM:SS) - Difference score for each match - Total processing time
Example output:
Starting analyze.
Analyze finished. Elapsed time: 0:00:01.234
Search results: 3
00:05:32
01:23:45
02:15:18
Workflow Example¶
-
Generate fingerprint for the fragment (e.g., 30-second commercial):
-
Generate fingerprint for the full video:
-
Search for the commercial in the broadcast:
Use Cases¶
- Advertisement Detection: Find and skip commercials in recorded TV shows
- Content Monitoring: Detect when specific content appears in broadcasts
- Scene Location: Find specific scenes across multiple video files
- Intro/Outro Detection: Locate recurring segments in series
- Copyright Monitoring: Find unauthorized use of video clips
Best Practices¶
- Use "search" type fingerprints for fragments (
-t searchin vfp_gen) - Use "compare" type fingerprints for main videos (
-t comparein vfp_gen) - Fragments should be at least 5-10 seconds for reliable detection
- Lower difference thresholds (< 100) for exact matches
- Higher thresholds (100-500) for similar content with modifications
Performance Notes¶
- Search speed depends on main video length
- Memory usage is proportional to fingerprint sizes
- Typically processes hours of video in seconds
Error Handling¶
The tool will exit with an error if: - Either fingerprint file doesn't exist - Fragment is longer than the main video - Fingerprint files are corrupted - Incompatible fingerprint types
Limitations¶
- Fragment must be continuous (no cuts or edits)
- Very short fragments (< 5 seconds) may produce false positives
- Heavily modified content may not be detected
Related Tools¶
vfp_gen: Generate fingerprints from video filesvfp_compare: Compare two complete videosMMT: GUI tool for media monitoring with fragment search