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.
The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks.

Prisma Cloud CLI The Prisma Cloud CLI is a command line interface for Prisma Cloud by Palo Alto Networks. Support This project has been developed by P

Palo Alto Networks 13 Oct 14, 2022
A python script that enables a raspberry pi sd card through the CLI and automates the process of configuring network details and ssh.

This project is one script (wpa_helper.py) written in python that will allow for the user to automate the proccess of setting up a new boot disk and configuring ssh and network settings for the pi

Theo Kirby 6 Jun 24, 2021
Plumbum: Shell Combinators

Plumbum: Shell Combinators Ever wished the compactness of shell scripts be put into a real programming language? Say hello to Plumbum Shell Combinator

Tomer Filiba 2.5k Dec 28, 2022
xonsh is a Python-powered, cross-platform, Unix-gazing shell

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

xonsh 6.7k Dec 31, 2022
Code for the Open Data Day 2022 publicbodies.org Nepal data scraping activities.

Open Data Day Publicbodies.org Nepal We've gathered on Saturday, 5th March 2022 with Open Knowledge Nepal in order to try and automate the collection

Augusto Herrmann 2 Mar 12, 2022
Python CLI for accessing CSCI320 PDM Database

p320_14 Python CLI for accessing CSCI320 PDM Database Authors: Aidan Mellin Dan Skigen Jacob Auger Kyle Baptiste Before running the application for th

Aidan Mellin 1 Nov 23, 2021
A simple python script to execute a command when a YubiKey is disconnected

YubiKeyExecute A python script to execute a command when a YubiKey / YubiKeys are disconnected. ‏‏‎ ‎ How to use: 1. Download the latest release and d

6 Mar 12, 2022
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

Conrad Selig 51 Nov 29, 2022
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
Command line tool for interacting and testing warehouse components

Warehouse debug CLI Example usage for Zumo debugging See all messages queued and handled. Enable by compiling the zumo-controller with -DDEBUG_MODE_EN

1 Jan 03, 2022
Tools crack instagram + fb ayok dicoba keburu premium 😁

FITUR INSTALLASI [1] pkg update && pkg upgrade [2] pkg install git [3] pkg install python [4] pkg install python2 [5] pkg install nano [6]

Jeeck 1 Dec 11, 2021
pls is a better ls for developers, pronounced /pliːz/ as in 'please'

pls is a better ls for developers. The "p" stands for ("pro" as in "professional"/"programmer") or "prettier". It works in a manner similar to ls, in

Dhruv Bhanushali 572 Dec 28, 2022
Pyrdle - Play Wordle in the CLI. Write an algorithm to play Wordle for you. Ruin all of the fun you've been having

Pyrdle - Play Wordle in the CLI. Write an algorithm to play Wordle for you. Ruin all of the fun you've been having

Charles Tapley Hoyt 11 Feb 11, 2022
moviepy-cli: Command line interface for MoviePy.

Moviepy-cli is designed to apply several video editing in a single command with Moviepy as an alternative to Video-cli.

Kentaro Wada 23 Jun 29, 2022
Simple command line tool to train and deploy your machine learning models with AWS SageMaker

metamaker Simple command line tool to train and deploy your machine learning models with AWS SageMaker Features metamaker enables you to: Build a dock

Yasuhiro Yamaguchi 5 Jan 09, 2022
keep your machine's shell history synchronize

SyncShell Yet another tool for laziness Keep your machine's shell history synchronize Get SyncShell Currently, SyncShell is just available on PyPi and

Masoud Ghorbani 53 Dec 12, 2022
A Python-based Wordle solver and CLI player

Wordle A Python-based Wordle solver and CLI player This was created using Python 3.9.7. SPOILER ALERT: the data directory contains spoilers for upcomi

Will Fitzgerald 1 Jul 24, 2022
A tool to automatically convert old string literal formatting to f-strings

flynt - string formatting converter flynt is a command line tool to automatically convert a project's Python code from old "%-formatted" and .format(.

Elijah K 551 Jan 06, 2023
CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that data.

CLabel is a terminal-based cluster labeling tool that allows you to explore text data interactively and label clusters based on reviewing that

Peter Baumgartner 29 Aug 09, 2022
The WalletsNet CLI helps you connect to WalletsNet

WalletsNet CLI The WalletsNet CLI helps you connect to WalletsNet. With the CLI, you can: Trigger webhook events or resend events for easy testing Tai

WalletsClub 8 Dec 22, 2021