Metadata-Version: 2.4
Name: avtb
Version: 0.0.1
Summary: Just handy python wrappers to call ffmpeg/video2x executables :)
Home-page: https://gitee.com/kahsolt/avtb
Author: Kahsolt
Author-email: kahsolt@qq.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Utilities
Requires-Python: >=3.10.0
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-python
Dynamic: summary


### Audio/Video ToolBox (avtb)

    Just handy python wrappers to call ffmpeg/video2x executables :)

----

### Install

```shell
# install from PyPI
pip install avtb

# or install as local repo
git clone https://gitee.com/kahsolt/avtb.git
cd avtb
pip install -e .

# download ffmpeg & video2x, add to PATH
# ffmpeg: https://ffmpeg.org/download.html
# video2x: https://docs.video2x.org/installing/windows-qt6.html
```

### Usage

⚪ Use via command line

```shell
# benchmark with ffmepg
python -m avtb.benchmark.ffmpeg_encoder -I 1080p.mp4 -C libx264
python -m avtb.benchmark.ffmpeg_encoder -I 1080p.mp4 -C h264_nvenc
python -m avtb.benchmark.ffmpeg_encoder -I 1080p.mp4 -C h264_amf

# benchmark with video2x
python -m avtb.benchmark.video2x -S 720p.mp4 -F 1080p.mp4 -C libx264 --x2_only
python -m avtb.benchmark.video2x -S 720p.mp4 -F 1080p.mp4 -C h264_nvenc --x2_only

# batch video super-resolution
python -m avtb.tools.video_sr -I src/ -O out/ -P realcugan -M models-se -S 1080p
# video quality assessment
python -m avtb.tools.vmaf original.mp4 compressed.mp4
# merge ass subtitle (JP + CN)
python -m avtb.tools.ass_merge jp.ass cn.ass -O merged.ass
```

⚪ Use via API

```python
from avtb import *

print(get_ffmpeg_version())

run_ffmpeg_libx264('fin.mp4', 'fpout.mp4', preset='slower', crf=23)
metrics = run_ffmpeg_evaluate('fin.mp4', 'fpout.mp4')
print(metrics)

run_video2x_realesrgan('lowres.mp4', 'hires.mp4', model='realesr-animevideov3', factor=2)
```
