Media Filter is a desktop GUI tool for scanning media folders (video + audio), analyzing file metadata, and generating batch FFmpeg transcoding commands.
桌面端媒体文件扫描统计工具,支持视频和音频文件的码率 / 时长 / 大小查看,批量生成 FFmpeg 转码命令。
Features · Quick Start · Requirements · Usage · Presets
- Folder scanning — Recursively scan folders for video + audio files; extract size, duration, and bitrate via ffprobe
递归扫描文件夹,支持视频和音频文件,通过 ffprobe 提取大小、时长、码率 - Multi-threaded — Configurable thread count for fast processing of large media libraries
可配置线程数,快速处理大量媒体文件 - Sort & filter — Sort by name, size, duration, or bitrate; filter by file format
按名称、大小、时长、码率排序;按格式筛选 - Selection stats — Check multiple files to see live totals: count, combined duration, combined size
勾选多个文件实时显示总数量、总时长、总大小 - Export TXT — Export file list with statistics (name, size, duration, bitrate) as a TXT report
导出文件列表及统计信息(文件名、大小、时长、码率)到 TXT 报表 - Batch commands — Built-in presets for x265 CRF, NVENC HEVC, and NVENC H.264; fully customizable
内置转码预设(x265 / NVENC HEVC / NVENC H.264),支持自定义命令和参数 - Theme — Dark / Light mode with smooth animated transitions
深色 / 浅色模式,流畅渐变动画过渡 - Bilingual UI — Chinese / English interface toggle; preset commands translated on the fly
中英文界面一键切换,预设命令同步翻译 - Drag-select — Click and drag to multi-select rows quickly
点击拖拽即可快速批量选择
# 1. Clone the repo
git clone https://github.com/yvgui2004/media-filter.git
cd media-filter
# 2. Install dependencies
pip install -r requirements.txt
# 3. Make sure ffprobe is installed (see Requirements below)
# 4. Run
python 3.pyDownload from python.org and check "Add Python to PATH" during installation.
从 python.org 下载,安装时勾选 "Add Python to PATH"。
python --version # should be ≥ 3.10pip install -r requirements.txtOr with a mirror (e.g. in China) / 国内镜像加速:
pip install customtkinter -i https://pypi.tuna.tsinghua.edu.cn/simpleThe app uses ffprobe to read media metadata. FFmpeg must be installed and available on your PATH.
程序通过 ffprobe 读取媒体元数据,必须先安装 FFmpeg 并加入系统 PATH。
Windows:
- Download ffmpeg-master-latest-win64-gpl.zip
- Extract to a directory, e.g.
C:\ffmpeg/ 解压到C:\ffmpeg - Add
C:\ffmpeg\binto system PATH / 添加到 PATH:- Right-click This PC → Properties → Advanced system settings → Environment Variables
右键"此电脑" → 属性 → 高级系统设置 → 环境变量 - Find
Pathin System variables, addC:\ffmpeg\bin
在系统变量Path中添加C:\ffmpeg\bin
- Right-click This PC → Properties → Advanced system settings → Environment Variables
- Restart the terminal and verify / 重启终端验证:
ffprobe -versionmacOS:
brew install ffmpegLinux (Debian / Ubuntu):
sudo apt install ffmpegpython -c "import customtkinter; print('OK')"
ffprobe -version | head -1python 3.py| Step | Action |
|---|---|
| 1 | Click Open Folder / 点击"选择文件夹" |
| 2 | Sort by name / size / duration, filter by format / 排序、筛选 |
| 3 | Check boxes to select media files / 勾选媒体文件 |
| 4 | Optionally apply a batch command preset / 可选应用批量命令预设 |
| 5 | Copy file paths or execute commands / 复制路径或执行命令 |
| Preset | Command | Description |
|---|---|---|
| x265 CRF 23 | ffmpeg -i input -c:v libx265 -crf 23 ... |
Compress ~75%, CPU encode |
| x265 CRF 26 | ffmpeg -i input -c:v libx265 -crf 26 ... |
Compress ~85%, CPU encode |
| NVENC HEVC CQ 23 | ffmpeg -i input -c:v hevc_nvenc -cq 23 ... |
GPU HEVC, high quality |
| NVENC HEVC CQ 26 | ffmpeg -i input -c:v hevc_nvenc -cq 26 ... |
GPU HEVC, balanced |
| NVENC H.264 | ffmpeg -i input -c:v h264_nvenc ... |
GPU H.264, max compatibility |
All presets can be customized in the Batch Command dialog. / 所有预设可在批量命令对话框中自定义。
media-filter/
├── 3.py # Main application / 主程序
├── requirements.txt # Python dependencies / Python 依赖
├── LICENSE # MIT license / MIT 许可证
└── README.md # This file / 本文件
MIT — feel free to use, modify, and distribute.