Skip to main content

Aomenc by gop

Project description

aomenc-by-gop

Runs aomenc in parallel per group of pictures

Features

Requirements

Usage

aomenc-by-gop -i INPUT OUTPUT AOMENC_ARGS

aomenc-by-gop --help
usage: aomenc-by-gop [--help] -i INPUT [--workers WORKERS] [--passes PASSES]
                     [--kf-max-dist KF_MAX_DIST] [-u USE] [-s START] [-e END]
                     [-y] [--copy-timestamps] [--timestamps TIMESTAMPS]
                     [--fps FPS] [--mux] [--keyframes KEYFRAMES]
                     [--working-dir WORKING_DIR] [--keep] [--aomenc AOMENC]
                     [--vspipe VSPIPE] [--mkvmerge MKVMERGE]
                     [--mkvextract MKVEXTRACT] [--ranges RANGES] [--webm]
                     [--darkboost] [--darkboost-file DARKBOOST_FILE]
                     [--darkboost-profile DARKBOOST_PROFILE] [--show-segments]
                     [--extra-filter EXTRA_FILTER]
                     output

positional arguments:
  output

optional arguments:
  --help
  -i INPUT, --input INPUT
  --workers WORKERS
  --passes PASSES
  --kf-max-dist KF_MAX_DIST
  -u USE, --use USE     VS source filter (ex. lsmas.LWLibavSource)
  -s START, --start START
                        Input start frame
  -e END, --end END     Input end frame
  -y                    Skip warning / overwrite output.
  --copy-timestamps     Copy timestamps from input file. Support for variable
                        frame rate.
  --timestamps TIMESTAMPS
                        Timestamps file
  --fps FPS             Output framerate (ex. 24000/1001). Use "auto" to
                        determine automatically.
  --mux                 Mux with contents of input file.
  --keyframes KEYFRAMES
                        Path to keyframes file
  --working-dir WORKING_DIR
                        Path to working directory. Allows resuming and does not
                        remove files after completion.
  --keep                Do not delete temporary working directory.
  --aomenc AOMENC       Path to aomenc
  --vspipe VSPIPE       Path to vspipe
  --mkvmerge MKVMERGE   Path to mkvmerge
  --mkvextract MKVEXTRACT
                        Path to mkvmerge. Required for VFR.
  --ranges RANGES       frame_n:arguments;frame_n2:arguments
  --webm
  --darkboost           Enable dark boost.
  --darkboost-file DARKBOOST_FILE
                        Path to darkboost cache
  --darkboost-profile DARKBOOST_PROFILE
                        Available profiles: conservative, light, medium
  --show-segments       Show individual segments' progress.
  --extra-filter EXTRA_FILTER
                        Extra vapoursynth filtering (ex. cropping). Input and
                        output is clip.

Simple 2 pass encode:
aomenc-by-gop -i file.mkv out.mkv

Other examples:
aomenc-by-gop -i input.mkv out.mkv --copy-timestamps --workers 6 --kf-max-dist=120 --threads=8 --cpu-used=6
aomenc-by-gop -i input.mkv out.webm -s 100 -e 200 --threads=8 --cpu-used=6

Enable resuming:
aomenc-by-gop -i input.mkv out.mkv --working-dir project

Save/use onepass keyframes file
aomenc-by-gop -i input.mkv out.mkv --keyframes input.txt

Enable resuming using a different onepass keyframes file
aomenc-by-gop -i input.mkv out.mkv --working-dir project --keyframes input.txt

Use vpxenc:
aomenc-by-gop -i input out.mkv --aomenc vpxenc

Example cropping:
aomenc-by-gop -i input out.mkv --extra-filter="clip = clip.std.Crop(top=140, bottom=140)"

Extra Filter

Available variables are vs for vapoursynth and clip for the clip.

Example Python Usage

from aomenc_by_gop.app import encode, DefaultArgs

args = {
  "workers": 4,
  "fps": "auto",
  "darkboost": True,
  "input": "flt/01.mkv",
  "output": "enc/01.mkv",
  "working_dir": "gop/01",
  "keyframes": "kf/01.txt",
}

aom_args = [
  "--threads=4",
  "--good",
  "--cpu-used=2",
  "--tile-columns=1",
  "--row-mt=1",
  "--cq-level=8",
  "--end-usage=q",
  "--enable-dnl-denoising=0",
  "--denoise-noise-level=10",
]

ranges = [
  (5000, ["--denoise-noise-level=1"]),  # low noise
  (6000, ["--denoise-noise-level=10"]),
  (7000, ["--cq-level=10"], True),  # ignore dark boost
]

encode(DefaultArgs(**args), aom_args, ranges)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aomenc-by-gop-0.3.0.tar.gz (7.7 MB view hashes)

Uploaded source

Built Distribution

aomenc_by_gop-0.3.0-py3-none-any.whl (7.8 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page