Skip to main content

Audio/Video ToolBox (avtb)

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

Install

# 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

# 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

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)

Metadata

Release files for avtb 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avtb 0.0.1
File Size Uploaded Provenance
avtb-0.0.1.tar.gz 60.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for avtb 0.0.1
File Interpreter ABI Platform
avtb-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 126.8 kB

Release files / avtb-0.0.1.tar.gz

Download URL avtb-0.0.1.tar.gz
Size 60.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1e5248963445d0757f05eaa38ef9f8c539a26a081c3491890efe87b115e586b0
BLAKE2b-256 checksum
How to use checksums
c1735adf60ed8c6d23c4545d1b617177a7bc29ac88739e41ae5da9415d8ccdf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / avtb-0.0.1-py3-none-any.whl

Download URL avtb-0.0.1-py3-none-any.whl
Size 66.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
962ae41480e58e1fb40349d7bd21bf60655347a0b242b5b88ab267778cdb48d0
BLAKE2b-256 checksum
How to use checksums
90fcf5a7d4f0442e673beead849dc09e89219be85d792245290656ec73d90e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for avtb 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page