From rjenks@animefest.com Fri, 23 Jul 1999 14:30:24 -0400 Date: Fri, 23 Jul 1999 14:30:24 -0400 From: Robert Jenks rjenks@animefest.com Subject: [Livid-dev] DVD SW Project Hi, I'm new to the list (not that the list isn't new too :), but I have a question for the DVD developers on the list. A little background first. For about a month now I've been doing research to write a program. Specifically it will be a subtitling program. It will be a re-write of an Amiga subtitling program I wrote back in '88, but this time for Linux. On the Amiga I relied on a GenLock (video chroma key device) to overlay the computer generated subtitles over a video image (typically laser disk). With the age of DVD upon us, some interesting ideas have sparked into my tiny brain. What if I could write a program to add an additional subtitle option for a DVD during playback? So I did some homework... I'm planning to write two programs. 1) The first program will be for people that want to generate the subtitles. This time I want to write it for the sole purpose of subtitling from DVD (specifically from a DVD-Rom to a DVD decoder card or SW decoder). The program will allow them to create a script file with translated dialog and formatting information (I'm planning to use an XML file format). Then they can enter a "timing" mode in the program to watch the film and press keys to turn on/off the each screen of titles. The advantage of DVD is that the user can stop, pause, rewind, fforward, etc.. while timing the script since I should be able to get timing information from the DVD data. When the script is completed I want the user to be able to upload the timed script file to a DVDDB on the net (similar to the CDDB) for other users to get. 2) The second program will simply be a player application (small and fast) which will access the DVDDB and/or a local directory to retrieve a timed script for the currently loaded DVD. Then it will play the DVD while inserting the new "subpicture" stream before it gets to the decoder device (SW or HW). Ok, whew.. . that being said, I'm looking for advice. Before CSS was cracked, this would have been impossible since a majority of the DVDs are region coded. But apparently, due to the efforts of this list's members, that isn't an obstacle any more. :-) I found limited information about the "subpicture" streams on mpeg.org, but I'll probably still have to do some reverse engineering on the sub-picture streams to get this to work. I'm assuming that subpicture streams were defined for DVD and aren't really documented anywhere except the $5000 specs, right? Are any of the decoder cards supported under Linux? I have a SCSI Toshiba 4.8X DVDRom and a Hollywood+ decoder card. Any advice, pointers, etc... would be GREATLY appreciated! -- Robert Jenks AnimeFEST! '99 http://www.animefest.com/AnimeFEST/
From pvolcko@concentric.net Fri, 23 Jul 1999 15:39:06 -0400 Date: Fri, 23 Jul 1999 15:39:06 -0400 From: Paul Volcko pvolcko@concentric.net Subject: [Livid-dev] DVD SW Project > 1) The first program will be for people that want to generate the > subtitles. This time I want to write it for the sole purpose of subtitling > from DVD (specifically from a DVD-Rom to a DVD decoder card or SW decoder). > The program will allow them to create a script file with translated dialog > and formatting information (I'm planning to use an XML file format). Then > they can enter a "timing" mode in the program to watch the film and press > keys to turn on/off the each screen of titles. The advantage of DVD is that > the user can stop, pause, rewind, fforward, etc.. while timing the script > since I should be able to get timing information from the DVD data. When > the script is completed I want the user to be able to upload the timed > script file to a DVDDB on the net (similar to the CDDB) for other users to > get. Let me see if I understand this (it sounds pretty cool I think). You want to be able to play the subtitles on a screen/window and allow a user to enter a translation of the subtitles to another language. The subtitles being displayed should be user controlable (able to select which subtitle stream is currently playing) and be able to pause/unpause the playback via keyboard/GUI-controls. This seems like a pretty cool idea. This would allow for the program to enter the current time information from the disc into the script automatically. The only thing is that the subtitles on a DVD are actually bitmaps, not coded ascii or some other character set that is then converted into a font and displayed. This comes into play, more below. > 2) The second program will simply be a player application (small and fast) > which will access the DVDDB and/or a local directory to retrieve a timed > script for the currently loaded DVD. Then it will play the DVD while > inserting the new "subpicture" stream before it gets to the decoder device > (SW or HW). Insertion can be problematic, read below. > Ok, whew.. . that being said, I'm looking for advice. Before CSS was > cracked, this would have been impossible since a majority of the DVDs are > region coded. But apparently, due to the efforts of this list's members, > that isn't an obstacle any more. :-) CSS is not cracked. Unless I missed something, the only thing that has been done is discovering and implementation of the device authentication and disc/title key retrieval. This is a significant step, yes, but CSS is not yet cracked. There is still the issue of decrypting the disc data. I'm sure someone is working on that at this very moment and we'll all know about it the second it is accomplished (I wish I had SCSI ioctls updates so I could perhaps help in some way). CSS is not cracked though. It is still a roadblock, especially for your project since the data you will be working with is the VOB data (the only encrypted data on the disc). > I found limited information about the "subpicture" streams on mpeg.org, but > I'll probably still have to do some reverse engineering on the sub-picture > streams to get this to work. I'm assuming that subpicture streams were > defined for DVD and aren't really documented anywhere except the $5000 > specs, right? Yes they are defined in the DVD Specs. I'm not sure if there is information on them elsewhere. Considering the fact that no new technologies or encoding methods were really made specifically for or by the DVD consortium (short of CSS) I bet that there is specs elsewhere. I seem to remember someone esaying that they were simply compressed RLE images that were superimposed and (usually) alphablended onto the main video display output. > Are any of the decoder cards supported under Linux? I have a SCSI Toshiba > 4.8X DVDRom and a Hollywood+ decoder card. > > Any advice, pointers, etc... would be GREATLY appreciated! There are not any decoders currently on the market that have linux drivers and/or support. There is an effort to get Zoran chipset based cards supported, specifically Matrox brand decoders (livid project). Sigma Designs has stated that there will not be support for their current decoder boards under linux. Creative has been wishy washy on it, but has not been forthcoming with developer support and last I knew they had taken a similar stance to Sigma, that they will not be supporting current boards under linux. That said, Sigma will be releasing a new chipset and decoder board probably before christmas (there have been some delays) that will have linux developer support as well as drivers and possible api from them for linux. There is also a company called Convergence that is working on a decoder board specifically for linux, see linuxtv.org for more information. Now, the stuff that I said I'd mention below :) My first thought is that you will have to make the new subtitle stream take the place of an existing one. This is because "adding" a stream to the VOB data as it is delivered to the hardware decoder or software decoder would impose some problems. Specifically, the extra packets would screw up packet offsets and potentially interfere with playback. For instance, the NV packs wouldn't know that the data was there, so they would point to incorrect positions in the stread for fast forwarding and rewinding, etc. I'd have to take a look at the specs to see if this would actually impose a problem, but my initial reaction is that it would. So to make this happen the external subtitle stream packets would have to replace the packets of another subpicture stream. Furthermore there couldn't be any overlap or underlap on the number of packets, it would have to match the original stream exactly. Secondly, what would be the usefulness of this? Assume for the moment that people only buy discs for their actual region ( a majority do I would think). Those discs are going to have either audio tracks in the appropriate languages and will have subtitles in the appropriate languges, wouldn't they? It's not like a VHS tape or something that can only have one subtitle "track". Is this program and system intended to bring less popular language subtitle tracks to discs in a given area (say a korean track for a region 1 disc) or to provide a means for people to enjoy out of region discs that probably don't have a language audio or subtitle track that is appropriate the region its actually being played in? I'm not saying that either is good or bad, I'm just wondering what the main thrust of this would be. A second method of doing the external subtitles just crept into my mind. If this is relegated to software DVD players only (no hardware decoding) then based solely on timecode information of the video/audio stream the new sub-pic stream could rather easily be mixed in at the end with FF and RW abilities based on both NV pack position pointers (for video/audio playback) and timecodes for the external subpic. In this way the new sub-pic isn't actually part of the decoding module(s) input stream, it would need to be specially handled at the sub-pic mixer at the end. This method wouldn't work on hardware decoders though, since there isn't a way to pump sub-pic info at them any other way than with the input VOB stream. Very cool idea though and, I think, possible. Paul Volcko LSDVD Project