Contact-less heart-rate detection from any YouTube video using Eulerian Video Magnification (EVM). Paste a link, pick a range & face region, and the app returns:
- Average BPM + rolling 6-beat graph
- Magnified-signal video
- Original video with live HR overlay
- Highest-quality YouTube download (720p fallback)
- Custom time-range selection
- Drag-and-drop crop box with optional dynamic tracking (CSRT/KCF/MIL)
- Real-time progress bar & step indicators
- Dark-mode, responsive UI
- Downloadable overlay & EVM videos (MP4, H.264 + AAC)
# 1. Clone & install
$ git clone https://github.com/your-user/HR-Analyzer.git
$ cd HR-Analyzer
$ python -m venv venv && source venv/bin/activate # (Windows: venv\Scripts\activate)
$ pip install -r requirements.txt
# 2. Run
$ python app.pyBrowse to http://localhost:5000.
- Find a suitable video – 1–4 minutes long, with a single face or exposed skin that stays mostly in view (minimal scene cuts). Copy the YouTube URL.
- Paste the link and tick Custom Time Range. Enter start/end in
mm:ss(or plain digits like0042). - Load Preview – when the first frame appears, drag a rectangle around the face / skin region. (Leave full-frame if unsure.)
- Click Confirm Selection & Analyze. Grab a coffee ☕ – progress updates live.
- Review results: BPM stats, graphs, and playable / downloadable videos.
🔎 Tip: tracking works best with CSRT (requires
opencv-contrib-python). Un-check Dynamic Region Tracking if footage is very shaky.
| Issue | Fix |
|---|---|
| "No tracker available" | Ensure opencv-contrib-python ≥ 4.8 installed |
| Grey videos / 0:00 duration | FFmpeg missing – install system ffmpeg or add to PATH |
| Wrong time-range | Use mm:ss or 0042 format; field auto-formats on blur |
MIT © 2025 Your Name
