A modern Python/OpenCV-based video player with keyboard and trackbar controls, designed for frame-by-frame analysis and research purposes.
- Play/pause video playback
- Navigate frame by frame
- Adjust playback speed
- Take screenshots of specific frames
- Navigate using a slider trackbar
- Compatible with modern OpenCV versions (2025)
- Python 3.x
- OpenCV (cv2)
- NumPy
pip install opencv-python numpy
Run the program:
python video_player.py video_file.mp4
- W/w: Play
- S/s: Stay (Pause)
- D/d: Next (Next frame)
- A/a: Prev (Previous frame)
- E/e: Fast (Increase playing speed)
- Q/q: Slow (Decrease playing speed)
- C/c: Snap (Take screenshot of current frame)
- Esc: Exit
- Top trackbar: Navigate through video frames
- Bottom trackbar: Adjust playback speed
Contributions are welcome! Feel free to submit pull requests or open issues for improvements or bug fixes.
This project is open source and available for educational and research purposes.