|
3 weeks ago | |
---|---|---|
.editorconfig | 11 months ago | |
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 1 year ago | |
convertem.sh | 3 weeks ago |
This shit is basically just a wrapper around ffmpeg
to convert files to various formats, cuz I cbf to remember obscure-ass flags. [[=[=[=[=[=[=
convertem [-h] [-k|-r] [-o <directory>] [-m] [-S] [-A <vaapi> -a <device>] [-c <hevc8|hevc10|h264>] [-s <time>] [-l <time>] <ico|ogg|mp3|mp4|mkv|mov|mkv> <file[s]>
Processed files are moved into a directory _convertem_orig
, which is created inside your current working directory (unless specified otherwise 0fc ;]). By default the output files are stored in the same place as where every original used to be.
Options:
-k
: keep original file (i.e. don't move to ./_convertem_orig
)-m
: don't copy (IDv3) metadata, like from WAV to MP3-r
: remove original file, or move it to a path specified in an environment variable CONVERTEM_TRASH
-o
: output to specified directory instead of grabbing the original file's dirname (implies -k
, also creates the original directory structure in the destination)-h
: show halp-k
and -r
are mutually exclusive, should be pretty clear why (implied -k
can still be overridden with -r
).
Options for non-static files (audi0, vidy0) only:
-s
: start time (total amount of seconds or hh:mm:ss
), skip part of a file-l
: length of the chunk to extract (same format)Options for vidy0 only:
-A
: try to use hardware acceleration with the specified acceleration type (only vaapi
is supported/tested at the moment)-a
: use the specified acceleration device (should pr0lly be /dev/dri/renderD128
for VAAPI)-c
: use a certain output codec, so you can convert e.g. 10-bit HEVC to 8-bit or just any form of HEVC to good ol' h264 (NOTE: the original input codec is not checked)-S
: extract embedded subtitles to a separate file and remove it from the original.ass
files may be accompanied by attachments for (custom) fonts, these will need to be manually dumped with e.g. ffmpeg -dump_attachment:t "" -i <input file>
"CODEC INFORMATION
When using specific codecs we use specific settings, these should pretty much correspond to "visually lossless" (or "audibly lossless" (?) for audio):"
HARDWARE ACCELERATION
There are many ways to get it working, but this script has only been tested with intel-media-va-driver(-non-free)
. This is a pretty good driver with decent support (CPU generation 8 and up (Broadwell)). VAAPI itself is still pretty common so other drivers might work just fine as well.
Read m0ar: https://trac.ffmpeg.org/wiki/Hardware/QuickSync