Skip to main content

CLI Utility to encode and recreate directories with ffmpeg.

Project description


Logo

FFenmass

PyPI PyPI - Python Version PyPI - Downloads PyPI - License
CLI Utility to encode and recursively recreate directories with ffmpeg.
Report Bug · Request Feature

Table of Contents

  1. Getting Started
  2. Features
  3. Usage
  4. Contributing
  5. Changelogs & TODOs
  6. License (MIT)

Features

  • Processing whole directories with ffmpeg.
  • Recreating directories with identical foldernames/filenames on the output.
  • Skipping Files that have alredy been processed.
  • Deleting half processed files, to keep output directory clean.
  • Ignoring non media files.

Getting Started

FFenmass is an ffmpeg wrapper, adding the ability to process media files in directories and recreate them recursively.

Prerequisites

  • ffmpeg
  • ffpb - Yeah I cant be bothered to make a ffmpeg loading bar, this works fine.
  • tqdm
  • rich

Installation

Recommended way is using pip, as building from git can be unstable.

pip3 install ffenmass

Usage

FFenmass is transparent above ffmpeg, this means most ffmpeg syntax can be used with ffenmass as is to encode directories, using your standard settings.

Differences

  • -i - This needs to be a directory created beforehand, instead of a file.

  • output - This needs to be a directory, instead of a file.If the directory does not exist it will be created. The output must be the last argument as per standard ffmpeg syntax.

  • -ext - This is a custom argument, specific to ffenmass, here you will provide the extension you want for your files, examples mp4,mkv,opus,mp3 , you only provide the extension and with no ., for further clarification, look at the command comparison below.

!! Directories are required to have a trailing slash / !!

The result is, ffenmass will encode all media files detected under the input directory with the provided ffmpeg arguments and output them with the same folder structure and filenames in the output directory.


Example compared to standard ffmpeg syntax

ffmpeg -i input.mkv -vcodec libx265 -preset medium out.mp4


ffenmass -i /path/to/folder/ -vcodec libx265 -preset medium -ext mp4 /output/directory/


Directory Tree visualization of what is going on when you run the command from the example above.

/path/to/folder/                           /output/directory/
├── givemefolders                         ├── givemefolders      
│   ├── somefolder                        │   ├── somefolder
│   │   └── example_movie.mkv             │   │   └── example_movie.mp4
│   │   └── irrelevant_textfile.txt       │   │   
│   ├── another_example.mkv         →     │   ├── another_example.mp4
│   ├── morefolders                       │   ├── morefolders
│   │   └── a_lot_of_examples.ts          │   │   └── a_lot_of_examples.mp4  
│   └── documentary.mkv                   │   └── documentary.mp4
├── another_example.mkv                   ├── another_example.mp4
├── more-examples.mp4                     ├── more-examples.mp4 
└── examples_and_examples.ts              └── examples_and_examples.mp4


License

Distributed under the MIT License. See LICENSE for more information.

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

ffenmass-0.2.9.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file ffenmass-0.2.9.tar.gz.

File metadata

  • Download URL: ffenmass-0.2.9.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for ffenmass-0.2.9.tar.gz
Algorithm Hash digest
SHA256 ac3a025e419bccaf148407327676f8a4cc7b30356cda8d208f5f76e4dc535da4
MD5 67b13ce68a07084720b5e798ef49fbe5
BLAKE2b-256 13040382a784b934f69b4349fe7e1b40d1060604d7504fe4c8bf607f7b1e8584

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page