Log in

View Full Version : How to batch covert vob's to ifo's?


bozrdang
29th December 2006, 08:38
I have a bunch of movies that I originally ripped to my hard drive in IFO mode. I would like to convert them over to iso's (or any single file) as that would make it much easier to navigate them with XBMC (HTPC software for Xbox). Right now my file structure would be:

Twister/VIDEO_TS/VIDEO_TS.ifo

I'd rather it just be:

Twister.iso

I don't want any compression on the videos, I just want to convert them to a single file. The problem is that i have a hundreds of videos that I want to convert. Is there any program where I can queue up a bunch of directories and have it convert each one into an iso file? Preferably using the name of the parent directory as the file name. Can anyone give me some suggestions on how to deal with this problem?

setarip_old
29th December 2006, 15:22
I believe "IMGBurn" can do what you're looking for...

wmansir
29th December 2006, 19:49
You could use the CLI tool mkisofs with a simple batch file. mkisofs is a GNU program, it also comes as a separate executable with the ImageTool programs. The command would look something like this.

mkisofs.exe -dvd-video -V "VOLUME_LABEL" -o c:\output.iso c:\dvd_source

bozrdang
29th December 2006, 21:29
Alright, I got mkisofs, but I'm confused on how to get the correct batch file. The files I'm working on are as follows:

T:\TV Shows\Cheers\Cheers - s01e01 - Episode 1\VIDEO_TS\files
T:\TV Shows\Cheers\Cheers - s01e02 - Episode 2\VIDEO_TS\files
T:\TV Shows\Cheers\Cheers - s01e03 - Episode 3\VIDEO_TS\files

I'm not sure what the -V "VOLUME_LABEL" does since I'm not burning to DVD. I tried using your example substituting my paths where I thought they should be, but I probabaly did it wrong since it didn't work. Would you be so kind as to give me an example with the paths listed above?

wmansir
30th December 2006, 17:15
The spaces are probably throwing it off. Also, you want to point to the folder containing the VIDEO_TS folder.

Volume label isn't that important if your just going to deal with the .iso files. It may be optional, but I'm not sure.

Try:

mkisofs.exe -dvd-video -V "VOLUME_LABEL" -o "T:\TV Shows\Cheers\Cheers - s01e01 - Episode 1.iso" "T:\TV Shows\Cheers\Cheers - s01e01 - Episode 1\"

I would try it out myself, but I just upgraded my computer and reinstalled the OS so I don't have anything setup yet.

bozrdang
1st January 2007, 00:45
I can't get this to work to save my life. I took a couple of the videos and renamed them without the spaces with no luck. T: is a mapped network drive and Ithought that might be the problem, so I copied a couple over to a local drive and still no luck. I also tried pointing to the VIDEO_TS folder since the files are actually in there, but no luck either.

It does create the iso file, but it is 0 bytes in size and I get an error that says unable to open file. It would seem that the command is working right up until it tries to read the video files.

Any other suggestions?

setarip_old
1st January 2007, 02:21
Any other suggestions?Is there a reason you haven't tried using "IMGBurn", as I previously suggested?

It has queue capability...

bozrdang
1st January 2007, 05:33
I tried IMGburn, but it required me to name the "destination" file so I didn't see where that would do batch conversions. If I have to type in a name for each file, I might as well use DVD Shrink.

setarip_old
1st January 2007, 08:27
If I have to type in a name for each file, I might as well use DVD Shrink.DVD Shrink by itself has no queuing ability. If you're intent on using DVD Shrink, you should look into a small tool named "MultiShrink", which MAY be able to handle your needs.

Also, I don't see how using "mkisofs" (which you appear to find an acceptable concept) involves any less manual typing than the queuing process of "IMGBurn" (actually, from what you and "wmansir" have posted, "mkisofs" appears to entail MORE typing)...

Adub
2nd January 2007, 20:10
There is also ImgTool, but unfortunately there is no batch mode that I know of. Imgburn may work fine.

bozrdang
2nd January 2007, 21:41
DVD Shrink by itself has no queuing ability. If you're intent on using DVD Shrink, you should look into a small tool named "MultiShrink", which MAY be able to handle your needs.

Also, I don't see how using "mkisofs" (which you appear to find an acceptable concept) involves any less manual typing than the queuing process of "IMGBurn" (actually, from what you and "wmansir" have posted, "mkisofs" appears to entail MORE typing)...

First of all, I hope my comment quoted above didn't come off sounding snippy. That was not my intention. What I meant was that most solutions are like DVD Shrink in that you do one file at a time without any automation. In playing around with IMGburn, I could queue up multiple files, but it kept asking for a destination. I tried just point to a directory, but it wants to do a "save as" which means I have to name the output file (which also made me wonder if all the files would be merged into a single output file). If that's really the case and I didn't overlook something then it doesn't seem to offer any more automation than DVD Shrink or other typical solutions. If someone can show me how to automate the output file name, I'm all ears!

As for mkisofs, This is the seciond time someone has suggested it for my purposes. That's what lead me to dig deeper into it. I realize that the command wmansir gave me as an example is also one file at a time with no automation, but I figured that if I could use that as a starting point, then maybe I could either figure out how to automate it the way that I want or at least have some working knowledge of it to get further help with it.

I did stumble across Multi Shrink and it is indeed what I'm currently using although I am still looking for something better. My gripe with it is that I have to open up an instance of DVD Shrink for each file I want to do which obviously eats up some memory. So far I've only been able to do about 40 at a time. I slao don't like that it doesn;t name my files correctly when I'm done either and I have to manually correct every file. But hey, it's better than one file at a time!

I'm really looking for something that will allow me to queue up as many files as I want and name them correctly based of the parent folder's name. I just figured there has to be something out there that does what I want, but maybe I'm wrong. Either way, I appreciate all the help.

Chetwood
3rd January 2007, 08:24
I slao don't like that it doesn;t name my files correctly when I'm done either and I have to manually correct every file.

Really? So what's that difficult about setting the proper volume name and target name in Shrink?

jdobbs
3rd January 2007, 14:34
I've always used pretty much the exact same command line as wmansir listed. Never had an issue. You have to make sure you've created the source directory correctly. Heres an example:

You have to create a source structured like this:

C:\MY_DISC
C:\MY_DISC\AUDIO_TS
C:\MY_DISC\VIDEO_TS
C:\MY_DISC\VIDEO_TS\VIDEO_TS.BUP
C:\MY_DISC\VIDEO_TS\VIDEO_TS.IFO
C:\MY_DISC\VIDEO_TS\VIDEO_TS.VOB
C:\MY_DISC\VIDEO_TS\VTS_01_0.BUP
C:\MY_DISC\VIDEO_TS\VTS_01_0.BUP
C:\MY_DISC\VIDEO_TS\VTS_01_0.VOB
C:\MY_DISC\VIDEO_TS\VTS_01_1.VOB
etc.

The command line would be (assuming paths):

"C:\Program Files\mkisofs\mkisofs.exe" -dvd-video -V "MY_DISC" -o "C:\OUTPUT\MY_DISC.ISO" "C:\MY_DISC"

That's the command line that would also be used in DVD Rebuilder when it makes its call to MKISOFS.

bozrdang
3rd January 2007, 14:45
Really? So what's that difficult about setting the proper volume name and target name in Shrink?

I'm not sure what you're getting at here. Difficult is a relative term, but it sure isn't fun to have to rename hundreds of files that already have correct names residing in the parent folder.

For example, if I use DVD Shrink and Multi Shrink to convert videos to iso, it will take a folder named "It's a Wonderful Life" and turn it into IT_S_A_WONDERFU.ISO. I assume this is to maintain some sort of ISO standard, but I am not going to burn these to CD or DVD so I don't need it to maintain ISO standards. I'd much rather have the resulting output file be correctly (and fully) named.

bozrdang
3rd January 2007, 14:57
I've always used pretty much the exact same command line as wmansir listed. Never had an issue. You have to make sure you've created the source directory correctly. Heres an example:

You have to create a source structured like this:

C:\MY_DISC
C:\MY_DISC\AUDIO_TS
C:\MY_DISC\VIDEO_TS
C:\MY_DISC\VIDEO_TS\VIDEO_TS.BUP
C:\MY_DISC\VIDEO_TS\VIDEO_TS.IFO
C:\MY_DISC\VIDEO_TS\VIDEO_TS.VOB
C:\MY_DISC\VIDEO_TS\VTS_01_0.BUP
C:\MY_DISC\VIDEO_TS\VTS_01_0.BUP
C:\MY_DISC\VIDEO_TS\VTS_01_0.VOB
C:\MY_DISC\VIDEO_TS\VTS_01_1.VOB
etc.

The command line would be (assuming paths):

"C:\Program Files\mkisofs\mkisofs.exe" -dvd-video -V "MY_DISC" -o "C:\OUTPUT\MY_DISC.ISO" "C:\MY_DISC"

That's the command line that would also be used in DVD Rebuilder when it makes its call to MKISOFS.

That is exactly the file structure all my videos use. I'll try again later when I get home and see if I can make that command work. What I want to know though is let's say I have this:

C:\Cheers - s01e01
C:\Cheers - s01e01\AUDIO_TS
C:\Cheers - s01e01\VIDEO_TS
C:\Cheers - s01e01\VIDEO_TS\VIDEO_TS.BUP
C:\Cheers - s01e01\VIDEO_TS\VIDEO_TS.IFO
C:\Cheers - s01e01\VIDEO_TS\VIDEO_TS.VOB
C:\Cheers - s01e01\VIDEO_TS\VTS_01_0.BUP
C:\Cheers - s01e01\VIDEO_TS\VTS_01_0.BUP
C:\Cheers - s01e01\VIDEO_TS\VTS_01_0.VOB
C:\Cheers - s01e01\VIDEO_TS\VTS_01_1.VOB

C:\Cheers - s01e02
C:\Cheers - s01e02\AUDIO_TS
C:\Cheers - s01e02\VIDEO_TS
C:\Cheers - s01e02\VIDEO_TS\VIDEO_TS.BUP
C:\Cheers - s01e02\VIDEO_TS\VIDEO_TS.IFO
C:\Cheers - s01e02\VIDEO_TS\VIDEO_TS.VOB
C:\Cheers - s01e02\VIDEO_TS\VTS_01_0.BUP
C:\Cheers - s01e02\VIDEO_TS\VTS_01_0.BUP
C:\Cheers - s01e02\VIDEO_TS\VTS_01_0.VOB
C:\Cheers - s01e02\VIDEO_TS\VTS_01_1.VOB


How do I tell mkisofs to go through all the video folders in C: and convert each VIDEO_TS folder's contents into an ISO file and then name the file the same as the parent folder's name so that the above example would result in:

C:\Cheers - s01e01.ISO
C:\Cheers - s01e02.ISO

And to have mkisofs do that unattended. That's what I'm trying to accomplish. Is there a way to do that?

bozrdang
3rd January 2007, 15:32
I just so happened to have a DVD video file ripped to my hdd here at work and I did manage to get mkisofs to work with that command. Like a moron I kept using all the apostrophes in your guys' examples. I got rid of them all except for the ones around volume name and it worked.

Now, if only there's some way to automate this for multiple files, I'll be golden.

Chetwood
4th January 2007, 07:58
I'm not sure what you're getting at here.

Since DVD Shrink does not offer any batch functionality MultiShrink has to work the way it does, i.e. there's no way around opening each DVD manually and adusting settings. Cutting and pasting your desired target name wouldn't have been too much of extra work.

Now that you know how to use mkisofs you could easily write a small script with AutoIt (http://www.autoitscript.com) that would generate those isos for you.

Geekman
9th January 2007, 20:51
Sounds like you're very close to a solution w/ the CLI form of mkisofs.
Assuming Windows XP here, try "Help & Support" on batch files. For example, you can create a batch file that repeatedly calls mkisofs with variables for the parameters.

Look up the "FOR" batch command in the Winders help facility.
Here's a snippet of it:
For
Runs a specified command for each file in a set of files.

Syntax
for {%Variable | %%Variable} in (Set) do Command [CommandLineOptions]

Reading further in the help text:
Specifying a group of files
The Set parameter can represent a single group of files or several groups of files. You can use wildcards (that is, * and ?) to specify a file set. The following are valid file sets:

(*.doc)

(*.doc *.txt *.me)

(jan*.doc jan*.rpt feb*.doc feb*.rpt)

(ar??1991.* ap??1991.*)

When you use the for command, the first value in Set replaces %Variable or %%Variable, and then the specified command processes this value. This continues until all of the files (or groups of files) that correspond to the Set value are processed.

This may be what you need and you'll learn something while creating the batch.

Hope this helps.

EDIT: Or check this link. Don't know anything about this tool other than it's a GUI for mkisofs:
http://www.afterdawn.com/software/video_software/dvd_tools/folder2iso.cfm

setarip_old
24th January 2007, 13:16
@bozrdang

Have you gotten any further along in your quest?

bozrdang
25th January 2007, 04:49
@bozrdang

Have you gotten any further along in your quest?


Unfortunately, no. First of all I couldn't get mkisofs to stop truncating the long names and even if it could, I've read some stuff about creating batch files (including Geekman's reference) and I just can't figure out how to create one to do what I want.

At one point, I though I found exactly what I was looking for in Xilisoft's DVD Ripper Platinum 4, but alas it wouldn't convert to iso. It did everything else... batch processing and even named the ouput files according to their respective parent folder's name. It would convert to almost every known video format including making it one large VOB file which would work fine for the purpose of my HTPC, but then I'd no longer be able to just burn to a DVD and have it be playable in a standard DVD player. If only it converted to iso, I'd be golden.

Anyways, I'm currently in a holding pattern hoping some miracle will come soon. :rolleyes:

Chetwood
25th January 2007, 08:01
I guess you'd need no miracle if you'd simply try out the advice given here. I bet there are lots of guys over at the Autoit forums that would write 10 lines of code needed to automate using mkisofs and renaming/moving of the resulting iso.

wmansir
25th January 2007, 10:18
Here's what you can do:

1. install cygwin. It's a linux like shell for windows.

2. Copy mkisofs.exe and cygwin1.dll to the parent folder all of your movies are in.

3. In the same folder create a new text file "makeiso.sh", put the following text into it:
#!/bin/sh
find . -iwholename "*/VIDEO_TS/VIDEO_TS.IFO" | gawk -F= '{IGNORECASE=1
sub ("/VIDEO_TS/VIDEO_TS.IFO", "", $1)
printf "mkisofs.exe -dvd-video "
printf "-o \"%s.iso\" -V \"%s\" \"%s\"\n", $1, substr($1, match($1,"/[^/]*$")+1), $1}'

4. Run cygwin. You'll get a linux command prompt.

cd to /cygdrive
cd to the drive letter your movies are on and then to the folder you put the other files in
run "./makeiso.sh>makeiso.bat" (without the quotes) to create the bat file

5. Open makeiso.bat in a text editor to make sure everything is kosher. Notepad may not show the line breaks, try Wordpad instead.

6. Run the bat file. I suggest the doing it from a cmd prompt, you can hit ctr-C to terminate the process that way.

Unless you have enough free space to hold your entire movie collection as .iso files you might want to make a temp.bat file to copy the cmds to and run them in smaller batches.


How does it work: I looks for the file VIDEO_TS.IFO inside a folder VIDEO_TS (case does not matter). It then creates a cmd for mkisofs to create a file using the parent folder's name. For example:

C:\my files\mymovies\Action Jackson\VIDEO_TS\video_ts.ifo

creates the file "Action Jackson.iso" in C:my files\mymovies\ with the volume name "Action Jackson". And you would want to put mkisofs.exe/makeiso.sh in the mymovies folder.

bozrdang
26th January 2007, 02:36
wmansir - :thanks: Thank you sooooo much!!! That does exactly what I was looking for! I initially had a minor problem trying to run the batch file. It kept giving me an error saying "Volume ID string too long". I finally figured out that I needed to remove the -V \"%s\" from the last line and then it worked perfectly. This is a godsend and I am truly greatful. Thank you so much again!

Chetwood - Once again, I don't know what you are going on about. I tried or researched every single method advised in this thread. How you can insinuate that I didn't is beyond me. I never said they wouldn't work. I simply said they either didn't do what I was looking for or were too time consuming, or I simply didn't have the knowledge required to get them to do what I wanted (as demonstrated here with mkisofs).

setarip_old - I guess I also owe you some thanks too. If it wasn't for you last post asking me how it ended up, this thread would've died and I may never have found a way to do this. Instead it got bumped back up and I got my answer. Thanks again.

setarip_old
26th January 2007, 03:55
Glad to hear that, thanks to "wmansir", you're now a happy camper ;>}

Chetwood
26th January 2007, 09:52
Chetwood - Once again, I don't know what you are going on about. I tried or researched every single method advised in this thread.

Well, IMO "researching every single method" would have included asking the guys over at the AutoIt forums for some help on a batch file which by my past experience would have been given immediately.

I'm happy for you the miracle you waited for showed up after only ten days of wait in the form of helpful and capable wmansir (no irony here) who used the same batch approach only with cygwin.

wmansir
26th January 2007, 14:15
For the volume length limit there is another easy fix, just change:

substr($1, match($1,"/[^/]*$")+1)

to

substr($1, match($1,"/[^/]*$")+1, 32)

The function already has a length limit, I just didn't use it because I wasn't sure what the volume label character limit was (32 is just a guess).

Also, I wanted to do this as an exercise with the new MS Powershell, but I found they don't have a release for the final version of Vista. They released final versions for XP/2k/2k3 and a beta build for Vista/Longhorn Server betas that won't install on Vista final. Kind of ironic considering it was originally planned to be part of Vista.

bozrdang
2nd February 2007, 03:46
This batch file with mkisofs is absolutely great. I am almost done and it has been a total breeze. I didn't try your last fix wmansir as I didn't need it since I generally won't be burning the files. Nonetheless, it's good for reference sake. I truly hope somebody else finds this thread useful in the future.


Chetwood - Why do you continue to chastise me? I suppose I could've asked for help on any of a hundred foums, but I chose here. So what!? Somebody mentions a piece of software and all of the sudden I should've got my answer from their board? I got my answer here and all's well. Let it go!

Thanks again wmansir!!

Chetwood
2nd February 2007, 08:36
You're not really arguing with me about how you couldn't take a hint, do you?

I mean if you obviously can't connect that software mentioned by "someone" with the word "batch" then you just gotta let yourself get asked what the heck your problem is.

Like I said before: consider yourself lucky that wmansir stepped in doing all the work for you.

EOD.

bozrdang
5th February 2007, 03:48
Like I said earlier Chetwood... Let it go. Move on. It's over. You're starting to look foolish over this IMO.