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.
Simple CLI tool to track your cryptocurrency portfolio in real time.

Simple tool to track your crypto portfolio in realtime. It can be used to track any coin on the BNB network, even obscure coins that are not listed or trackable by major portfolio tracking applicatio

Trevor White 69 Oct 24, 2022
dotfilery, configuration, environment settings, automation, etc.

┌┬┐┌─┐┌─┐┌─┐┬ ┬┌┬┐┬ ┬┬┌─┐ │││├┤ │ ┬├─┤│ │ │ ├─┤││ :: bits & bobs, dots & things. ┴ ┴└─┘└─┘┴ ┴┴─┘┴ ┴ ┴ ┴┴└─┘ @megalithic 🚀 Instal

Seth Messer 89 Dec 25, 2022
Wordle-solver - A tool that helps people who struggle with vocabulary to enjoy the famous game of WORDLE

Wordle-Solver Wordle-Solver helps people who struggle with vocabulary to enjoy t

Jason Chao 104 Dec 31, 2022
Regis-ltmpt-auto - Program register ltmpt 2022 automatis

LTMPT Register Otomatis 2022 Program register ltmpt 2022 automatis dibuat untuk

1 Jan 13, 2022
Shellmon is a tool used to create and control a webshell remotely, created using the Python3

An Simple PHP Webshell Manager Description Shellmon is a tool used to create and control a webshell remotely, created using the Python3 programming la

22XploiterCrew 12 Dec 30, 2022
Command line, configuration and persistence utilities

Zensols Utilities Command line, configuration and persistence utilities generally used for any more than basic application. This general purpose libra

Paul Landes 2 Nov 17, 2022
swarmexec executes command in swarm service

Swarmexec swarmexec executes command in swarm service Install pip install git+https://github.com/filimon43g/swarmexec.git Config In swarm_config.ini

Phil 2 Nov 23, 2021
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
A mini command line tool to spellcheck text files using tadqeek.alsharekh.org

tadqeek_sakhr A mini command line tool to spellcheck text files using tadqeek.alsharekh.org Usage usage: python tadqeek_sakhr.py [-h] -i INPUT [-o OUT

Youssif Shaaban Alsager 5 Dec 11, 2022
Rich is a Python library for rich text and beautiful formatting in the terminal.

The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more — out of the bo

Will McGugan 41.4k Jan 03, 2023
CPOST is a CLI tool to assist with the proper sizing of Clara Deploy pipelines

CPOST (Clara Pipeline Operator Sizing Tool) Tool to measure resource usage of Clara Platform pipeline operators Cpost is a tool that will help you run

NVIDIA Corporation 5 Sep 27, 2021
slipit is a command line utility for creating archives with path traversal elements.

slipit is a command line utility for creating archives with path traversal elements. It is basically a successor of the famous evilarc utility with an extended feature set and improved base functiona

usd AG 35 Dec 23, 2022
Command line tool for google dorks

CLI for google dorks This is the command line tool made with pytohn which allows the users to perform Google dorks easily Installation Install google

subrahmanya s hegade 3 Feb 08, 2022
Redial is a simple shell application that manages your SSH sessions on Unix terminal.

redial redial is a simple shell application that manages your SSH sessions on Unix terminal. What's New 0.7 (19.12.2019) Basic support for adding ssh

Bahadır Yağan 186 Oct 28, 2022
Shellcode runner to execute malicious payload and bypass AV

buffshark-shellcode-runner Python Shellcode Runner to execute malicious payload and bypass AV This script utilizes mmap(for linux) and win api wrapper

Momo Lenard 9 Dec 29, 2022
Wappalyzer CLI tool to find Web Technologies

Wappalyzer CLI tool to find Web Technologies

GOKUL A.P 17 Dec 15, 2022
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

Siddhesh Chavan 1 Jan 23, 2022
Cthulhu is a simple python CLI application that streams torrents directly from 1337x.

Cthulhu is a simple python CLI application that facilitates the streaming of torrents directly from 1337x. It uses webtorrent to stream video

Raiyan 27 Dec 27, 2022
Loading animation; a progress bar

Loading animation; a progress bar. When you know the remaining time or task completion percentage, then you’re able to show an animated progress bar:

Goldy 1 Jan 23, 2022
Commandline Python app to Autodownload mediafire folders and files.

Commandline Python app to Autodownload mediafire folders and files.

Tharuk Renuja 3 May 12, 2022