CLI Utility to encode and recursively recreate directories with ffmpeg.

Overview

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.

Differences to FFmpeg Syntax

-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.

You might also like...
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

Library and command-line utility for rendering projects templates.
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

A handy command-line utility for generating and sending iCalendar events

A handy command-line utility for generating and sending iCalendar events This simple command-line utility is designed to generate an iCalendar event,

Comments
  • Resuming Encodes

    Resuming Encodes

    Redo the queue system, add optional functionality to resume directory encodings based on files present between source and output directories.

    Compare source filename's list with output's filename list to see which files are present on the output and skip them

    Possible argument names --resume

    Issues this may bring?

    If a user has a file name myfile.txt in the output directory and a file name myfile.mp4 in the input directory, it will get skipped. As FFenmass is file extension ignorant by design.

    Good trade off.

    enhancement 
    opened by george-avn 1
  • Make unprocessed media reside in /var/tmp/ until encoding is finished.

    Make unprocessed media reside in /var/tmp/ until encoding is finished.

    Make media that has not finished encoding reside in /var/tmp/ until encoding is finished, to avoid having corrupted files on the output directory in case of program termination.

    enhancement 
    opened by george-avn 1
Releases(v0.2.9)
  • v0.2.9(Jul 10, 2021)

  • v0.2.7(Jul 4, 2021)

    0.2.7

    • Rich and ffpb are now dependencies.
    • Added a file filter, now only media files will be parsed when scanned.
    • Using ffbp for a progress bar because I dont want to make one.
    • Using Rich to make text prettier.
    • Yaspin no longer a dependency, replaced by ffbp.
    • Code cleaned up, file related functions are under their own Class.
    • Small changes to comments to be more thorough.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.6(Jun 18, 2021)

  • 0.2.5(Jun 16, 2021)

    0.2.5

    • Migrated from os.path over to pathlib.(yay)
    • Added additional required argument -ext.
    • FFenmass now handled file extensions
    • -f argument is no longer required by ffenmass and is not checked.
    • Some ground work to prepare for windows testing and debuging.
    • Updated Readme with better examples.
    • Additional Code docs to help me mostly.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.4(Jun 13, 2021)

    0.2.4

    • FFenmass will now clean after itself, if interupted during processing, the item that was last in progress will be deleted.
    • FFenmass will skip files that already exist with the same filename in the output directory.
    • Encoding queue is now sorted alphanumerically.
    • Yaspin is now a dependency.
    • TQDM is now a dependency.
    • Prettyfied output.
    • FFmpeg is now mute (again).
    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Jun 8, 2021)

    0.2.3

    • Made ffmpeg less verbose using -hide_banner
    • FFenmass will now clear the terminal after each encode bc ffmpeg talks too much
    • Made a less ugly and proper Readme
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Jun 8, 2021)

    Simplified code, optimized imports
    Rich is no longer a dependency
    Updated README and Made Changelongs and TODO reside under CHANGELOGS.md
    
    Source code(tar.gz)
    Source code(zip)
Owner
George Av.
RESTfull APIS, Web backends, Databases and anything python.
George Av.
A Python3 rewrite of my original PwnedConsole project from almost a decade ago

PwnedConsoleX A CLI shell for performing queries against the HaveIBeenPwned? API to gather breach information for user-supplied email addresses. | wri

1 Jul 23, 2022
A terminal tool for git. When we use git, do you feel very uncomfortable with too long commands

PIGIT A terminal tool for git. When we use git, do you feel very uncomfortable with too long commands. For example: git status --short, this project c

Zachary 1 Apr 09, 2022
Simple tool, to update linux kernel on ubuntu

Kerbswap Simple tool, to update linux kernel on ubuntu Information At the moment, this tool only supports "Ubuntu" distributions, but will be expanded

dword 1 Oct 31, 2021
Arithmos cipher on CLI based

Arithmos Cipher CLI This is the CLI version of Arithmos Cipher. Install pip inst

LyQuid :3 1 Jan 16, 2022
[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

166 Dec 30, 2022
PyDropper - pick colors everywhere

PyDropper - pick colors everywhere Downloads Settings PyDropper is an eyedropper

Herman Brunberg 2 Jan 04, 2022
Enlighten Progress Bar is a console progress bar library for Python.

Overview Enlighten Progress Bar is a console progress bar library for Python. The main advantage of Enlighten is it allows writing to stdout and stder

Rockhopper Technologies 265 Dec 28, 2022
Python3 library for multimedia functions at the command terminal

TERMINEDIA This is a Python library allowing using a text-terminal as a low-resolution graphics output, along with keyboard realtime reading, and a co

Joao S. O. Bueno 89 Dec 17, 2022
This is a tool for managing file notes through the command line

This is a tool for managing file notes through the command line

2 Jun 22, 2022
Regis-ltmpt-auto - Program register ltmpt 2022 automatis

LTMPT Register Otomatis 2022 Program register ltmpt 2022 automatis dibuat untuk

1 Jan 13, 2022
Personal and work vim 8 configuration with submodules

vimfiles Windows Vim 8 configuration files based on the recommendations of Ruslan Osipov, Keep Your vimrc file clean and The musings of bluz71. :help

1 Aug 27, 2022
Bringing emacs' greatest feature to neovim - Tetris!

nvim-tetris Bringing emacs' greatest feature to neovim - Tetris! This plugin is written in Fennel using Olical's project Aniseed for creating the proj

129 Dec 26, 2022
Command-line program for organizing and managing ebook collections

Command-line program for organizing and managing ebook collections. It is a Python port from the original shell scripts ebook-tools

Raul 14 Nov 12, 2022
Simple CLI for managing Postgres databases in Flask.

Overview Simple CLI that provides the following commands: flask psql create flask psql init flask psql drop flask psql setup: create → init flask psql

Daniel Reeves 21 Oct 03, 2022
Command line tool to automate transforming the effects of one color profile to another, possibly more standard one.

Finished rendering the frames of that animation, and now the colors look washed out and ugly? This terminal program will solve exactly that.

Eric Xue 1 Jan 26, 2022
CLI para o projeto Compilado (Newsletter e Podcast do Código Fonte TV)

Compilado CLI Automatização de tarefas através de linha de comando para a geração de assets para episódios do Compilado, a newsletter e podcast do can

Gabriel Froes 18 Nov 21, 2022
TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.

TerminalGV So I got bored in the train, TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal. The "on-tr

Samuel 8 Dec 15, 2022
tiptop is a command-line system monitoring tool in the spirit of top.

Command-line system monitoring. tiptop is a command-line system monitoring tool in the spirit of top. It displays various interesting system stats, gr

Nico Schlömer 1.3k Jan 08, 2023
Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20)

x64-shellcode-encoder Custom 64 bit shellcode encoder that evades detection and removes some common badchars (\x00\x0a\x0d\x20) Usage Using a generato

Cole Houston 2 Jan 26, 2022
CLI utility for updating the EVE Online static data export in a postgres database

EVE SDE Postgres updater CLI utility for updating the EVE Online static data export postgres database. This has been tested with the Fuzzwork postgres

Markus Juopperi 1 Oct 29, 2021