that looks really simple compared to the actual format.
this is from doom9.org
http://www.doom9.org/index.html?/dvd-structure.htm
VOBs - Video OBjects
A VOB contains several streams multiplexed together: Video, Audio and Subtitles. Video is MPEG-2, audio can be AC-3, Linear PCM, Mpeg 2 multichannel or MPEG1 layer2 2 channel audio. AC3 is pretty much the standard and MPEG-2 multichannel can only be found on very few discs (one example is "In the line of fire, PAL edition") as this format was initially considered to be the standard format in Region2 (Europe and Japan) but was later dropped. PCM is mostly found on music DVDs and MP2 on cheaper productions. PCM is high quality uncompressed audio which takes a lot of space, hence it's not an ideal choice for full length movies with extras and possibly multiple languages. AC3 streams have a bitrate between 192 and 448kbit/s. 192kbit/s is used for 2 channel sound, and 384-448kbit/s for 5.1channel surround.
A VOB can contain one main video stream and several multiangle streams, allowing you to switch (as an example) the perspective during the movie. This feature is mostly used to display storyboards or other extra features during playback. The maximum bitrate of the video stream is 9.8mbit/s. Together, video and audio stream must be below 10mbit/s at any given moment. It's possible to have up to 9 different audio streams and you can usually switch the audio stream during playback (this feature can be disabled during the authoring phase of a DVD). It's also possible to have up to 32 different subtitle streams. Subtitles are 4 color bitmaps which are overlayed over the video stream, they're usually not encoded into the video stream.
Let's have a closer look at a VOB using our old favorite vStrip:
Scanning for stream id's, press control-c to quit...
Found 0xBF = Private 2 [@LBA 0]
Found VOB-ID: 01/CELL-ID: 01 [@LBA 0]
Encountered encrypted sector, attempting key recovery [@LBA 1]
Deduced key: 0xC00374C61C (2/2 vkey(s))
Found 0xE0 = Video 0 [PTS 0:00:00.290 @LBA 1]
Width = 720
Height = 480
Aspect-ratio = [3] 16:9 display
Frame-rate = [4] 29.97 (30000/1001) fps
Found 0xBD = Private 1, sub 0x80 [PTS 0:00:00.224 @LBA 99]
Found 0xBD = Private 1, sub 0x81 [PTS 0:00:00.224 @LBA 100]
Found 0xBD = Private 1, sub 0x82 [PTS 0:00:00.224 @LBA 101]
Found 0xBD = Private 1, sub 0x83 [PTS 0:00:00.224 @LBA 102]
Found 0xBE = Padding [@LBA 117]
Found 0xBD = Private 1, sub 0x20 [PTS 0:00:00.724 @LBA 169]
Found 0xBD = Private 1, sub 0x21 [PTS 0:00:00.724 @LBA 170]
Found VOB-ID: 02/CELL-ID: 01 [@LBA 378]
As said before there's usually just one video stream and it always has ID 0xE0. PTS is the Program Time Stamp and states when a certain stream starts with respect to the beginning of the VOB. As you can see the resolution is 720x480 so it's an NTSC DVD. The frame-rate of 29.97 basically states the same fact. The DAR of the stream is 16:9. Then there's 4 audio streams: 0x80 - 0x83. Note that these are AC3 streams. All AC3 streams are in stream 0xBD, substreams 0x8x. When there's a DTS stream it usually has stream id 0xBD 0x88 or 0xBD 0x89. PCM streams are also located in stream 0xBD, they have stream IDs 0xAx, from 0xA0 up to 0xA9. MP2 audio finally is located in the stream 0xCx. Here's an example from a PCM and MP2 stream:
Found 0xBD = Private 1, sub 0xA0 [PTS 0:11:01.479 @LBA 4]
Found 0xC0 = Audio 0 [PTS 0:00:00.440 @LBA 25]
There are also 2 substreams, 0x20 and 0x21. All subtitle streams are located in the 0xBD stream as well.
Furthermore there are usually padding streams (0xBE) but they don't concern us.
You might also have noticed the VOB and Cell IDs. A Cell is the smallest unit on a DVD. On a simple DVD this usually represents a chapter but it gets more complicated in many discs. If you're interested about Cells on a DVD I suggest you start learning how to use Scenarist, because only then will you truly understand how these works. When it comes to VOB IDs I still haven't found how they are created exactly and to what kind of structure they correspond. Usually each unit on its own has its own VOB ID, for instance the main movie and the trailer. In multiangle and seamless branching titles each angle has its own VOB ID.
Good luck if it works, it appears your just reading the same file in and out and changing the filename.