Skip to content

Directory DurationStamp is a Python script using FFmpeg and Regex that adds duration-stamp to all video\audio files inside folders in a given directory. A Google Colab demo available to test on files in Google Drive.

License

Notifications You must be signed in to change notification settings

ankitsamaddar/directory-durationstamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Directory DurationStamp

Directory DurationStamp is a Python script using FFMPEG,to add file duration-stamps for video/audio files inside the folders, and sub-folders in a given directory. This script can be useful for keeping track of the total duration(run time) of files in each directory and subdirectories.

Features

  • Pattern and mark removal: The script can remove patterns and marks from file and folder names, allowing for cleaner duration-stamps.

  • Zero padding: Directory DurationStamp can add zero padding to the names of files and folders, creating a more uniform naming convention.

  • Duration-stamp removal: If duration-stamps have already been applied, the script can remove them to prevent duplication.

  • Multi-directory support: The script can process multiple directories and generate logs for each one, allowing for easy tracking of across multiple directories.

Usage

  1. Clone the repository.
  2. Install the required packages: ffmpeg
  3. Run the script: python directory_durationstamp.py
  4. Enter the <paths_to_the_directories>
  5. exit to stop
  6. The script will output a log file with the timestamps for each file, folder, and subdirectory in the given directory.

Colab Demo

Check out this Open In Colab to see how the script works with your directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Special thanks to the developers of the Python programming language and the ffmpeg library, which is used in this script for fetching the duration.

About

Directory DurationStamp is a Python script using FFmpeg and Regex that adds duration-stamp to all video\audio files inside folders in a given directory. A Google Colab demo available to test on files in Google Drive.

Resources

License

Stars

Watchers

Forks

Releases

No releases published