Skip to content

R0nY3n/RonVideo2Pic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RonVideo2Pic

Video Frame Browser & Exporter / 视频逐帧浏览与导出工具

Author: Ron
Homepage: Ron.Quest
GitHub: github.com/R0nY3n/RonVideo2Pic


Screenshot / 截图

RonVideo2Pic License


Features / 功能特性

English

  • Video Support: Import any video format (MP4, AVI, MKV, MOV, WebM, etc.)
  • Frame Navigation: Frame-by-frame browsing with precise control
  • Playback Control: Multiple speeds (0.1x ~ 4x), play/pause
  • Zoom & Pan: Mouse wheel zoom (10% ~ 1000%), drag to pan, double-click to reset
  • Frame Export: Export current frame as PNG/JPG/BMP
  • Batch Export: Select multiple frames and export at once
  • GIF Export: Create GIF with platform presets (WeChat, QQ, General)
  • Bilingual UI: Auto-detect system language (Chinese/English)
  • Performance: OpenCV-powered, background preloading, LRU cache

中文

  • 视频支持:导入任意格式视频 (MP4, AVI, MKV, MOV, WebM 等)
  • 逐帧浏览:精确控制,逐帧查看
  • 播放控制:多种速度 (0.1x ~ 4x),播放/暂停
  • 缩放平移:滚轮缩放 (10% ~ 1000%),拖拽平移,双击重置
  • 帧导出:导出当前帧为 PNG/JPG/BMP
  • 批量导出:选中多帧一次性导出
  • GIF 导出:内置平台预设 (微信表情包、QQ 表情、通用)
  • 双语界面:自动检测系统语言 (中文/英文)
  • 高性能:OpenCV 驱动,后台预加载,LRU 缓存

Requirements / 系统要求

  • OS: Windows 10/11, macOS, Linux
  • Python: 3.8+
  • Dependencies: Pillow, opencv-python

Installation / 安装

Quick Start / 快速开始

# Clone the repository / 克隆仓库
git clone https://github.com/R0nY3n/RonVideo2Pic.git
cd RonVideo2Pic

# Install dependencies / 安装依赖
pip install -r requirements.txt

# Run / 运行
python video2pic.py

Windows

Double-click run.bat or run in terminal:

双击 run.bat 或在终端运行:

run.bat

macOS / Linux

# Make script executable (first time only)
chmod +x run.sh

# Run
./run.sh

Or directly:

python3 video2pic.py

Usage / 使用方法

Keyboard Shortcuts / 快捷键

Shortcut Function 快捷键 功能
/ Previous / Next frame / 上一帧 / 下一帧
Space Select/deselect frame 空格 选中/取消选中帧
Enter Play / Pause 回车 播放 / 暂停
Home / End First / Last frame Home / End 首帧 / 末帧
Ctrl+O Open video Ctrl+O 打开视频
Ctrl+S Export current frame Ctrl+S 导出当前帧
Ctrl+G Export GIF Ctrl+G 导出 GIF
Esc Reset zoom/pan Esc 重置缩放

Mouse Controls / 鼠标操作

Action Function 操作 功能
Scroll wheel Zoom in/out 滚轮 放大/缩小
Drag Pan view 拖拽 平移视图
Double-click Reset view 双击 重置视图

Export GIF / 导出 GIF

  1. Use Space to select frames / 使用空格键选中帧
  2. Click Export GIF button / 点击 导出 GIF 按钮
  3. Choose preset or customize: / 选择预设或自定义参数:
    • WeChat / 微信: 240px, 10 FPS
    • QQ: 200px, 8 FPS
    • General / 通用: 320px, 12 FPS
  4. Save file / 保存文件

Project Structure / 项目结构

RonVideo2Pic/
├── video2pic.py      # Main application / 主程序
├── requirements.txt  # Python dependencies / Python 依赖
├── run.bat           # Windows launcher / Windows 启动脚本
├── run.sh            # macOS/Linux launcher / macOS/Linux 启动脚本
├── .gitignore        # Git ignore rules / Git 忽略规则
└── README.md         # Documentation / 说明文档

Technical Details / 技术细节

  • Video Decoding: OpenCV (cv2.VideoCapture)
  • Image Processing: PIL/Pillow
  • GUI Framework: Tkinter (built-in)
  • Performance Optimizations:
    • LRU cache (300 frames)
    • Background preloading (100 frames ahead)
    • Adaptive rendering quality (fast mode during playback)
    • Debounced resize handling

Changelog / 更新日志

v2.0.0

  • Switched from FFmpeg to OpenCV for better performance
  • Added zoom and pan support
  • Added background frame preloading
  • Improved playback smoothness
  • Added 4x playback speed
  • Removed FFmpeg dependency

v1.0.0

  • Initial release
  • Basic frame browsing and export
  • GIF export with presets

License / 许可证

MIT License

Copyright (c) 2024 Ron

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Video Frame Browser & Exporter / 视频逐帧浏览与导出工具

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors