PDA

View Full Version : A program request


2COOL
8th March 2004, 19:46
What I'm looking for is a program that can read VOBs and convert all its VOB IDs and Cell Ids to a single ID. For now, I'm just asking for VTS_*_*.VOB (movie VOBs) changes and not VTS_*_0.VOBs (menu VOBs).

Example:

OLD VOB ID / Cell ID ---> NEW VOB ID / Cell ID

1 / 1 ---> 1 / 1
1 / 2 ---> 1 / 2
2 / 1 ---> 1 / 3
2 / 2 ---> 1 / 4
3 / 1 ---> 1 / 5
3 / 2 ---> 1 / 6
3 / 3 ---> 1 / 7
4 / 1 ---> 1 / 8
4 / 2 ---> 1 / 9
5 / 1 ---> 1 / 10
6 / 1 ---> 1 / 11

And in turn, make the necessary edits in VTS_*_*.IFO / VTS_C_ADT. If you want to know what I referring to, use IfoEdit and open up any IFO and browse to that table.

Also, changes need to be made in all the PGCs in / VTS_PGCITI / VTGS_PGC_* / Cell Position in VOBs.

I've tried doing it in VB but it was a little slow. I wish I was more into C++ to make it quicker. But alas, all my hard work went up in smoke and I mean that literally. A few weeks ago, my harddrive that I had some non backed up VB projects, including this one, started smoking and is now its non-recoverable.

Can any help me with coming up with a tool like this?

jsoto
10th March 2004, 20:50
I believe I can do it without too much effort, (as you know, I have some reusable code written in VC++), but I cannot understand why are you asking for this tool. Could you explain the reason for this tool?

And, just to define exatly what you are asking for before start any work, please confirm me the following workflow:

1.- Dialog inputs:
1.1.- VTS_XX_0.IFO
1.2.- The new VobId.
1.3.- A destination folder
2.- Process VOBs
2.1.- Read secuentially the VTS_XX_Y.VOB files (Y !=0, nothing to do with menus)
2.1.- Store in memory the different old Cell identifiers (VobID + CellId) and the corresponding new ones
2.2.- Write in destination folder the VOB files with new Vobid and CellId
3.- Adjust IFO
3.1.- Read IFO
3.2.- Do the required changes in all related IFO tables
3.3.- Write IFO and BUP in the desstination folder.

jsoto

jsoto
11th March 2004, 02:38
Check this (http://www.iespana.es/jsoto/tools/VIDChanger.zip)
IFO & BUP files are not modified yet.
jsoto

2COOL
11th March 2004, 18:25
Thanks for replying jsoto! In fact, I honestly had you in mind as my first choice to contact but knowing that you already have a busy workload with other projects, I didn't want to bother you. The main reason why I wanted a tool like this was because of DVD2DVD-R. I wanted to replace my original VOBs with my new encoded VOBs but during the IfoEdit authoring part, my IDs got changed like my example in my first post. I wish that they were already in that order prior to using DVD2DVD-R. Here's my simple breakdown on my procedure on what I'm doing.

1. Create new IFOs for VOBs. (One PGC with each cell as a chapter)
2. Process titleset through DVD2DVD-R
3. Replace original VOBs with new encoded VOBs
4. Do a mock strip of titleset to correct sectors.

In step 3, though I replaced my VOBs, my original IFO still had its unchanged IDs that did not match what was in my new VOBs. I would have to manually changed all those. Hence, that's why I wanted to request for a tool that would change those IDs to match my end results prior.

I just tried out Vidchanger and so far, it works as planned in the VOBs. I hope you can try to complete it. I also feel that I could probably use this tool for other things. Many thanks for helping me out! :D

jsoto
11th March 2004, 18:50
I hope you can try to complete it. Sure. May be not today, I'm a little bit shocked, you know, I work close to Atocha trainstation...

Many thanks for helping me out! You're welcome. It's a pleasure to me.

jsoto

2COOL
11th March 2004, 20:12
Originally posted by jsoto
Sure. May be not today, I'm a little bit shocked, you know, I work close to Atocha trainstation...I read the news.:eek: All I can say is that's F***ED UP!:devil: :devil: My condolences to you if you were close to anyone that passed away in that massacre.

jsoto
11th March 2004, 23:20
Thanks, fortunately this is not the case although many of my colleagues come to work by train.
jsoto

jsoto
14th March 2004, 21:06
Here it is:
exe file (http://www.iespana.es/jsoto/tools/VIDChanger_exe.zip)
source files (http://www.iespana.es/jsoto/tools/VIDChanger_src.zip)

Waiting for any bug report...
jsoto

2COOL
14th March 2004, 21:24
Thanks jsoto! :D:D

I'll check it out and let you know how the testing went. ;)

2COOL
15th March 2004, 00:35
I just so happen to have The Matrix (region 1) on my HD. This would be a good DVD for you to test with if you have it. I'm sure the PAL version is pretty much the same way.

Anyways, Vidchanger didn't do a good job on it. :( It seems your algorithm is wrong on setting the IDs. the problem with this DVD is that the IDs in the VOBs are not necessarily in order. For example, when analyzing VTS_02_1.VOB, my IDs went like this .
orig VidChanger
LBA V/C ID V/C ID

067690 4/1 1/6
068180 5/1 1/7
068672 4/1 1/8
069150 5/1 1/9
.
.
.
074046 5/1 1/20
074211 5/2 1/21
074374 4/2 1/22
074850 5/2 1/23

They should've been changed like this.

orig VidChanger
LBA V/C ID V/C ID

067690 4/1 1/6
068180 5/1 1/8
068672 4/1 1/6
069150 5/1 1/8
.
.
.
074046 5/1 1/8
074211 5/2 1/9
074374 4/2 1/7
074850 5/2 1/9

I believe the problem is that you are doing the changes in real-time. You should try to scan the VOBs first. Now, this is what I did in my VB version. It would scan the IDs in the VOBs and put any unique IDs in a hidden multi-column listbox like example below. I added a LBA column but it shouldn't be necessary though.

LBA OLD VOB-ID OLD CELL-ID NEW VOB-ID CELL ID

###### 1 1 1 1
###### 1 2 1 2
###### 2 1 1 3
###### 3 1 1 4
###### 3 2 1 5

Basically, my program was going back and forth comparing my next scanned ID to the list if it was different than the current ID. If it wasn't on the list, it would be have added. Sorting could be done in realtime or afterwards.

At the end, I would use this list to search and replace the original IDs in my VOBs and IFOs.

Note: IMO, as for new IDs, there should be two options. The one like above using one VOB ID and another using one Cell ID like below

LBA OLD VOB-ID OLD CELL-ID NEW VOB-ID CELL ID

###### 1 1 1 1
###### 1 2 2 1
###### 2 1 3 1
###### 3 1 4 1
###### 3 2 5 1

jsoto
15th March 2004, 02:50
I didn't take into account that a Cell could be splited along the VOB..

OK, I'll fix it, it's easy, but now is too late.

I believe the problem is that you are doing the changes in real-time. You should try to scan the VOBs first. I prefer to do in real time, it saves time. I think I can fix the problem without scaning the VOB first.

Note: IMO, as for new IDs, there should be two options. The one like above using one VOB ID and another using one Cell ID like below Me too. Are you suggesting to change it in the Dialog?. I ask for a "starting cell" to be useful if you want to put someting "before" (like an intro, in this way one of your guides can be used to override it after, je, je )

jsoto

violao
15th March 2004, 14:40
Originally posted by 2COOL
What I'm looking for is a program that can read VOBs and convert all its VOB IDs and Cell Ids to a single ID.

2COOL, I think you can do that with dvdauthor. Try this:

1. Load all VOB files from a single titleset in vstrip and demux by cell ID. You'll get a bunch of files, every one containing a single cell, like:

vts_V01C01.vob
vts_V01C02.vob
vts_V02C01.vob
vts_V02C02.vob
...

2. Rebuild a single titleset with dvdauthor using something like:

<titleset>
<titles>
<pgc>
<vob file="vts_V01C01.vob"/>
<vob file="vts_V01C02.vob"/>
<vob file="vts_V02C01.vob"/>
<vob file="vts_V02C02.vob"/>
...
</pgc>
</titles>
</titleset>

Dvdauthor should build new titleset with single vob id. As for IFO files you'll know better than me :)

2COOL
15th March 2004, 20:02
@violao

Thanks for the suggestion but I really wanted to avoid any demuxing and doing manual edits to the IFO. I know it can be automated and jsoto more than halfway there with his tool. Ideally, it would be great if it could be done during the ripping since the VOBs are being read but I don't think that's going to happen.

@jsoto

Keep in mind that it can be possible for a specific V/C ID to be in multiple VOBs. e.g. _1.VOB and _5.VOB. Also, as a suggestion, can you add a text status of what VOB is being worked on. Something like this? Current VOB: 1 of 5 or Processing VOB: 2 of 3. Just watching the progress bar doesn't tell me as much about the processing status. ;)

jsoto
16th March 2004, 01:21
Try again, version 1.0.0.3 on same link (exe) (http://www.iespana.es/jsoto/tools/VIDChanger_exe.zip) and link (src) (http://www.iespana.es/jsoto/tools/VIDChanger_src.zip)

Waiting for more bug reports...
jsoto

EDIT:
BTW, I found a couple of bugs in custom mode of BlankVob
blank_exe.zip (http://www.iespana.es/jsoto/tools/blank_exe.zip) and blank_src.zip (http://www.iespana.es/jsoto/tools/blank_src.zip)

2COOL
16th March 2004, 04:42
@jsoto

You've been busy as I see you have posted 3 tools out today. Thanks! :D

Just tried VidChanger 1.0.0.3 with my Matrix DVD and after processing the first VOB, VidChanger says its done. :eek: The other 5 VOBs were not processed.

By the way, what were the bugs in BlankVOB you squashed?

jsoto
16th March 2004, 08:22
Grrr....
Sorry, I used the same index (k) for two nested loops, and I didn't test it enough.

About BlankVob, I'm a little bit confused. May be I've lost the definitive 0.0.3 sources, because I cannot understand why you (and me) didnīt see the bugs before. Bugs are (always in custom mode):
- Too many info windows without message
- Wrong number of reported created cells in info window (but VOB is correct)

I'm now at work, this night I'll post the fix.

jsoto

jsoto
16th March 2004, 19:37
Fixed, but still not tested in deep.
Same links.--> version 1.0.0.4
jsoto

EDIT:
Not sure if you know you can start the program with -log option
VIDChanger -log
Dialog mode but Logs the table of Original VID_CID--> Final VID_CID
in destination_folder\VIDChanger_log.txt

RB
25th March 2004, 22:47
Maybe I'm missing something ... but aren't you reinventing the wheel? :) Why don't you use IFOUpdate? Update your original IFOs from the IFOEdit generated ones and you are all set...

jsoto
26th March 2004, 01:43
@RB
May be, but the tool also changes V/C inside the VOBs, so it's not exactly the same.
Anyway, I still didn't find an application for this tool....

jsoto

RB
26th March 2004, 08:26
Originally posted by jsoto
@RB
May be, but the tool also changes V/C inside the VOBs, so it's not exactly the same.
Yeah, but what's that good for? IFOUpdate will transfer the Vob/Cell-ID mappings from the authored IFO (the IFOEdit generated IFOs) to the original IFO, so there's really no need to change anything in the VOBs.

2COOL
26th March 2004, 08:31
I explained my reasoning in my second post.

jsoto
26th March 2004, 09:25
I believe this is a different approach to the same question: How to replace a VOB set with a new authored one.

IIRC, IFOUpdate have some limitations when the number of PGCs of original/destination VOBs do not match. But I'm not using IFOUpdate since some time, so may be I am wrong.

Even more, I have other "reinvented wheel" :) :
-VobBlanker (http://forum.doom9.org/showthread.php?s=&threadid=73145). This tool is also able to replace titles. This is the 3rd approach, and also different. Summarizing:

IFOUpdate: Do not touch V/C in VOBs. Only changes IFOs
VobBlanker: Do not touch V/C in IFOs. Only changes VOBs
VIDChanger: Changes VOBs and IFOs

So, you can choose what you want...

jsoto

RB
26th March 2004, 12:07
I see... IFOEdit can't author multi-PGC. But that's what IFOUpdate's "Adjusted Cell Mode" is for. Basically, it allows you to reauthor a multi-PGC VTS into a single large PGC and then corrects original IFOs accordingly, it of course keeps the PGCs intact in the original IFO.

Don't get me wrong, just trying to point at existing solutions :)

jsoto
26th March 2004, 19:10
But that's what IFOUpdate's "Adjusted Cell Mode" is for I never tried this!! (didn't know). I'll check it.

Don't get me wrong, just trying to point at existing solutions :) Yeah, you can be a little bit irritating (this is the second thread you jump into just to point out other solution to my tools, remember BlankVob), but don't worry, I understood your intentions and they are good, so no ofense at all. :)

Edit: In any case, it's also good to have different alternatives..

jsoto

P3gasus
28th March 2004, 14:41
Originally posted by RB
I see... IFOEdit can't author multi-PGC. But that's what IFOUpdate's "Adjusted Cell Mode" is for. Basically, it allows you to reauthor a multi-PGC VTS into a single large PGC and then corrects original IFOs accordingly, it of course keeps the PGCs intact in the original IFO.


How does ifoupdate adjusted cell mode handle duplicate vobid in different pgc?

jsoto
29th March 2004, 01:37
AFAIK, IFOUpdate works with only one VTS, and V/C id duplications are not allowed in the same VTS (even in different PGCs).
jsoto

P3gasus
29th March 2004, 09:28
Originally posted by jsoto
AFAIK, IFOUpdate works with only one VTS, and V/C id duplications are not allowed in the same VTS (even in different PGCs).
jsoto

They are not allowed in vob files. But ifo files actually can repeat the same vobid in different pgc to refer the same cell of the movie. Some known examples Pirates of the carribean (main movie ifo) and TLOTR TFOTR/TTT (main movie ifo too)
Bye

jsoto
29th March 2004, 11:26
Ah, now I understand your question (the same cells used in more than one PGC)..., but sorry, I do not know the answer.
jsoto

RB
29th March 2004, 19:20
Originally posted by P3gasus
How does ifoupdate adjusted cell mode handle duplicate vobid in different pgc?
That's actually what Adjusted Cell Mode is most useful for. Look here, for example: http://forum.doom9.org/showthread.php?s=&threadid=56935

owwing
16th July 2004, 02:20
Is jsoto still actively udating the VIDChanger app?

I would like to get the source to 1.0.0.4 if not, but the links in this thread are non-functional.

Thanks!

jsoto
16th July 2004, 16:21
No, I'm not working on VIDChanger. Honestly, I do not find it useful.
About the links, try
http://www.posunplugged.com/jsoto/
or
http://www.iespana.es/jsoto

jsoto

owwing
16th July 2004, 18:28
It will be better than VOBEdit for changing VOB IDs before joining clips into a single titleset (e.g., to combine a movie that originally comes in two halves instead of having two or more titlesets) as you don't have to have one large VOB file and there are no strange naming conventions required. It could also be useful for the odd DVDs that have PGCs with VOB IDs that are not always in ascending order (which IFO Edit and possibly even DVD Shrink will reorder and thus put out of sequence).

jsoto
26th July 2004, 11:52
@owwing
Try VIDChanger 1.1.0.0
Single Cell VID/CID change is included.
BTW, I've used the info stored in the IFO in order to access directly to the cell and save VOB processing time. So, IFO is always required.
jsoto

owwing
26th July 2004, 18:36
Outstanding! Thank you very much...

owwing
30th July 2004, 19:26
@ jsoto

Hi, I just ran across the need to try to merge multiple cells into a single cell, and was hoping that the cell mode might allow me to do that. But, being the thorough programmer that you are, you check for that condition and prevent it. The question is, assuming that I were to throw away the existing IFO and use IFOEdit to create new IFOs, would simply changing the VOB ID or Cell ID to match and existing cell effectively result in a single, merged cell?

The reason why I need to merge cells is that I had used a Pioneer DVD recorder to record some things, and then made a bunch of clips (75) to create a compilation. Unfortunately, the Pioneer likes to make a new cell every 50 seconds or so, and the compilation ends up with over 200 cells. I can create all the VOBs without any problem, but IFOEdits "create new IFOs" function seems to stop after it has reached the 50th cell (even though 255 cells is allowable per PGC). So if I could merge cells together, I can get around this issue.

So, if your answer is "yes" to the question above, do you think you could have an option to override the check for same VOB/Cell ID combination in VID Changer? Or better yet, could you implement a merge cells function?

Thanks for any info on this!

jsoto
30th July 2004, 19:41
The answer is no. Well, probably it can be done, but pointers inside the VOB should be re-adjusted, and also presentation times, thought. (Not really sure about the implications)

An easy way could be:
- Demultiplex the VOB in elementary streams (you can use VOBEdit, although it is not safe for subpictures, but seems its is not your case)
- Extract the CellTimes from your PGC with IFOEdit.
- Using the extracted Celltimes for chapters, and deleting the ones you want, author a "new" DVD with less number of cells. You can use IFOEdit authoring mode.

No recoding in the process, so the quality will be the same than the original.

jsoto

owwing
30th July 2004, 20:16
Thanks, I was hoping to avoid demuxing. So even if I did a mock strip with IFOEdit, that wouldn't be enough to fix the pointers in the vob? I guess I was hoping that IFOEdit, as it processed a VOB file would be calculating all of the information about the cells so as to come up with the correct duration, etc. Oh well.

Thanks anyway.

jsoto
30th July 2004, 21:25
So even if I did a mock strip with IFOEdit, that wouldn't be enough to fix the pointers in the vob?May be...I really do not know. Try yourself
www.posunplugged.com/jsoto/tools/VIDChanger1101_exe.zip
jsoto