42
submitted 9 months ago by Shimitar@feddit.it to c/piracy@lemmy.dbzer0.com

Hi fellow sailors,

i have lots of downloaded... ISOs... that i need to converto to save space. I would like to make them all of the same size, let's say 720p, and same format, let's say h265.

I am on linux and the... ISOs... are sorted into a neatly named hierarchy of sub-folderds, which i want to preserve too. What is the best tool (CLI) for the scope? I can use ffmpeg with a bash script, but is there anything better suited?

you are viewing a single comment's thread
view the rest of the comments
[-] Dark_Dragon@lemmy.dbzer0.com 1 points 9 months ago

For batch converting ISOs to a specific resolution and format while preserving folder hierarchy on Linux, you can indeed use ffmpeg with a bash script. However, you might also consider using HandBrakeCLI, which is a command-line interface for HandBrake, a popular video transcoder.

Here's how you could use HandBrakeCLI to achieve your goal:

  1. Install HandBrakeCLI if you haven't already:
sudo apt-get install handbrake-cli
  1. Write a bash script to iterate through your directories, converting ISO files:
#!/bin/bash

# Set input and output directories
input_dir="/path/to/your/input/directory"
output_dir="/path/to/your/output/directory"

# Convert ISOs to 720p h.265
find "$input_dir" -name "*.iso" -type f | while read -r file; do
    output_file="${file%.iso}.mp4"
    handbrakecli --input "$file" --output "$output_dir/$output_file" --preset="Super HQ 720p30 Surround"
done

Adjust the preset according to your needs. You can check available presets with HandBrakeCLI --preset-list.

  1. Make the script executable:
chmod +x convert_iso.sh
  1. Run the script:
./convert_iso.sh

This script will convert all ISO files in the specified input directory to 720p h.265 MP4 files using HandBrakeCLI while preserving the folder hierarchy.

this post was submitted on 13 Feb 2024
42 points (90.4% liked)

Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ

54627 readers
452 users here now

⚓ Dedicated to the discussion of digital piracy, including ethical problems and legal advancements.

Rules • Full Version

1. Posts must be related to the discussion of digital piracy

2. Don't request invites, trade, sell, or self-promote

3. Don't request or link to specific pirated titles, including DMs

4. Don't submit low-quality posts, be entitled, or harass others



Loot, Pillage, & Plunder

📜 c/Piracy Wiki (Community Edition):


💰 Please help cover server costs.

Ko-Fi Liberapay
Ko-fi Liberapay

founded 1 year ago
MODERATORS