Our project is a Python script built using the powerful MoviePy library. The primary goal of this script is to simplify the process of compressing and rotating videos within a designated folder. With a focus on user convenience, the script automatically resizes videos to a standard resolution of 1920x1080, ensures optimal audio quality, and carefully preserves the original video rotation.
- Video Compression: Compresses video files in the specified folder.
- Resolution: Sets the resolution of compressed videos to 1920x1080.
- Audio Quality: Ensures good audio quality in the compressed videos.
- Rotation Handling: Preserves the original rotation of videos during compression.
During our trip, we captured numerous videos using my friend's iPhone 15 Pro Max and Samsung Galaxy S22 Ultra. The videos were recorded in 4K and 8K resolutions. However, when attempting to view them on my computer and mobile device, I face various compatibility issues due to the high resolutions. To address this problem, I had to transfer the videos to a device that supports these resolutions.
Clone the Repository
git clone https://github.com/Sapansathawara/video_compressor_script_in_python
Install required dependencies:
pip install moviepy
Navigate to the script directory:
cd your-repository
Run the script:
python video_compressor.py
Folders Path
original_folder = r"G:\Himachal Pradesh\original002"
compress_folder_path = r"G:\Himachal Pradesh\compressor002"
- Make sure to have Python and the required dependencies installed.
- This script works well with vertical and horizontal videos captured on mobile devices.
This project is licensed under the MIT License.
Feel free to customize the README file further based on your preferences. You can add more sections, details, or badges depending on your project's requirements.