Skip to content

Encodes all video files from a source directory to a target directory, optionally continuously.

License

Notifications You must be signed in to change notification settings

davidfstr/direncode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

direncode

Encodes all video files in a source directory to a destination directory. Optionally, the source directory will be watched continuously for changes and any new files will be encoded.

This behavior is useful for setting up a video encoding pipeline where one directory's contents are continuously encoded to another directory.

Requirements

  • Operating System:
    • macOS 10.15.7 (Catalina) or later
    • Linux — probably works, but untested
    • Windows — probably works, but untested
  • Python 3.7 or later
  • hbencode 1.1 or later
  • watchdog 0.8.3 or later

Installation

  1. Install and configure all requirements mentioned above.
    • In particular hbencode has some required configuration.
    • watchdog can usually be installed with pip install watchdog.
  2. Copy direncode.py to somewhere in your system path.

Usage

Encode all files in directory /srcdir to directory /dstdir using:

direncode.py /srcdir /dstdir

Continously encode all files that appear in /srcdir to directory /dstdir until you interrupt the program with Control-C:

direncode.py --watch /srcdir /dstdir

Continously encode from /srcdir to /dstdir, and additionally synchronize deletions that occur in /srcdir to /dstdir:

direncode.py --watch --delete /srcdir /dstdir

Display full usage information by invoking direncode.py with no arguments:

syntax: direncode.py [<options>] SOURCE_DIR DESTINATION_DIR
    
    Options:
        -w, --watch             Continuously watch the source directory
                                and continue synchronizing both directories.
        -d, --delete            Delete extraneous files from destination.

Support

If you run into problems or have questions, feel free to file a bug or contact me.

License

This software is licensed under the MIT License.

Release Notes

  • 1.1
    • Supports --delete option to additionally synchronize deletes.
  • 1.0
    • Initial version.
    • Supports --watch option for continuous synchronization.

About

Encodes all video files from a source directory to a target directory, optionally continuously.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages