DVD Backup File Cleanup

I wanted to clean up my file share of dvd backups and move to use one file type. I chose iso because it makes it easy to burn them without using anything special, and boxee recognizes iso files. So in a couple minutes I came up with this quick and dirty ruby script…

1
2
3
4
5
6
7
8
9
10
11
12
13
# Convert all dvdmedia files in the current directory to iso images
# OSX only
# .dvdmedia files are really just folders that hold the VIDEO_TS/AUDIO_TS 
# but adding .dvdmedia make OSX do nice things 
movie_directory = Dir.open( Dir.pwd )
movie_directory.entries.each do |movie|
  if movie.include? '.dvdmedia' then
    movie_name = movie.chomp '.dvdmedia'
    puts movie + " --> " + movie_name
    result = `hdiutil makehybrid -udf -udf-volume-name #{movie_name} -o  #{movie_name} #{movie}`    
    puts result
  end
end

Assumptions… 1) The scripts working directory is the directory you have all your movie files in. 2) You’ve added the .dvdmedia extension to folders containing the ‘VIDEO_TS’ folder.

It wouldn’t be hard to make this a little more user friendly and not dependent on the .dvdmedia file extension, but I already had manually added it on all those folders to make them play nice with OS X.