With this tool you can easily automate conversion of your blu ray library and its upload to object storage.
Have ffmpeg installed locally and available in PATH. You can install it from package manager or compile from source if you want to use hevc_nvenc codec (for example).
Clone repository
~$ git clone [email protected]:KBTMPL/ffmpeg2obj.git
~$ cd ffmpeg2obj
Setup and activate venv
~/ffmpeg2obj$ python3 -m venv venv
~/ffmpeg2obj$ source venv/bin/activate
Install the packages
(venv) ~/ffmpeg2obj$ pip install .
Provide your object storage credentials and endpoint in .envrc
file, load it with direnv or just export those variables. You can use .envrc.example
as a template.
(venv) ~/ffmpeg2obj$ cat .envrc.example
#!/bin/bash
export aws_access_key_id="";
export aws_secret_access_key="";
export endpoint_url="";
(venv) ~/ffmpeg2obj$
The built-in help provides handles and default values for implemented functions
(venv) ~/ffmpeg2obj$ ffmpeg2obj --help
usage: ffmpeg2obj [-h] [-v] [--force-cleanup] [-s SOURCE_DIR] [-t TMP_DIR] [-i IGNORED_SUBDIR] [-o OBJ_PREFIX] -b
BUCKET_NAME [-e FILE_EXTENSION] [-vc VIDEO_CODEC] [--pix-fmt PIX_FMT] [-l LANGS]
[--width TARGET_WIDTH] [--height TARGET_HEIGHT] (-qp TARGET_QP | -crf TARGET_CRF)
Simple tool to compress blu ray movie library and store it in obj
options:
-h, --help show this help message and exit
-v, --verbose show additional information
--force-cleanup cleans up even on upload failure
-s SOURCE_DIR, --source-dir SOURCE_DIR
source directory for media to be transcoded
-t TMP_DIR, --tmp-dir TMP_DIR
temporary directory for media to be transcoded
-i IGNORED_SUBDIR, --ignored-subdir IGNORED_SUBDIR
ignored subdirectories
-o OBJ_PREFIX, --obj-prefix OBJ_PREFIX
source directory for media to be transcoded
-b BUCKET_NAME, --bucket-name BUCKET_NAME
source directory for media to be transcoded
-e FILE_EXTENSION, --file-extension FILE_EXTENSION
extension for the media files to be transcoded
-vc VIDEO_CODEC, --video-codec VIDEO_CODEC
video codec for transcoding of the media files
--pix-fmt PIX_FMT pix fmt for transcoding of the media files
-l LANGS, --languages LANGS
selected languages transcoding of the media files
--width TARGET_WIDTH target width for the media files to be transcoded
--height TARGET_HEIGHT
target height for the media files to be transcoded
-qp TARGET_QP Quantization Parameter for the media files to be transcoded
-crf TARGET_CRF Constant Rate Factor for the media files to be transcoded
(venv) ~/ffmpeg2obj$