DVD Imager


by Laine D. Lee
Requires Mac OS X 10.2 or higher.

News: Son of DVD Imager Released.

Requires Mac OS X 10.5 or higher.

Update (3-29-10)

Son of DVD Imager 2.0 released with support for BP Progress Bar. If BP Progress Bar exists on your system, just remove every occurrence of "(*" and "*)" in the AppleScript source text, and create the Son of DVD Imager application as instructed below. Then when you create a DVD image, you can monitor progress in the BP Progress Bar window. (Tip: After you copy BP Progress Bar from its disk image to your hard drive, double-click its application icon so you can remove its quarantine, if applicable.)

Update (8-16-10) - Peter Anderson emailed me that some set top DVD Players refused to play DVDs created using Son of DVD Imager until he specified that the disk be generated with UDF version 1.02 instead of the default version 1.50. If you find that you need to try this, just change the hdiutil line in the Son of DVD Imager script to:

set my_command to "hdiutil makehybrid -udf -udf-version 1.02 -udf-volume-name" & space & (quoted form of thesourcename) & space & "-o" & space & (quoted form of dest_file) & space & (quoted form of (pos_filepath & thesourcename))

That's line 42 if you copy the entire contents of the box containing the Son of DVD Imager script.

The included AppleScript has the functionality of the original DVD Imager, but with less hassles. First create an application from the AppleScript in Script Editor or AppleScript Editor named "Son of DVD Imager". Next, drag one or more valid DVD folders (each containing at least a VIDEO_TS folder and an AUDIO_TS folder) onto Son of DVD Imager's icon. If dropped folders are Finder folders stored on your hard drive, Son of DVD Imager will create a disk image for each in the same location as the dropped folders. If the dropped folder is the volume of a mounted DVD, the disk image will be created on your desktop. I suppose if you mounted a commercial DVD with Fairmount, which requires VLC, you could create a disk image this way.


--Son of DVD Imager 2.0

--based on this command: hdiutil makehybrid -udf -udf-volume-name "DVD" -o "/path/to/DVD.iso" "/path/to/source/DVD/"

property temppath : "/private/tmp/"

property startnum : 0


on open the_items

my build_archive(the_items)

end open


on build_archive(the_items)

(*

try

tell application "Finder" to get application id "bp.ProgressBar"

set progressbar_present to true

on error

set progressbar_present to false

end try

*)

repeat with the_item in the_items

set the_item to the_item as alias

try

tell application "Finder"

set sost to ((container of folder (the_item as string)) as alias) as string

end tell

set posost to POSIX path of sost

on error

set posost to "/Volumes/"

end try

set this_filepath to (the_item as string)

if last character of this_filepath is ":" then

tell me to set it_is_a_folder to true

else

set it_is_a_folder to false

end if

set thesourcename to (name of (info for the_item))

set the_source_file to POSIX path of this_filepath

set pos_filepath to posost

set dest_name to replace_chars(thesourcename, " ", "_")

set dest_file to (temppath & dest_name & ".iso")

try

set my_command to "hdiutil makehybrid -udf -udf-volume-name" & space & (quoted form of thesourcename) & space & "-o" & space & (quoted form of dest_file) & space & (quoted form of (pos_filepath & thesourcename))

do shell script my_command (* & " > /dev/null 2>&1 &"

set i to POSIX file dest_file

set baseinfo to (info for ((POSIX file posost as text) & thesourcename) as alias)

set mytargsize to size of baseinfo

if progressbar_present then

tell application id "bp.ProgressBar"

activate

set title of window 1 to "Making DVD Image of" & space & thesourcename

show window 1

tell window 1

tell text field 2 to set content to "To cancel, click Son of DVD Imager in Dock then press command-period."

tell progress indicator 1 to set maximum value to 100

tell progress indicator 1 to set indeterminate to false

end tell

end tell

end if

activate

repeat

set myinfo to info for i

set s to get size of myinfo

set myreal to round ((s / mytargsize) * 100)


if progressbar_present then

tell application id "bp.ProgressBar"

tell window 1

tell progress indicator 1 to set content to (myreal)

end tell

end tell

end if

delay 4

if myreal > 98 then

exit repeat

end if

end repeat

*)

on error the error_message number the error_number

-- don't display error message if the user canceled a dialog within the [try] and [on error] lines above

if the error_number is not -128 then

activate

set the error_text to "Error: " & the error_number & ". " & the error_message

display dialog the error_text buttons {"Cancel"} default button 1

else

set quitset to {thesourcename}

repeat with oneprocess in quitset

try

set the_ps to paragraphs of (do shell script "/bin/ps -xwww")

repeat with _line in the_ps

if _line is "" or _line contains "TIME COMMAND" then

else

if _line contains oneprocess then

set theword to first word of _line

end if

end if

end repeat

do shell script "kill" & space & theword

delay 1

end try

end repeat

try

do shell script "rm" & space & (quoted form of dest_file)

end try

(*

if progressbar_present then

my stop_progress()

end if

*)

tell me to quit

error number -128

end if

end try

tell application "Finder"

set basename to dest_name

if pos_filepath is "/Volumes/" then

set pos_filepath to (POSIX path of (path to desktop folder))

end if

repeat

try

--set name_target to (POSIX file (pos_filepath & thesourcename & ".iso")) as alias

set name_target to (POSIX file (pos_filepath & dest_name & ".iso")) as alias

set startnum to startnum + 1

set dest_name to text returned of (display dialog "A file with that name already exists.

You may enter a new name or cancel" default answer (basename & startnum))

on error t_error

set startnum to 0

if t_error contains dest_name then

(*

if progressbar_present then

my Finish_image(thesourcename)

end if

*)

tell me to do shell script "ditto -rsrcFork" & space & (quoted form of dest_file) & space & (quoted form of (pos_filepath & dest_name & ".iso"))

(*

if progressbar_present then

my stop_progress()

end if

*)

exit repeat

else

exit repeat

end if

end try

end repeat

end tell

try

do shell script "rm" & space & (quoted form of dest_file)

end try

end repeat

end build_archive


on replace_chars(this_text, _bad, _good)

set AppleScript's text item delimiters to the _bad

set the item_list to every text item of this_text

set AppleScript's text item delimiters to the _good as string

set this_text to the item_list as string

set AppleScript's text item delimiters to ""

return this_text

end replace_chars


on run

set the_items to ((choose folder with prompt "Choose a video DVD folder:") as list)

build_archive(the_items)

end run


(*

on Finish_image(thesourcename)

tell application id "bp.ProgressBar"

activate

set title of window 1 to "Making DVD Image of" & space & thesourcename

show window 1

tell window 1

tell text field 2 to set content to "Finishing..."

tell progress indicator 1 to set indeterminate to true

tell progress indicator 1 to start

end tell

end tell

end Finish_image


on stop_progress()

tell application id "bp.ProgressBar"

quit

end tell

end stop_progress

*)






Description
DVD Imager is a user friendly interface for creating Video DVD disk images that hides the complexities of Jörg Schilling's mkisofs tool.

IMPORTANT: DVD Imager doesn't have the ability to defeat commercial DVD video copy protection methods, so it can't be used to copy commercial DVDs.

After creating the disk image, you use either Disk Copy or Disk Utility to burn the disk image to a DVD-R or DVD-RW to create a Video DVD that you can give away. You can also copy the disk image to another computer (even a PC) to burn the disk image.

DVD Imager can create a Video DVD disk image using one of these two methods:
   1. a VIDEO_TS folder (a DVD with slideshow created using iDVD, copied from an iDVD created Video DVD, etc)
   2. the contents of DVD including the VIDEO_TS and AUDIO_TS, and additional files and folders (such as a DVD with slideshow created using iDVD, a Video DVD created using iDVD, etc)

Step by step instructions for using DVD Imager
1. Use iDVD or some other Video DVD tool to create
    A.) a VIDEO_TS folder with muxed video and audio encoded in MPEG2, or
    B.)a folder with VIDEO_TS and AUDIO_TS folders and additional files and folders.
2. Launch DVD Imager
3. If you chose option A, be sure that VIDEO_TS folder mode is selected. If you chose option B, be sure that Disk Copy Mode is selected.
4. Drag the VIDEO_TS folder onto either the DVD Imager Dock icon or the DVD Imager window. If you chose Disk Copy Mode (option B), DVD Imager will use the AUDIO_TS folder and additional files and folders found in the same location (folder) as the VIDEO_TS folder.
5. Click "Create Image"..
6. Specify the location where you want the disk image to be placed (if this is the first time you've created a disk image with DVD Imager, or if a checkmark appears in "Prompt for New Location").
7. Enter the name of the DVD using only capital letters and underscores. This is the name that computer users will see when the DVD's volume is mounted by the computer's file system.
8. Wait.

You can now review the Video DVD disk image by using the Finder to mount the .iso image (double click) and DVD Player to play the DVD by specifying the location of the VIDEO_TS folder in the mounted image. You can also burn the image to a blank DVD disk:

Tiger & Panther - Choose "Burn..." from Disk Utility's Images menu, navigate to and select your disk image file.

Jaguar - Choose "Burn Image..." from Disk Copy's File menu, navigate to and select your disk image file.


Details

DVD Imager uses links to create a folder named "lelandtmploc" in /private/tmp for mkisofs to operate on. According to the whether "VIDEO_TS Folder mode" or "Disk copy mode" is selected, DVD Imager then either makes a symbolic link to your dropped VIDEO_TS source folder in the "lelandtmploc" folder, or makes symbolic links for other items from the folder containing your dropped VIDEO_TS folder in the "lelandtmploc" folder then makes a symbolic link to your dropped VIDEO_TS source folder in the "lelandtmploc" folder.
DVD Imager executes the command "mkisofs -f -dvd-video -udf -log-file /tmp/dvdimagerlog -V Volume_Name -o Volume_Name.img /private/tmp/lelandtmploc/", where "Volume_Name" is the name you entered in step 7 above.

Version notes

DVD Imager 1.8 for Mac OS 10.6

Version 1.8 release notes

Compatibility with Snow Leopard (Mac OS X 10.6) added.


DVD Imager 1.6 for Mac OS 10.2 - 10.5

Version 1.6 release notes

Compatibility with Leopard (Mac OS X 10.5) added.

DVD Imager 1.5.9 for Mac OS 10.2 - 10.4

Version 1.5.9 release notes

Imaging engine updated to latest available version.

Version 1.5.7 release notes

French localization restored thanks to Miguel Saro.

Version 1.5.6 release notes

Interface problems fixed for OS X 10.2. French version interface deprecated to eliminate error -1728 when running from an account named "admin".

Version 1.5.5 release notes

The mkisofs executable is now a universal binary version. Due to compatibility issues, it is now version 2.01 (8.2.0). The DVD Imager application is now also a Universal Binary version.

Version 1.5.4 release notes

The mkisofs executable has been upgraded to version 2.01 (powerpc-apple-macosx8.3.0) for better compatibility.

Version 1.5.3 release notes

1. A compatibility issue with Mac OS X 10.4.3 (Tiger) has been addressed.

Version 1.5.2 release notes

1. A compatibility issue with Mac OS X Jaguar (10.2.x) has been fixed.
2. A quit menu item has been added.

Version 1.5.1 release notes

Version 1.5.1 cleans up some cosmetic errors in the app and documentation.

Version 1.5 release notes

The edit menu has been added to make it possible to copy and paste text when specifying a name for your DVD image.
A help menu has been added.
Documentation has been expanded (thanks to Jason Harrison).

Version 1.4 release notes

DVD Imager 1.4 includes a fix for a problem with communication between the engine and the interface that could cause DVD Imager to repeatedly build the disk image, replacing it and starting again, without ever finishing the job.

Version 1.3 features:

Mac OS 10.4 (Tiger) compatibility.

New option for including DVD-ROM contents.
Now DVD Imager can copy the entire contents of a DVD. Select Disk Copy mode and drag your VIDEO_TS folder and DVD Imager will create a DVD from the dropped folder as well as everything in the folder containing the dropped folder. Alternatively, select VIDEO_TS Folder mode and DVD Imager will create a properly formatted DVD video disk image from the dropped VIDEO_TS folder.

If you click "Cancel" during the process or quit at any time, you are now prompted to confirm before DVD Imager quits.

Version 1.2 features:

A progress bar, a cancel option, an overwrite warning, and fixes a problem introduced in version 1.1 that allowed you to click the create button again before your image was finished.

DVD Imager is freeware.

Enjoy!

Č
ċ
ď
DVD_Imager.dmg
(2001k)
Laine Lee,
Jul 1, 2011, 1:23 PM
ċ
ď
DVD_Imager_10.5-10.6.dmg
(1861k)
Laine Lee,
Jul 1, 2011, 12:50 PM
Comments