Batch Convert 1000+ DVD to Digital

Page 2 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.

paecificjr

Honorable
Nov 24, 2013
65
0
10,630
Hello everyone, I wish I had come here before I started this project, but where is the fun in that right? At work we have/had 3 shelves full of DVDs that were just sitting there. Thus I came up with the idea to make them digital. I did some poking around and figured that imgBurn was the right tool to convert them to ISO. Every ISO is correct and the ISO plays fine in VLC player. The problem is that I now have 1 TB of data that needs converted to MP4 or MKV so that other people can use them easier. I have tried everything. I started with Handbrake, but that wouldn't see all of the tracks. I have now tried MakeMKV, which gets 5 of 6 in my test (2 sources 3 tracks each). The one that it doesn't get will only output 27 seconds of the 13 minute long video.

So in summary my questions is, what software should I have used to digitize them? What should I use to convert them to another format? How can I get some batch processing to work, because I am way too lazy to do this one by one?
 
Solution
Ok.. It was my understanding that makemkv could create directories but maybe not. What if you create the directory first with mkdir command? the if else statement just tests weather the directory already exist..
Code:
@echo off
for %%X in (*.iso) do (
    if not exist "C:\Users\Administrator\Documents\TestOutput\%%~nX" (
        echo creating directory "C:\Users\Administrator\Documents\TestOutput\%%~nX"
        mkdir "C:\Users\Administrator\Documents\TestOutput\%%~nX"
    )
    else (
        echo directory "C:\Users\Administrator\Documents\TestOutput\%%~nX" already exists
    )

    "C:\Program Files (x86)\MakeMKV\makemkvcon.exe" mkv iso:"%%X" all "C:\Users\Administrator\Documents\TestOutput\%%~nX"
)
can you ISO (iso) without caps? like:
Code:
makemkvcon.exe info iso:"C:\Users\Administrator\Documents\Input Test\Global Agriculture and Beterinary Medicine DV-5257.iso"
makemkvcon.exe mkv iso:"C:\Users\Administrator\Documents\Input Test\Global Agriculture and Beterinary Medicine DV-5257.iso" all "C:\Users\Administrator\Documents\TestOutput"

I have been replying via mobile and indeed 'ISO:" in caps does nothing, but lowercase works as expected

If it works for you, show a snippet of the iso directory layout and I will write a small for loop for you.
 
Alright, skittle that worked extremely well. It converted a DVD with 7 titles flawlessly! I have just one remaining problem. How would I name them automatically so that I can convert an entire folder without naming the files individually?

As a side note, how would I write the for loop that lets it run the entire folder?
 


They start as Grand Rounds DV-5008A DV-5008B DV-5008C DV-5008D DV-5008E

They end up as title00 title01 title02 title03 title04 title05 title06
 
Here is an simple example loop. I assumed all iso are in the same directory. put this code in a file named something like mkv.bat in the same folder as your ISO's. change the paths according to your needs. if everything looks like it works then remove the 'echo' command in the makemkvcon line which simply prints the command instead of running it. Please review that it works. You can go back later and rename the files with some fancy renaming tool, or regular expressions for example. Or leave them in the created folders as is.

Code:
@echo off
for %%X in (.iso) do (
    echo "c:\program files\makemkv\makemkvcon.exe" mkv "%%X" all "%%~dpnX"
)
 
Okay I feel like we are close. I have very little experience scripting could you be clearer so that I can follow along. I copied what you had written symbol by symbol and the command prompt comes up then closes automatically. Not sure what I did wrong.
 
The for loop simply goes through each iso in alpha numeric order and assigngs it variable X. %%~dpnX is, the full path of the variable X, the current iso.

Open notepad, save this text, name it whatever but change the extension to .bat and but the .bat in same folder as iso.

Open cmd.exe, cd to the directory of iso. Then type the name of bat file. It should echo (print) what command will be run for each iso but not actually run it.

I have installed windows in a virtual machine so I can help write renaming batch file too
 
So I made those changes and got it so it didn't output an error. Now it is outputting,

"c:\program files\makemkv\makemkvcon.exe" mkv ".iso" all "C:\Users\Administrator\Documents\Input Test\"

What would be causing this? From what I understand of the script it is just printing the line in the do loop.
 
Forgot to add wildcard for searching files, the asterisk.

Code:
@echo off

for %%X in (*.iso) do (

    echo "c:\program files\makemkv\makemkvcon.exe" mkv "%%X" all "%%~dpnX"

)

Btw you are correct. The for loop says:

For each file with extension ".iso" do the following operations with the file name as an argument. This can be combined with a second nested, though doesnt have to be nested, for loop to rename the titles makemkv outputs.

The echo command is just for testing purposes. Once you are happy with the output then remove echo.

When I have some time I will write the second loop to rename the files for you
 
Alright, so that didn't convert any of the inputs, however, the output from the echo looks right.

Edit: I removed the echo and I now get "The system cannot find the path specified". It occurs for each of the files in the folder.
 
That was it, I now have this part working. Where does it output the files though? Any way I could specify that location? Also would it be possible to name my videos in a format like {source}-{title} where title is the number it is on the disc?
 
I really like handbrake and to batch convert is simple. Click tools > options to open the preferences. In preferences, click output files and click the browse button next to Default Path. Select a folder where you want the queue to automatically save its output files.
 
Check that the path names are all correct and that you have write permission on this folder. This .bat works on my machine with paths setup to be exactly like yours. Check also if makemkvcon is actually running on the iso, it should output some messages while its running, and if it outputs any errors.
 
That wasn't the problem. As I said above I have some videos with multiple titles inside that need to be converted. Handbrake would only get two thirds of the titles. Those that it did get would only convert for four minutes and fifty six seconds of the video. Some of those videos would be an hour long. I really wanted to use handbrake, but it just wasn't reliable enough.