VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. hi people,
    what's the format of .vob file? where can i find details of what is inside .vob file? how can i write a own simple program to read .vob file n extract the subtitle out of it in C#.Net?
    Should i use FileStream or StreamReader to open up the vob file? Which is better?

    Any ideas?
    Quote Quote  
  2. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    Originally Posted by dvdiant
    hi people,
    what's the format of .vob file? where can i find details of what is inside .vob file? how can i write a own simple program to read .vob file n extract the subtitle out of it in C#.Net?
    Should i use FileStream or StreamReader to open up the vob file? Which is better?

    Any ideas?
    The official specs would probably cost money but try these sites:

    http://www.mpucoder.com/DVD/

    http://www.pioneer.co.jp/crdl/tech/dvd/1-2-e.html

    http://www.dvd-replica.com/DVD/gprm.php

    This last one is a download for vstrip which strips the streams from a dvd. One versions (non-css) contains the source code. With a google search you can probably find the source for the css version. If you can understand the source code it will teach you how to extract the streams from the vob files
    http://www.digital-digest.com/dvd/downloads/vstrip.html

    Have fun!
    Quote Quote  
  3. it's not easy to read through other's code... sometimes u dun know what they are actually writing...

    one of the website you gave above is very good but it requires me to pay them a memebership fee.
    Quote Quote  
  4. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    Originally Posted by dvdiant
    it's not easy to read through other's code... sometimes u dun know what they are actually writing...

    one of the website you gave above is very good but it requires me to pay them a memebership fee.
    The material on those free sites should keep you busy for weeks if not months. I do not benefit from any affiliation with any of those sites but sometimes willingness to pay a small fee for access to information is part of the learning business. I have joined so many sites over the years that sometimes I forget the ones where I am paid-up lifetime member. If this is one of those then please ignore it as you wish. Somehow, I seem to have access to the information on all 3 links but don't recall joining any of them.
    Sifting through other people's code is not easy but it's a lot easier than trying to write your own code when you don't know the first thing about a complex subject. It took me many hours of tracking through someone elses free code to understand a so called simple video capture program but afterwards I was able to enhance it and add many features that were not in the original program. Dvd processing is a fairly complex topic it's much easier to follow in someone else's footsteps. If you don't have the willingness to do it then why not just use the existing binaries created by others. In the end they will let you rip your files and extract whatever stream you want with a minimum of effort.
    Programming is work and can be frustrating but if you love it , it's fun and very self satisfying.
    Quote Quote  
  5. thanks for sharing...
    Quote Quote  
  6. Retired from video stuff MackemX's Avatar
    Join Date
    Nov 2002
    Location
    VIP Lounge
    Search Comp PM
    I created a simple sub extracting program after using hexeditor and vobedit to work out which bytes I wanted from each sector. The actual formula was rather simple in the end. Even though I can't program, it's nothing like the codes I have seen. This is my attempt at basic code I gave to a coder and he knew what I meant when I gave him the code below. I haven't a clue whether it's legit or not. He created a program with it and it worked for what I needed it for at the time so I wasn't bothered. It split the various subtitle streams into relevant .sup files so I could extract the menu subpictures for editing. This was all part of a process to edit original subpictures and reinsert them back into the DVD and it worked as I said so I was happy

    Code:
    1 - LOOP=0. Set all streams (32-63) to  SIZE=0 
    (LOOP is sector number and Size set to 0 to remember current location in subs file)
    
     2 - read address (LOOP+14) for 4 bytes    
    (get stream type)
    
     3 - if value <> 445 then LOOP = LOOP +2048, goto Line 2 
    (this checks whether its an audio/subs stream)   
    
     4 - read address 22 for 1 byte and store value (TABLE, this is also for the individual STREAM)
    (collect size of current sub table)
    
     5 - read address (LOOP*2048)+23+TABLE for 1 byte storing value (STREAM) 
    (get stream ID number)
    
     6 - if STREAM <32 or >63 then goto Line 2   
    (check to see if its a sub)
    
     7 - if TABLE=8, read address (LOOP*2048)+32 for 2 bytes and save as SIZE, CSIZE=SIZE. Read address (LOOP*2048)+34 for 2 bytes and save as INFO
    (collect size of sub if its a Header and set CSIZE)
    
     8 - if Stream Size > 2024-TABLE copy address (LOOP*2048)+24+TABLE until address (LOOP*2048)+2048 (CSIZE=CSIZE-2024+TABLE). Goto Line 2
    (check to see if CSIZE is greater than maximum possible data in sector)
    
     9 - if Stream Size <= 2024-TABLE copy address (LOOP*2048)+24+TABLE until address (LOOP*2048)+23+TABLE+CSIZE. End current stream file. Goto Line 2
    (check to see if CSIZE is less than maximum possible data in sector)
    
    10 - Next LOOP
    I think the DVD structure is simple if you work out exactly which bytes you require. This is exactly the same way as I created MenuModder using simple basic descriptions and algebra, similar to above. I gave that to a coder who knew nothing about DVD's and he did the rest. Menumodder didn't turn out bad apart from the stupid preview wouldn't work properly. I just wish I could actually code so I could make some more tools for myself without having to explain to others exactly what I want

    saying that, the $5 for mpucoders site is nothing compared to the info you get access to
    Quote Quote  
  7. wow thanks... i'll look through the code...
    the next diffcult part i'm facing is the conversion to text format... i need to do a OCR ...optical character recognition on the subtitle bitmaps.... i've paid $5 for that site... it's really good! glad i did it...

    anyone have any idea that can share?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!