Skip to content

Instantly share code, notes, and snippets.

@jmftrindade
Last active September 14, 2023 20:25
Show Gist options
  • Save jmftrindade/d21b7c9e4d60b20d7aa8d13764437a96 to your computer and use it in GitHub Desktop.
Save jmftrindade/d21b7c9e4d60b20d7aa8d13764437a96 to your computer and use it in GitHub Desktop.
Burn DVD5 from files

Burn DVD-video onto USB or DVD5 on Mac OS X

Step 1) Install dependencies

Needed for mkisofs tool:

brew install dvdrtools

Step 2) Make sure you have the correct dir structure

ls -l ISO_contents_dir/
drwxr-xr-x - jmftrindade staff 2023-04-24 15:50 AUDIO_TS/
drwxr-xr-x - jmftrindade staff 2023-04-24 15:50 VIDEO_TS/

VIDEO_TS should have VOB, BUP, and IFO files. It is ok for AUDIO_TS dir to be empty.

Step 3) Make .iso file

mkisofs -dvd-video -o /path/to/your.iso ISO_contents_dir/

Step 4) Burn .iso file onto device

To burn an ISO file onto a device from the command line on macOS, you can use the built-in dd command for USB drives and hdiutil for DVDs. Below are the steps for each method:

Burn ISO to USB Drive:

  1. First, insert the USB drive into your computer.
  2. Open Terminal (you can find it in Applications > Utilities).
  3. Run the following command to list all connected drives and identify your USB drive:
diskutil list
  1. Note the identifier for your USB drive (e.g., disk2, disk3, etc.). Be cautious, as selecting the wrong disk identifier may result in data loss.
  2. Unmount the USB drive using the following command (replace "X" with your USB drive's identifier):
diskutil unmountDisk /dev/diskX
  1. Use the dd command to burn the ISO file to the USB drive (replace "X" with your USB drive's identifier and "path/to/your.iso" with the actual path to the ISO file). The 'r' in front of the disk name is intentional:
sudo dd if=path/to/your.iso of=/dev/rdiskX bs=16M status=progress
  1. The process may take some time. Once it is completed, eject the USB drive using the following command:
diskutil eject /dev/diskX

Now, your USB drive is ready to use.

Burn ISO to DVD:

  1. Insert a blank DVD into your computer.
  2. Open Terminal (you can find it in Applications > Utilities).
  3. Run the following command to burn the ISO file to the DVD (replace "path/to/your.iso" with the actual path to the ISO file):
hdiutil burn path/to/your.iso
  1. The burning process will start, and you will see the progress in the Terminal. Once the process is complete, the DVD will be ejected automatically.

Now, your DVD is ready to use.

NOTE: you can control the burn speed using the hdiutil burn command by specifying the -speed flag followed by the desired speed value. To burn a DVD at 4x speed, use the following command (replace "path/to/your.iso" with the actual path to the ISO file):

hdiutil burn -speed 4 path/to/your.iso

The above command will burn the ISO file to the DVD at a 4x speed. If the DVD drive or the DVD media does not support the specified speed, the closest supported speed will be used instead. For a DVD with 6x speed, usually you want no faster than 4x speed burning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment