Skip to content

c300g97/Simple_Video_Reducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Video Converter to 480p, 720p, 1080p, 1440p, 2160p

A powerful Windows batch script for converting video files to HEVC (H.265) format with support for multiple hardware encoders, customizable resolutions, and multilingual interface.

Features

Key Capabilities:

  • Multi-Language Support: English, Spanish, and Italian interfaces
  • Multiple Encoder Options:
    • Generic libx265 (software-based, compatible with all systems)
    • Intel QuickSync (fast GPU acceleration for Intel systems)
    • NVIDIA NVENC (fast GPU acceleration for NVIDIA GPUs)
    • AMD VCE (fast GPU acceleration for AMD GPUs)
  • Flexible Resolution Selection: 480p, 720p, 1080p, 1440p, 2160p (4K), or custom resolutions
  • Quality Presets: Low, Medium, High, Ultra, or custom CRF values
  • Smart Audio/Subtitle Detection: Automatically detects and preserves Italian audio and subtitle tracks
  • Batch Processing: Convert multiple video files in one operation
  • Error Handling: Failed conversions are logged and separated for review
  • Automatic Fallback: Gracefully falls back to software encoder if GPU acceleration unavailable

Requirements

  • Windows: Windows 7 or later (batch script environment)
  • FFmpeg: Must be installed and added to system PATH
  • FFprobe: Usually included with FFmpeg
  • Video Files: Supports .mkv, .mp4, and .avi formats

System Requirements for GPU Acceleration

  • Intel QuickSync: Intel 2nd Gen Core processor or later with integrated graphics
  • NVIDIA NVENC: NVIDIA GeForce GTX 750 or later / GeForce GTX 960 or later
  • AMD VCE: AMD Radeon R9 Fury or later, or AMD Ryzen with Radeon graphics

Installation

Step 1: Install FFmpeg

  1. Visit https://ffmpeg.org/download.html
  2. Download the appropriate version for Windows
  3. Extract to a folder (e.g., C:\ffmpeg)
  4. Add FFmpeg to your system PATH:
    • Press Windows Key + X and select "System"
    • Click "Advanced system settings"
    • Click "Environment Variables"
    • Under "System variables", select "Path" and click "Edit"
    • Click "New" and add the FFmpeg folder path
    • Click OK and restart your computer

Step 2: Download the Script

  1. Clone or download movie_converter720_v2.bat from this repository
  2. Place it in a folder where you have write permissions

Step 3: Prepare Your Videos

  1. Copy all video files you want to convert to the same directory as the batch script
  2. Supported formats: .mkv, .mp4, .avi

Usage

Running the Script

  1. Open Command Prompt or PowerShell
  2. Navigate to the directory containing movie_converter720_v2.bat
  3. Run: movie_converter720_v2.bat
  4. Follow the on-screen prompts

Step-by-Step Guide

1. Select Language

1. English
2. Español
3. Italiano

Choose your preferred language (prompts and messages will display in this language).

2. Select Encoder

1. Generic (libx265 - Software)
2. Intel QuickSync (Fast, if available)
3. NVIDIA NVENC (Fast GPU, if available)
4. AMD VCE (Fast GPU, if available)

Choose based on your hardware. The script will auto-detect availability and fall back to libx265 if your chosen encoder isn't available.

3. Select Resolution

1. 480p  - Small file, mobile/streaming
2. 720p  - Standard, good for most uses
3. 1080p - Full HD, recommended
4. 1440p - QHD, high quality
5. 2160p - 4K, highest quality

Or enter a custom resolution (e.g., 1440).

4. Select Quality

1. Low (17-22)      - Small file, lower quality
2. Medium (23-25)   - Balanced size and quality
3. High (26-28)     - Larger file, better quality
4. Ultra (29+)      - Very large file, excellent quality
5. Custom (0-51)    - Enter your own CRF value

Quality Scale (CRF - Constant Rate Factor):

  • Lower values = Better quality, larger file size
  • Higher values = Smaller file size, lower quality
  • Range: 0-51 (0 = lossless, 51 = lowest quality)
  • Recommendation: 23-27 for most use cases

Conversion Process

Once you've selected your options:

  1. The script detects all video files in the current directory
  2. For each file, it:
    • Checks for Italian audio tracks (uses Italian if available)
    • Checks for Italian subtitle tracks
    • Displays file information and progress
    • Converts using your selected encoder and settings
  3. Successfully converted files are saved to Converted_[RESOLUTION]/
  4. Failed conversions are copied to Converted_errors/ for troubleshooting

Example Output Structure

Original Directory:
├── movie_converter720_v2.bat
├── video1.mkv
├── video2.mp4
└── video3.avi

After Conversion:
├── Converted_720p/
│   ├── video1.mkv
│   ├── video2.mkv
│   └── video3.mkv
└── Converted_errors/
    └── (any failed files)

Performance Tips

For Best Speed:

  • Use GPU acceleration (Intel QuickSync/NVIDIA NVENC/AMD VCE) if available
  • Lower the quality setting (higher CRF values)
  • Reduce resolution
  • Ensure FFmpeg has enough system resources available

For Best Quality:

  • Use higher resolution (1080p or 1440p)
  • Use lower quality values (CRF 23-25)
  • Use generic libx265 if you have time (slightly better quality than GPU encoders)

Storage Considerations:

  • 480p low quality: ~200-400 MB per hour
  • 720p medium quality: ~400-800 MB per hour
  • 1080p high quality: ~1-2 GB per hour
  • 1440p ultra quality: ~2-4 GB per hour

Troubleshooting

FFmpeg Not Found

Error: FFmpeg not found in PATH!

  • Solution: Verify FFmpeg installation and PATH configuration
  • Download from: https://ffmpeg.org/download.html
  • Add FFmpeg folder to system PATH and restart your computer

Encoder Not Available

Message: [Encoder] not available, falling back to libx265...

  • Cause: Your hardware doesn't support the selected GPU encoder
  • Solution: This is normal and handled automatically. Conversion will proceed with libx265
  • To use GPU acceleration, ensure your GPU drivers are up to date

Conversion Fails

Error: Conversion failed - [filename]

  • Solutions:
    1. Check if the video file is corrupted: ffmpeg -i "filename" -f null NUL
    2. Try a different encoder
    3. Try a lower quality setting
    4. Ensure sufficient disk space
    5. Check system resources (CPU/RAM)

Permission Denied

Error: Access is denied

  • Solution: Run Command Prompt as Administrator
  • Right-click Command Prompt and select "Run as administrator"

Character Encoding Issues

Issue: Non-ASCII characters display incorrectly

  • Solution: This can happen with certain filenames
  • Rename files to use ASCII characters only
  • Or run in a UTF-8 capable terminal

Video Format Support

Input Formats

  • .mkv (Matroska) - Recommended, best support for audio/subtitle detection
  • .mp4 (MPEG-4)
  • .avi (Audio Video Interleave)

Output Format

  • .mkv (Matroska) - Provides excellent container for audio/subtitle preservation

Advanced Options

Supported Codecs

  • Video: HEVC (H.265) - all encoders
  • Audio: Copied as-is (no re-encoding, preserves quality)
  • Subtitles: Copied as-is (preserves format and language info)

FFmpeg Command Structure

The script uses this FFmpeg command structure:

ffmpeg -i input.mkv -map 0:v:0 [audio] [subtitles] -c:v [encoder] -vf "scale=-2:[resolution]" [quality] -c:a copy -c:s copy output.mkv

Language Support

The script supports the following languages:

  • 🇬🇧 English - Full support
  • 🇪🇸 Spanish - Full support (Español)
  • 🇮🇹 Italian - Full support with audio/subtitle detection

Adding More Languages

To add a new language:

  1. Add a new condition in the :LANGUAGE_MENU section
  2. Add corresponding message variables with your language's strings
  3. Ensure language-specific functionality (like Italian audio detection) is adapted

Examples

Example 1: Quick Conversion to 720p

  1. Run the script
  2. Select: English → Generic (libx265) → 720p → Medium Quality
  3. All videos in the folder convert to 720p medium quality

Example 2: GPU-Accelerated High-Quality Conversion

  1. Run the script
  2. Select: English → NVIDIA NVENC → 1080p → High Quality
  3. Conversion is fast (GPU accelerated) with excellent quality

Example 3: 4K Archival

  1. Run the script
  2. Select: Spanish → Generic (libx265) → 2160p → Ultra Quality
  3. High-quality 4K conversions suitable for long-term archival

License

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

This means:

  • ✅ Free to use, modify, and distribute
  • ✅ Can be used for personal or commercial projects
  • ✅ No restrictions on modifications
  • ℹ️ Attribution is appreciated but not required

Contributing

Contributions are welcome! Areas for improvement:

  • Additional language support
  • More video format support
  • Enhanced error detection and recovery
  • Performance optimizations
  • GUI alternative to batch script

Credits

  • FFmpeg: https://ffmpeg.org/ - Video conversion framework
  • Video Encoding: Leverages HEVC (H.265) codec for efficient compression

Support & Issues

If you encounter issues:

  1. Verify FFmpeg is installed and in PATH
  2. Check video file integrity
  3. Try with a smaller/simpler video file
  4. Review FFmpeg error messages for details
  5. Ensure sufficient disk space

Disclaimer

This software is provided "as-is" without warranty. Users are responsible for:

  • Ensuring they have the right to convert and use video files
  • Respecting copyright and intellectual property rights
  • Verifying output quality meets their requirements
  • Backing up original files before conversion

What's New

Version 2

  • Multi-language interface (English, Spanish, Italian)
  • Italian audio/subtitle auto-detection
  • Improved encoder selection with availability checking
  • Better error handling and reporting
  • Enhanced user interface with progress tracking
  • GPU encoder fallback support

Future Roadmap

  • GUI application (standalone executable)
  • Batch job scheduling
  • Advanced audio/subtitle mapping options
  • Watermark/overlay support
  • Real-time encoding progress visualization
  • Support for additional formats (WebM, AV1)
  • Network batch processing

Made with ❤️ for video enthusiasts and content creators worldwide

About

A very simple bat software that can convert your video files to lower resolution with better encoding, supports multi-languages and also Nvidia, AMD and or Intel private encorders.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors