Log in

View Full Version : transforming cells to segments


windtrader
1st November 2006, 19:20
How does RB process cells into segments?

Searched around quite a bit and could not find an explanation how RB processes the cells and creates segments while encoding. It seems to take each cell in order and creates more segments than cells. Using the preview/edit after the prepare stage to view the segments, it was not clear how RB is making the cut points.

Using rb 1.11.0 pro and procoder 2, no filters, movie only mode.

thx

ilovejedd
1st November 2006, 20:56
Maybe it creates them at I-frames/scene changes? That seems to be the most plausible.

Susana
1st November 2006, 21:20
A VOB in each VTS consists of small parts called VOB IDs and this parts similarly consist of small parts called CELL IDs. VOB IDs define a new independent track; CELL IDs are used to create chapter points.

DVDRebuilder creates a new segment for each new VOBID/CELLID. If you use PGCDemux you can see how many vobid/cellid's a VTS has and this number agrees with DVDRB's segments.

Working with vob/cell IDs is easier than demux all video track for remuxing purpose.

windtrader
1st November 2006, 23:43
@ilovejedd - There are many more I-frames in the movie than generated segments, so it is based on something else.

@Susana - the relationship between cells and rb segments is something else. Here are the statistics from the most recent backup.

RB generates 97 segments on the following title which has 19 chapters and 47 cells.

VTS overview:

Menu attributes:
Video: MPEG-2 720x480 (NTSC) (NTSC 525/60)

Title Set (Movie) attributes:
Video: MPEG-2 720x480 (NTSC) (NTSC 525/60)
Audio 1: English (Dolby A
SubPicture 1: English (2-bit r

PGC_1 (program chain): [Title(TTN): 1] [02:05
[Ch 01] [Pg 01] [Cell 01] [V/C Id: 1/ 1]
[Cell 02] [V/C Id: 1/ 2]
[Cell 03] [V/C Id: 1/ 3]
[Ch 02] [Pg 02] [Cell 04] [V/C Id: 1/ 4]
[Cell 05] [V/C Id: 1/ 5]
[Cell 06] [V/C Id: 1/ 6]
[Cell 07] [V/C Id: 1/ 7]
[Cell 08] [V/C Id: 1/ 8]
[Ch 03] [Pg 03] [Cell 09] [V/C Id: 1/ 9]
[Cell 10] [V/C Id: 1/10]
[Ch 04] [Pg 04] [Cell 11] [V/C Id: 1/11]
[Ch 05] [Pg 05] [Cell 12] [V/C Id: 1/12]
[Cell 13] [V/C Id: 1/13]
[Ch 06] [Pg 06] [Cell 14] [V/C Id: 1/14]
[Cell 15] [V/C Id: 1/15]
[Ch 07] [Pg 07] [Cell 16] [V/C Id: 1/16]
[Cell 17] [V/C Id: 1/17]
[Cell 18] [V/C Id: 1/18]
[Cell 19] [V/C Id: 1/19]
[Ch 08] [Pg 08] [Cell 20] [V/C Id: 1/20]
[Ch 09] [Pg 09] [Cell 21] [V/C Id: 1/21]
[Cell 22] [V/C Id: 1/22]
[Ch 10] [Pg 10] [Cell 23] [V/C Id: 1/23]
[Ch 11] [Pg 11] [Cell 24] [V/C Id: 1/24]
[Cell 25] [V/C Id: 1/25]
[Cell 26] [V/C Id: 2/ 1]
[Cell 27] [V/C Id: 2/ 2]
[Ch 12] [Pg 12] [Cell 28] [V/C Id: 2/ 3]
[Cell 29] [V/C Id: 2/ 4]
[Cell 30] [V/C Id: 2/ 5]
[Ch 13] [Pg 13] [Cell 31] [V/C Id: 2/ 6]
[Ch 14] [Pg 14] [Cell 32] [V/C Id: 2/ 7]
[Cell 33] [V/C Id: 2/ 8]
[Ch 15] [Pg 15] [Cell 34] [V/C Id: 2/ 9]
[Cell 35] [V/C Id: 2/10]
[Ch 16] [Pg 16] [Cell 36] [V/C Id: 2/11]
[Cell 37] [V/C Id: 2/12]
[Cell 38] [V/C Id: 2/13]
[Ch 17] [Pg 17] [Cell 39] [V/C Id: 2/14]
[Cell 40] [V/C Id: 2/15]
[Cell 41] [V/C Id: 2/16]
[Ch 18] [Pg 18] [Cell 42] [V/C Id: 2/17]
[Cell 43] [V/C Id: 2/18]
[Ch 19] [Pg 19] [Cell 44] [V/C Id: 2/19]
[Cell 45] [V/C Id: 2/20]
[Cell 46] [V/C Id: 2/21]
[Cell 47] [V/C Id: 2/22]

Susana
2nd November 2006, 00:28
No, this is that way.

Aren't there more PGC's and Titles in that VTS ?

have you enable menu encoding ? In this case you have to take into account _0.vob. (VTSM)

Trahald
2nd November 2006, 01:59
susana is correct. cells are the cutting point.

jdobbs
2nd November 2006, 02:12
For the vast majority of cases a cell and a segment are the same thing. There are some special circumstances, however, in which a cell might be split into more than one segment -- but it is very rare. Usually it's because of a need to reference something at a sub-cell level.

windtrader
2nd November 2006, 03:15
Hi. Yes, I agree chapter points are placed at cell boundaries but there are not chapters at every cell as indicated by in the post with the IFOEDIT display.

Here is the RB log entry showing the VOB cell to RB segment mapping. I should have included this earlier to make it clear what is going on.

@jdobbs - Why am I always the "unlucky" one who seem to notice these "rare" situations? :-)

I'll dig around in the IFOs to see if I can detect any sub-cell flags being set or commands.


[12:55:31] Phase III, REBUILD started.
- Processing VTS_01
- Reading/processing TMAP table...
- Rebuilding seg 0 VOBID 1 CELLID 1
- Rebuilding seg 1 VOBID 1 CELLID 1
- Rebuilding seg 2 VOBID 1 CELLID 2
- Rebuilding seg 3 VOBID 1 CELLID 3
- Rebuilding seg 4 VOBID 1 CELLID 3
- Rebuilding seg 5 VOBID 1 CELLID 3
- Rebuilding seg 6 VOBID 1 CELLID 4
- Rebuilding seg 7 VOBID 1 CELLID 5
- Rebuilding seg 8 VOBID 1 CELLID 6
- Rebuilding seg 9 VOBID 1 CELLID 7
- Rebuilding seg 10 VOBID 1 CELLID 8
- Rebuilding seg 11 VOBID 1 CELLID 9
- Rebuilding seg 12 VOBID 1 CELLID 9
- Rebuilding seg 13 VOBID 1 CELLID 9
- Rebuilding seg 14 VOBID 1 CELLID 10
- Rebuilding seg 15 VOBID 1 CELLID 10
- Rebuilding seg 16 VOBID 1 CELLID 10
- Rebuilding seg 17 VOBID 1 CELLID 10
- Rebuilding seg 18 VOBID 1 CELLID 10
- Rebuilding seg 19 VOBID 1 CELLID 10
- Rebuilding seg 20 VOBID 1 CELLID 10
- Rebuilding seg 21 VOBID 1 CELLID 10
- Rebuilding seg 22 VOBID 1 CELLID 10
- Rebuilding seg 23 VOBID 1 CELLID 11
- Rebuilding seg 24 VOBID 1 CELLID 11
- Rebuilding seg 25 VOBID 1 CELLID 11
- Rebuilding seg 26 VOBID 1 CELLID 11
- Rebuilding seg 27 VOBID 1 CELLID 11
- Rebuilding seg 28 VOBID 1 CELLID 11
- Rebuilding seg 29 VOBID 1 CELLID 11
- Rebuilding seg 30 VOBID 1 CELLID 11
- Rebuilding seg 31 VOBID 1 CELLID 11
- Rebuilding seg 32 VOBID 1 CELLID 11
- Rebuilding seg 33 VOBID 1 CELLID 11
- Rebuilding seg 34 VOBID 1 CELLID 11
- Rebuilding seg 35 VOBID 1 CELLID 11
- Rebuilding seg 36 VOBID 1 CELLID 12
- Rebuilding seg 37 VOBID 1 CELLID 13
- Rebuilding seg 38 VOBID 1 CELLID 14
- Rebuilding seg 39 VOBID 1 CELLID 15
- Rebuilding seg 40 VOBID 1 CELLID 16
- Rebuilding seg 41 VOBID 1 CELLID 17
- Rebuilding seg 42 VOBID 1 CELLID 18
- Rebuilding seg 43 VOBID 1 CELLID 19
- Rebuilding seg 44 VOBID 1 CELLID 20
- Rebuilding seg 45 VOBID 1 CELLID 20
- Rebuilding seg 46 VOBID 1 CELLID 21
- Rebuilding seg 47 VOBID 1 CELLID 22
- Rebuilding seg 48 VOBID 1 CELLID 22
- Rebuilding seg 49 VOBID 1 CELLID 23
- Rebuilding seg 50 VOBID 1 CELLID 23
- Rebuilding seg 51 VOBID 1 CELLID 23
- Rebuilding seg 52 VOBID 1 CELLID 24
- Rebuilding seg 53 VOBID 1 CELLID 25
- Updating NAVPACKS for VOBID_01
- Rebuilding seg 54 VOBID 2 CELLID 1
- Rebuilding seg 55 VOBID 2 CELLID 2
- Rebuilding seg 56 VOBID 2 CELLID 3
- Rebuilding seg 57 VOBID 2 CELLID 3
- Rebuilding seg 58 VOBID 2 CELLID 3
- Rebuilding seg 59 VOBID 2 CELLID 3
- Rebuilding seg 60 VOBID 2 CELLID 4
- Rebuilding seg 61 VOBID 2 CELLID 4
- Rebuilding seg 62 VOBID 2 CELLID 5
- Rebuilding seg 63 VOBID 2 CELLID 5
- Rebuilding seg 64 VOBID 2 CELLID 6
- Rebuilding seg 65 VOBID 2 CELLID 7
- Rebuilding seg 66 VOBID 2 CELLID 7
- Rebuilding seg 67 VOBID 2 CELLID 8
- Rebuilding seg 68 VOBID 2 CELLID 8
- Rebuilding seg 69 VOBID 2 CELLID 8
- Rebuilding seg 70 VOBID 2 CELLID 9
- Rebuilding seg 71 VOBID 2 CELLID 9
- Rebuilding seg 72 VOBID 2 CELLID 9
- Rebuilding seg 73 VOBID 2 CELLID 9
- Rebuilding seg 74 VOBID 2 CELLID 9
- Rebuilding seg 75 VOBID 2 CELLID 10
- Rebuilding seg 76 VOBID 2 CELLID 11
- Rebuilding seg 77 VOBID 2 CELLID 11
- Rebuilding seg 78 VOBID 2 CELLID 12
- Rebuilding seg 79 VOBID 2 CELLID 13
- Rebuilding seg 80 VOBID 2 CELLID 14
- Rebuilding seg 81 VOBID 2 CELLID 14
- Rebuilding seg 82 VOBID 2 CELLID 14
- Rebuilding seg 83 VOBID 2 CELLID 14
- Rebuilding seg 84 VOBID 2 CELLID 15
- Rebuilding seg 85 VOBID 2 CELLID 15
- Rebuilding seg 86 VOBID 2 CELLID 15
- Rebuilding seg 87 VOBID 2 CELLID 15
- Rebuilding seg 88 VOBID 2 CELLID 16
- Rebuilding seg 89 VOBID 2 CELLID 17
- Rebuilding seg 90 VOBID 2 CELLID 17
- Rebuilding seg 91 VOBID 2 CELLID 17
- Rebuilding seg 92 VOBID 2 CELLID 17
- Rebuilding seg 93 VOBID 2 CELLID 18
- Rebuilding seg 94 VOBID 2 CELLID 19
- Rebuilding seg 95 VOBID 2 CELLID 20
- Rebuilding seg 96 VOBID 2 CELLID 21
- Rebuilding seg 97 VOBID 2 CELLID 22
- Updating NAVPACKS for VOBID_02
- Updated VTS_C_ADT.
- Updated VTS_VOBU_ADMAP.
- Updated IFO: VTS_01_0.IFO

jdobbs
2nd November 2006, 05:17
Segments are not chapters. For that matter, cells are not chapters either. A chapter could be any number of cells.

I don't think I understand this at all. There's nothing "unlucky" involved from what I can see. I look at your log and it looks fine. The fact that DVD-RB breaks it down to less than a cell isn't an issue -- it has found something in a cell that is more convenient to handle as a separate segment, its supposed to work that way...

Why do you think something is wrong?

Also, what disc are you processing?

windtrader
2nd November 2006, 07:35
Well, "unlucky" in that it was me raising the question on some rather unusual RB processing and that it got me wondering what underlying logic was making this happen, i.e diverting limited time/energy to research it.

The fact that DVD-RB breaks it down to less than a cell isn't an issue -- it has found something in a cell that is more convenient to handle as a separate segment, its supposed to work that way...I just don't have a basic understanding of the logic RB applies in creating segments. Some segments in this title were very short; for example 00:00:00:14 (.4mb) and 00:00:00:28 (.8mb). Quite a few are 4-6 seconds.

The title is MI-3 R1, just released this week.

It all works fine, so it's no big deal. I was just looking to gain a bit more insight on what segments really are and how RB goes about creating them.

Thanks again and keep coding a GREAT product.

jdobbs
2nd November 2006, 12:04
Good. I just did that one yesterday and still have it on my hard drive. I'll do a quick analysis and see what is causing so many splits.

jdobbs
2nd November 2006, 14:20
I looked at it. There were some points at which DVD Rebuilder decided it would be best to force an I-Frame. The only way to do that across the myriad of encoders is to force a new segment.

Having looked at the MPEG stream and reviewing my code, I think DVD Rebuilder is probably being a little over-careful. I'm going to add some code to the next version that will more accurately determine when a forced I-Frame is truly needed. But it really doesn't hurt anything -- it just makes for more segments.

windtrader
2nd November 2006, 17:59
Thanks for additional info on what RB is doing to make the segment cuts. I tried once a long time ago to dig into the headers in the mpeg stream and got lost big time. Leave this to you, the expert. :-)

Since you have the same title, I'll point out one other small nit: matching one-for-one cells to segments do not show the same length in the RB segment editor. It's no big deal as the final RB output syncs back up with the original length. Just tingles my "numbers don't add up" phobia. :-)

Look at cells 1-3. In the unprocessed title and the final RB processed output, the IFOs have matching lengths of 00:00:21:11, 00:3:09:22, and 00:00:31:02.

In the segment editor, even on cells that are one to one with the segment as in cell 2, there is a discrepancy in the duration shown in the segment editor. The editor shows 00:00:3:09:28, 6 more frames than what the input and final IFO shows. These additional frames are actually visible when viewing via the editor.
It seems related to the I-Frame alignment processing you mentioned above.

This slight not-adding-up also extends to situations where several segments are parts of the same cell, i.e. cell 1 and 3.

Again, no big deal but thought it might help you sort through the code and making coding changes related to this issue - oh - I mean non-issue. :-)

thx

jdobbs
2nd November 2006, 19:02
If you look at the cells themselves you will see they are exactly the same length. Absolutely, positively. DVD-RB confirms that when it reapplies the flags. There always the chance there may be a glitch in the reporting of the viewer/editor.

windtrader
5th November 2006, 19:41
f you look at the cells themselves you will see they are exactly the same length. Absolutely, positively. DVD-RB confirms that when it reapplies the flags. There always the chance there may be a glitch in the reporting of the viewer/editor.Yes, the input = output to the frame. It is the viewer/editor that is not recognizing the true cell boundaries and shows slightly different durations even when one cell = one segment.

As I said it's just a nit but next time you roam through that part of the code, you might see where this is happening and find a one-liner fix :-)

thx again for a superior product!