https://github.com/jjling2011/vtrim
去片头神器
https://github.com/jjling2011/vtrim
cut ffmpeg opencv python3 video
Last synced: 4 months ago
JSON representation
去片头神器
- Host: GitHub
- URL: https://github.com/jjling2011/vtrim
- Owner: jjling2011
- License: gpl-3.0
- Created: 2024-08-03T01:07:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T00:53:13.000Z (almost 2 years ago)
- Last Synced: 2025-03-17T00:41:33.056Z (about 1 year ago)
- Topics: cut, ffmpeg, opencv, python3, video
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vtrim.py 是一个用来删除视频片头的 python 脚本。
### 用法
```bash
# 安装需要的依赖,以 Archlinux 为例
sudo pacman -S python python-opencv python-jsonpickle ffmpeg
# 下载 vtrim.py 并添加可执行权限(略)
# 学习视频前 10 秒片头,存入 clips.db 中
# 每个参数的详细用法见 ./vtrim.py --help
./vtrim.py --add --db clips.db --in sample.mkv --time 10
# 创建文件夹用于存放裁剪后的视频
mkdir out/
# 根据学习到的 clips.db 裁剪视频
# 其中 --in 参数可以指定多次,或者指定一个文件夹
./vtrim.py --cut --db clips.db --in sample.mkv --out out/
```
### 进阶用法
使用环境变量可以少输些参数,详见 [vtrim.sh](./vtrim.sh)