2020-01-11 14:05:38 +00:00
< h1 align = "center" >
< br >
Av1an
< / br >
2020-05-08 04:44:45 +00:00
< / h1 >
2020-01-11 14:05:38 +00:00
2020-05-08 20:10:57 +00:00
< h2 align = "center" > A cross-platform all-in-one tool for streamlining AV1 encoding< / h2 >
2020-01-11 14:05:38 +00:00
2020-03-05 12:39:02 +00:00
![alt text ](https://cdn.discordapp.com/attachments/665440744567472169/685103807952060447/143740_05_03_20.png )
2020-01-12 03:44:02 +00:00
2020-05-08 22:01:19 +00:00
< h4 align = "center" >
2020-04-21 23:45:56 +00:00
< a href = "https://discord.gg/TssVH86" > < img src = "https://discordapp.com/api/guilds/696849974230515794/embed.png" alt = "Discord server" / > < / a >
< img src = "https://ci.appveyor.com/api/projects/status/cvweipdgphbjkkar?svg=true" alt = "Project Badge" > < a href = "https://codeclimate.com/github/master-of-zen/Av1an/maintainability" > < img src = "https://api.codeclimate.com/v1/badges/41ea7ad221dcdad3fe8d/maintainability" / >
2020-02-16 16:00:26 +00:00
< img = src = "https://app.codacy.com/manual/Grenight/Av1an?utm_source=github.com&utm_medium=referral&utm_content=master-of-zen/Av1an&utm_campaign=Badge_Grade_Dashboard" > < / a >
< a href = "https://www.codacy.com/manual/Grenight/Av1an?utm_source=github.com&utm_medium=referral&utm_content=master-of-zen/Av1an&utm_campaign=Badge_Grade" > < img src = "https://api.codacy.com/project/badge/Grade/4632dbb2f6f34ad199142c01a3eb2aaf" / > < / a >
< / h4 >
2020-03-10 19:14:34 +00:00
< h2 align = "center" > Easy, Fast, and Efficient < / h2 >
2020-01-13 14:07:26 +00:00
2020-05-08 20:10:57 +00:00
An easy way to start using AV1 / VP9 / VP8 encoding. AOM, rav1e, SVT-AV1, VPX are supported.
2020-05-08 04:44:45 +00:00
2020-01-12 03:44:02 +00:00
Example with default parameters:
2020-04-25 14:27:07 +00:00
av1an -i input
2020-01-12 03:44:02 +00:00
2020-01-13 14:07:26 +00:00
With your own parameters:
2020-01-12 03:44:02 +00:00
2020-04-25 14:27:07 +00:00
av1an -i input -enc aom -v " --cpu-used=3 --end-usage=q --cq-level=30 " -ff " -vf scale=-1:720 "
2020-03-26 11:35:49 +00:00
-w 10 -p 2 -a " -c:a libopus -b:a 24k " -s scenes.csv -log my_log -o output_file
2020-01-12 03:44:02 +00:00
2020-01-13 14:07:26 +00:00
< h2 align = "center" > Usage< / h2 >
2020-05-13 03:07:06 +00:00
-i --file_path Input file(s) (relative or absolute path)
2020-02-14 06:42:25 +00:00
2020-05-13 03:07:06 +00:00
-o --output_file Name/Path for output file (Default: (input file name)_av1.mkv)
2020-04-22 17:28:50 +00:00
Output file ending is always `.mkv`
2020-02-14 06:42:25 +00:00
2020-04-24 21:28:19 +00:00
-enc --encoder Encoder to use (aom,rav1e,svt_av1,vpx. Default: aom)
2020-01-16 09:38:52 +00:00
Example: -enc rav1e
2020-02-17 14:13:16 +00:00
-v --video_params Encoder settings flags (If not set, will be used default parameters.
2020-01-16 04:30:21 +00:00
Required for SVT-AV1s)
2020-01-27 18:55:00 +00:00
Must be inside ' ' or " "
2020-02-14 06:42:25 +00:00
2020-02-17 14:09:10 +00:00
-p --passes Set number of passes for encoding
2020-05-08 04:34:25 +00:00
(Default: AOMENC: 2, rav1e: 1, SVT-AV1: 2)
At current moment 2nd pass rav1e not working
2020-02-14 06:42:25 +00:00
2020-01-13 17:04:14 +00:00
-a --audio_params FFmpeg audio settings flags (Default: copy audio from source to output)
2020-02-03 23:09:23 +00:00
Example: -a '-c:a libopus -b:a 64k'
2020-02-14 06:42:25 +00:00
2020-03-26 11:35:49 +00:00
-w --workers Overrides automatically set number of workers.
2020-05-08 04:34:25 +00:00
Example: rav1e settings " ... --tile-rows 2 --tile-cols 2 ... " -w 3
2020-02-14 06:42:25 +00:00
2020-02-06 00:43:33 +00:00
-s --scenes Path to file with scenes timestamps.
2020-02-07 23:25:04 +00:00
If given `0` spliting will be ignored
2020-02-06 00:43:33 +00:00
If file not exist, new will be generated in current folder
2020-02-14 06:42:25 +00:00
First run to generate stamps, all next reuse it.
2020-03-01 13:29:08 +00:00
Example: "-s scenes.csv"
2020-05-13 03:07:06 +00:00
-cfg Save/Read config file with encoder, encoder parameters,
FFmpeg and audio settings.
2020-02-14 06:42:25 +00:00
2020-04-25 19:17:32 +00:00
-tr --threshold PySceneDetect threshold for scene detection Default: 50
2020-02-14 06:42:25 +00:00
2020-05-08 22:01:19 +00:00
-ff --ffmpeg FFmpeg options. Applied to each segment individually
2020-04-03 18:17:29 +00:00
Example:
2020-03-01 13:29:08 +00:00
--ff " -r 24 -vf scale=320:240 "
2020-02-14 06:42:25 +00:00
2020-01-26 20:58:45 +00:00
-fmt --pix_format Setting custom pixel/bit format(Default: 'yuv420p')
Example for 10 bit: 'yuv420p10le'
2020-02-17 13:22:34 +00:00
Encoding options should be adjusted accordingly.
2020-02-14 06:42:25 +00:00
--resume If encode was stopped/quit resumes encode with saving all progress
Resuming automatically skips scenedetection, audio encoding/copy,
spliting, so resuming only possible after actuall encoding is started.
/.temp folder must be presented for resume.
2020-03-27 22:31:21 +00:00
--no_check Skip checking numbers of frames for source and encoded chunks.
2020-04-24 21:28:19 +00:00
Needed if framerate changes to avoid console spam.
2020-03-27 22:31:21 +00:00
By default any differences in frames of encoded files will be reported.
2020-03-26 11:35:49 +00:00
2020-03-27 22:31:21 +00:00
--keep Not deleting temprally folders after encode finished.
2020-03-26 11:35:49 +00:00
2020-01-22 08:54:10 +00:00
-log --logging Path to .log file(Default: no logging)
2020-03-26 11:35:49 +00:00
2020-04-22 17:37:05 +00:00
--temp Set path for temporally folders. Default: .temp
2020-03-26 11:35:49 +00:00
2020-03-27 22:31:21 +00:00
--boost Enable experimental CQ boosting for dark scenes. Refer to 1.7 release notes.
2020-03-26 11:35:49 +00:00
2020-04-22 17:44:04 +00:00
-bl CQ limit for boosting. CQ can't get lower than this value.
2020-03-26 11:35:49 +00:00
2020-04-22 17:44:04 +00:00
-br CQ range for boosting. Delta for which CQ can be changed
2020-05-08 22:01:19 +00:00
2020-03-26 21:35:08 +00:00
--vmaf Calculate vmaf for each encoded clip.
2020-04-24 21:28:19 +00:00
Saves plot after encode, showing vmaf values for all video segments.
2020-03-27 22:31:21 +00:00
Requires: Installed FFMPEG with libvmaf and installed libvmaf.
2020-05-08 22:01:19 +00:00
2020-03-31 16:54:53 +00:00
--vmaf_path Custom path to libvmaf models, by default used system one.
2020-05-08 22:01:19 +00:00
2020-04-24 21:28:19 +00:00
--tg_vmaf Vmaf value to target. Best works with 90-95 on 720/1080.
--vmaf_steps Number of evenly spaced probes that is used to interpolate vmaf to cq change.
Must be bigger than 3. Optimal is 4-6 probes. Default: 4
2020-05-08 22:01:19 +00:00
--vmaf_error Decrease initial Vmaf values for interpolation.Increasing number will result
in lower CQ and bigger final vmaf score, use to correct whole vmaf plot.
2020-04-24 21:28:19 +00:00
For start If target vmaf undershoot increase value by undershoot amount.
2020-05-08 22:01:19 +00:00
2020-04-28 18:26:27 +00:00
--min_cq, --max_cq Minimum and maximum CQ values used in interpolation in target Vmaf mode
2020-04-24 21:28:19 +00:00
Use to limit CQ values range. Default: 20, 63.
2020-01-13 14:07:26 +00:00
2020-01-12 03:44:02 +00:00
< h2 align = "center" > Main Features< / h2 >
2020-01-15 03:09:33 +00:00
**Spliting video by scenes for parallel encoding** because AV1 encoders currently not good at multithreading, encoding is limited to single or couple of threads at the same time.
2020-01-12 03:44:02 +00:00
2020-05-08 22:01:19 +00:00
* [PySceneDetect ](https://pyscenedetect.readthedocs.io/en/latest/ ) used for spliting video by scenes and running multiple encoders.
* Fastest way to encode AV1 without losing quality, as fast as many cores cpu have :).
* Resuming encoding without loss of encoded progress.
* Simple and clean console look.
* Automatic determination of how many workers the host can handle.
* Building encoding queue with bigger files first, minimizing waiting for last scene to encode.
* Both video and audio transcoding with FFmpeg.
* Logging of progress of all encoders.
* "Boosting" quality of dark scenes based on their brightness.
2020-05-08 04:34:25 +00:00
## Install
* Prerequisites:
2020-05-08 22:01:19 +00:00
* [Install Python3 ](https://www.python.org/downloads/ ) < br >
2020-05-08 04:58:09 +00:00
For Windows in the installer check the option to `add Python to PATH`
2020-05-08 22:01:19 +00:00
* [Install FFmpeg ](https://ffmpeg.org/download.html )
* [Install AOMENC ](https://aomedia.googlesource.com/aom/ ) For AOMENC encoder support
* [Install rav1e ](https://github.com/xiph/rav1e ) For rav1e encoder support
* [Install SVT-AV1 ](https://github.com/OpenVisualCloud/SVT-AV1 ) For SVT-AV1 encoder support
* [Install vpx ](https://chromium.googlesource.com/webm/libvpx/ ) For vpx encoder support
2020-04-25 16:15:58 +00:00
2020-05-08 04:34:25 +00:00
* With a package manager:
2020-05-08 22:01:19 +00:00
* [PyPI ](https://pypi.org/project/Av1an/ )
* [AUR ](https://aur.archlinux.org/packages/python-av1an/ )
2020-04-25 16:15:58 +00:00
2020-05-08 04:34:25 +00:00
* Manually:
2020-01-18 05:59:32 +00:00
2020-05-08 22:01:19 +00:00
* Clone Repo or Download from Releases
* `python setup.py install`
2020-04-29 20:05:00 +00:00
2020-03-26 11:35:49 +00:00
### Donations for Threadripper 3990x dream
2020-05-08 04:34:25 +00:00
2020-03-01 20:50:48 +00:00
Bitcoin - 1gU9aQ2qqoQPuvop2jqC68JKZh5cyCivG