GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - woyxiang/videosheet2pdf: 将视频格式的乐谱拼接为 PDF 文档

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
README.md
README.md
 
 
videosheet2pdf.py
videosheet2pdf.py
 
 

Repository files navigation

VideoSheet2PDF 🎶

这是一个基于 Python 的自动化工具,专门用于将视频格式的乐谱转换为高清晰度的拼版 PDF 文档。它通过 OpenCV 自动识别乐谱区域,并利用 FFmpeg 的场景检测功能自动捕捉翻页瞬间。

🌟 核心功能

  • 自动裁切:通过 OpenCV 识别视频中乐谱的有效边界,自动计算 crop 参数并进行内缩补偿,消除白边。
  • 智能抽帧:利用 FFmpeg scene detection 算法,仅在乐谱翻页时提取画面,避免产生冗余帧。
  • 高质量合成:使用 ImageMagick 将提取的页面按 1x5(或自定义)布局拼接,并采用 Group4 压缩算法,确保 PDF 既清晰又小巧。
  • 单脚本运行:基于 uv 的单文件设计,无需手动管理虚拟环境和依赖。

🛠️ 环境要求

你需要安装以下工具:

  1. uv ( Python 包管理工具)
  2. FFmpeg (用于视频处理)
  3. ImageMagick (用于 PDF 合成)

提示:如果你安装了 scoop,建议通过 scoop 安装: scoop install uv ffmpeg imagemagick

🚀 快速开始

将脚本保存为 videosheet2pdf.py,然后在终端执行:

uv run videosheet2pdf.py "你的乐谱视频.mp4"

Credits

The core logic for sheet music region detection is inspired by the Wubaboo/ytSheetMusic project.

About

将视频格式的乐谱拼接为 PDF 文档

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.