|Wazakindjes d4a7ca891e Comply with some shellcheck shit, prepare for acceleration methods that may not require a device, allow specifying el end time rather than just total duration, support for using the same output format without re-encoding (pointless without start/end times tho LEL), show shorter halp on errors (i.e. not -h), also fuck data streams for MKV [=[=[=[=[==[=[=[||1 month ago|
|.editorconfig||7 months ago|
|.gitignore||4 years ago|
|LICENSE||4 years ago|
|README.md||8 months ago|
|convertem.sh||1 month 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.
-k: keep original file (i.e. don't move to
-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
-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
-r are mutually exclusive, should be pretty clear why (implied
-k can still be overridden with
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
vaapiis supported/tested at the moment)
-a: use the specified acceleration device (should pr0lly be
-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
.assfiles 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>"
When using specific codecs we use specific settings, these should pretty much correspond to "visually lossless" (or "audibly lossless" (?) for audio):"
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