This Python script is used to monitor a directory and transcode any newly added video files into a new file with lower resolution. The specific transcoding parameters and file naming conventions can be modified by changing the code accordingly.
- Python 3.6+
- ffmpeg binaries
- ffmpeg-python
- watchdog
- Clone the repository.
- Install Python 3.6 or above if not already installed.
- Install ffmpeg binaries on your OS.
- Pip install ffmpeg-python watchdog.
- Open the terminal and navigate to the repository directory.
- Set the
path
variable insettings.py
to the directory you want to watch for new video files. - Run the script by executing the command:
python app.py
. - The script will watch the specified directory for new video files.
- When a new video file is detected, the script will transcode it to a lower resolution (480p) and save it in the same directory with the suffix
.mp4
. - The original file will be left untouched.
This project is licensed under the MIT License - see the LICENSE file for details.