Log in

View Full Version : Reposition DVD subtitles inside a VOB?


Pages : [1] 2 3

tekman
29th October 2005, 22:41
I'm looking for a way to reposition subtitles inside a VOB. DVDFab is able to move them "up" in one pass but not down as I would like to do.

It should work to change the position of the subpictures inside the stream but I haven't found any tool/guide that can explain where to change.
(tried general/subtitle but no answer)

Vobedit/Ifoedit/Pgcedit?

blutach
30th October 2005, 14:44
Subtitle Creator?

Regards

CoNS
30th October 2005, 16:31
Yes, SubtitleCreator's Manipulate SUP tool lets you change the vertical position both ways... But you'd have to demux the movie to get the SUP file first (and mux it back together afterwards). I think tekman is asking if there's a way to change the vertical position directly inside the .vob files. (and sorry tekman, I don't know the answer to that question)

jeanl
31st October 2005, 05:13
It's weird because it wouldn't be difficult to write a small tool to do that... The position is in the command area of the subpics, and that should be quite easy to modify in-place, very quickly (you wouldn't need to rewrite the entire vob, just modify the offsets in subpic command area)... Funny nobody's done that yet (well, maybe there isn't that much demand for that)...
Jeanl

bokkoman
2nd November 2005, 22:51
i think you're right jeanl. such a program can easily be made, i think/hope. Cause i would like such a prog too.

r0lZ
3rd November 2005, 00:20
Me too!

BTW, I have used several time the function in DVD-Fab (old freeware version as well a a newer one) to move the subpics, but it doesn't work well. When I watch the resulting video on my PC, everything is fine, but on my Sony standalone, most of the subpics are not shown anymore. I wonder why.

Jeanl, are you sure it's so easy to do?
It is possible to author a subpic fullscreen with a big transparent background, no? If you move it, you will have a part of the subpic outside the screen, or a negative Y position.
Also, you should envisage the case of a subpic at the top of the screen. Though not frequent, it may happen. In this case, you must probably change the direction of the offset.
Seems more complicated than you thought...

jeanl
3rd November 2005, 00:26
Yes, of course, it's always more complicated than you originally envision, but at least it's easy to figure out where to change things if you're doing it in a dumb manner. Of course, you need to take care of all possible weird cases, as you describe, although I don't think it's very frequent to create a fullscrean subpic (that would waste storage space, not by much, but still)... Also, you'd have to be smart and not mistake true subpics with button highlights (probably by checking if there are any buttons defined in the navpacks before changing anything!)...
Writing a tool to manipulate subpics is still something I have in the back of my mind (it looks like there isn't that much available that works directly on the VOB, in-place)... But it also seems to me that there would be better places for such a tool (e.g., PgcEdit to edit button highlights, perhaps vobblanker to edit "standard" subpics).
jeanl

r0lZ
3rd November 2005, 00:59
I agree. But a small app to move the subpics up or down in a whole title domain can be useful, even as a little CLI-only standalone tool. ;)

jeanl
3rd November 2005, 01:02
I agree. But a small app to move the subpics up or down in a whole title domain can be useful, even as a little CLI-only standalone tool. ;)
yeah, I know the song! ;) you start with a small CLI-only tool, you end up with a multiple-version multi-platform GUI app with visualization! AH!
Besides, moving the subpics is one thing, but I'm sure people would also love to change the transparency (can't do that in the IFOs) or other aspects (remove a force display for example)...
jeanl

jsoto
3rd November 2005, 01:19
yeah, I know the song! ;) you start with a small CLI-only tool, you end up with a multiple-version multi-platform GUI app with visualization! You're right.... Because of the special cases (subs at top, etc) at the end you'll need a manual selection of how much and in which direction each sub has to be moved... (with visualization, of course ;) )


jsoto

jeanl
3rd November 2005, 01:33
yes, a piece of cake, really!
:D
jeanl

blutach
3rd November 2005, 11:12
Nice tune! Maybe call it SubShrink :D

Regards

phusg
9th November 2005, 11:42
I'm looking for a way to reposition subtitles inside a VOB. DVDFab is able to move them "up" in one pass but not down as I would like to do.

It should work to change the position of the subpictures inside the stream but I haven't found any tool/guide that can explain where to change.
(tried general/subtitle but no answer)

Vobedit/Ifoedit/Pgcedit?
Are you doing this with the commercial version (http://www.dvdidle.net/download/DVDFabPlatinum29.exe) of DVDFab?

And has anyone contacted the makers Fengtao Software Inc. about adding this feature? I'd rather it be open source, but this is worth paying for in my book. Demuxing, reauthoring and then remuxing to move subtitles a couple of rows down is just :rolleyes:

jeanl
9th November 2005, 16:42
I"m working on it... Give me some more time, I'll keep you posted!
:)
jeanl
BTW: while I'm at it, if you had a soft to manipulate subpics, what would you like to be able to do with it? Any opinion is welcome.
1) Move subpic up and down?
2) Move subpic left/right?
3) Change subpic transparency?
4) Force or remove forced subpics?
5) What else???

2COOL
9th November 2005, 20:48
yeah, I know the song! ;) you start with a small CLI-only tool, you end up with a multiple-version multi-platform GUI app with visualization! AH!"Without vision, we are blind to opportunity."

Looking forward to your tool and we always need a new specialized program now and then. ;)

CoNS
9th November 2005, 20:54
I don't know how much of this can be done by changing data directly inside the vobs without demuxing, but it would be nice to be able to do the following:
Delete (hide?) current/all/selected subtitle pics within a subtitle stream.
Change the timing (set delay +/-) for current/all/selected subtitle pics within a stream. This is for situations where you've done all the dirty work of adding custom subtitles, including re-authoring, only to find out the subs are out of sync.
Change the timing of the current subtitle pic within a stream, i.e. manually edit the show/hide timings.
Change the colour remapping of current/all/selected subtitle pics within a stream. I.e. change which of the 16 available colours are used as the four colours for each subtitle pic.
Extract current/all/selected subtitle pic within a stream as bmp file(s).

Most of these features are available in SubtitleCreator's fine "Manipule SUP" tool, which, however, as the title implies, only is able to work with bitmap subtitle streams that are loacted in a separate (demuxed or new) SUP file.

And here're some ideas for version 2.0, maybe (!), to make the tool "complete": :D
Change/edit/import/export the IFO colour palette.
Demux a subtitle stream to a SUP file.
Change/edit the stream attributes for the subtitle streams, and the values in the subtitle table

2COOL
9th November 2005, 21:20
5) What else???
6) Rotate?

http://forum.doom9.org/showthread.php?t=72767

7) Multi-color subs (I've read something on this before somewhere)

CoNS
9th November 2005, 22:09
7) Multi-color subs (I've read something on this before somewhere)May be this thread: http://forum.doom9.org/showthread.php?t=100360 ?

mpucoder
9th November 2005, 22:36
I wish I'd seen that thread earlier. Yes, the 07 command allows subdividing the subpicture vertically and horizontally up to 15 times. This means in theory a subpicture could use all 256 combinations of color and transparency. The command is also used for two of the three stock subpicture effects (wipe and fade).

But this thread is more related to the third effect, scroll. Scroll works by changing the starting address of the pixel data and the display area. To scroll up one line the fields are swapped, and the new bottom field start address increased by one line. For 2 lines the fields remain the same, and both start addresses are increased by one line. The display area also has to change, or garbage will creep into the bottom. To scroll down only the display area changes (just change the starting Y value). Horizontal scrolling needs to be planned due to the rle compression. Unless carefully written rle compression will prevent scrolling by changing the start address. The pixels on the left and right, for the difference in horizontal positions, must be uncompressed. Usually the bitmap is not 720 pixels wide, which allows for scrolling by way of Set_Darea (set display area).

I noticed in the original post that down was the desired direction. Strange that DVDFab won't do that, as it is easier than up.

jeanl
9th November 2005, 23:14
@mpucoder, thanks , this is exactly how I currently do it (moving up and down)! I haven't implemented horizontal scrolling, I made the same analysis as you did, if the bitmap is close to 720 (unfortunately most of the subpic data I've seen so far uses 720), you need to decode and change each line, it's not terribly hard, but it's a bit more involved. Besides, is it really needed (horizontal scrolling?)...
@cons, see my next post :)
jeanl

jeanl
9th November 2005, 23:22
I don't know how much of this can be done by changing data directly inside the vobs without demuxing, but it would be nice to be able to do the following:[list]
Delete (hide?) current/all/selected subtitle pics within a subtitle stream.

not following you here. You'd like to be able to delete a particular subtitle (I mean a single subtitle bitmap, at a given time)? What for?

Change the timing (set delay +/-) for current/all/selected subtitle pics within a stream. This is for situations where you've done all the dirty work of adding custom subtitles, including re-authoring, only to find out the subs are out of sync.

This might be hard if not impossible without reauthoring. Delaying the display time might be feasible, but to turn them on earlier I imagine you need to remux because the subpic packs might have to be moved earlier in the vob file (to allow for the decoding time). mpucoder, any comment on that one?

Change the timing of the current subtitle pic within a stream, i.e. manually edit the show/hide timings.

same as above for the show time. The hide time is easy to control, it's just one of the commands in the subpic data.

Change the colour remapping of current/all/selected subtitle pics within a stream. I.e. change which of the 16 available colours are used as the four colours for each subtitle pic.

I would imagine you'd use the PGC CLUT for that, but of course, that would change it for all the streams. Do you think it's usefule to do that on a single stream?

Extract current/all/selected subtitle pic within a stream as bmp file(s).

yes, that's easy and I already have that (as a ppm in fact).



Change/edit/import/export the IFO colour palette.

PgcEdit does that very well, right?

Demux a subtitle stream to a SUP file.

There are tools for that right?
Change/edit the stream attributes for the subtitle streams, and the values in the subtitle table
[/QUOTE]
Same here...

Thanks for the suggestions!
Jeanl

mpucoder
10th November 2005, 01:05
Changing the timing without moving the data in the multiplexed stream would be very restricted as subpictures are required to be present in the same VOBU as the video picture having the same pts. That doesn't leave much wiggle room. And the delay for the first set of commands is required to be zero.

jeanl
10th November 2005, 01:39
mmm, OK. I forgot about the restriction that subpics have to be in the same VOBU as the video they share the same pts with... This means if we want to change the delay, we have to do some in-place remuxing. It shouldn't be too difficult though, since that's something that menushrink does already (it moves the subpic packs from wherever they were into the first VOBU). Tricky but not impossible. Definitely for version 2.0 (hey, 1.0 isn't even out yet!)

One more question: the delay for the first set of commands has to be zero, but that first set does not have to have the display command, or does it? You could have 3 sets, 1 with all the normal commands but not the show command, a second one with the delayed show command, then the third one with the stop command. That would work, right? This could take care of delaying the subpics.
jeanl

mpucoder
10th November 2005, 02:20
One more question: the delay for the first set of commands has to be zero, but that first set does not have to have the display command, or does it?
Unfortunately yes, according to the Philips verifier, "Either FSTA_DSP or STA_DSP shall be described in the SP_DCSQ#0"

jeanl
10th November 2005, 02:22
well, then there's no avoiding the hard way!
Thanks a bunch man (as usual :))
jeanl

GrofLuigi
10th November 2005, 03:14
BTW: while I'm at it, if you had a soft to manipulate subpics, what would you like to be able to do with it? Any opinion is welcome.

IMHO, the essential for such a soft would be to DISPLAY individual subs "as is" or as they will be displayed on a standards-compliant DVD player.

Any further operation would be restricted by "what is possible" to do with the VOB without breaking it up - i.e. just "byte-patching" and such.

Later would come some more complex calculations that would result again in byte-patching.

Only when everything above is tested, I (if I was a programmer, and I'm not, and if I knew DVD structure in deep, which I don't) would introduce heavy manipulations with VOBs.

It's all about realistic expectations. ;)

Just my thoughts...

GL

r0lZ
10th November 2005, 10:40
yeah, I know the song! ;) you start with a small CLI-only tool, you end up with a multiple-version multi-platform GUI app with visualization! AH!Seems you are right, Jean! But it's your fault! If you add a complex interface able to display each subpic individually, there are many applications, and the job can be endless. I've seen that with PgcEdit.
You will certainly end up with crazy requests such as displaying the subpic upside down, for guys who prefer to watch the movie on a reversed TV set! :p

More seriously, it may be useful to be able to copy a menu button, and paste it at another location in the same or in another subpic bitmap (of course if there is enough room.) May be useful for the guys who want to add a new button with highlights the easy way.

Should be nice also to have a simple CLI interface to launch the app from PgcEdit (or VobBlanker, or...) with the right VOB, cell and subpic stream pre-selected.

jeanl
10th November 2005, 17:32
you're right r0lZ, it's my fault! I don't intend to support all possible features, certainly not in the first version of this thing, if I ever get to finish that! The idea of editing the highlights is appealing, but tricky as it involve re-encoding the subpic, and that might take more space than was originally available. If there's no room left, that would mean an additional subpic pack, and for now, I'd like to keep things "in place" (i.e., output length = input length).
Of course, command line arguments are a given! ;)
jeanl

r0lZ
10th November 2005, 19:04
Right. I did not though at the place needed to add the button. :( (But maybe you can check the free space, and enable the function for a small button if there is enough space available? I kbow it's not easy: you cannot know exactly what will be the space used by the button after compression.)
Anyway, you have enough work to do for now! ;)

phusg
10th November 2005, 19:29
I"m working on it... Give me some more time, I'll keep you posted!
:)
jeanl
BTW: while I'm at it, if you had a soft to manipulate subpics, what would you like to be able to do with it? Any opinion is welcome.
1) Move subpic up and down?
2) Move subpic left/right?
3) Change subpic transparency?
4) Force or remove forced subpics?
5) What else???

Jeanl I love you already! ;)

For me personally (1) moving subpics straight from the VOBs is the major one. AFAIK mplayer (http://www.mplayerhq.hu/) is the only player that can do this 'on-the-fly', maybe they have some reuseable source code that can help?

jeanl
10th November 2005, 19:31
mmm, I'm guessing mplayer is doing that on the fly as it plays the DVD, but here, we're looking at doing it "inside the vob" so any player will display the subs in the new place...
The only problem I have at this moment is the time it takes to "load" the VOB (i.e. figure out where all the subpics are), that can take up to 4mn for a 8GB DVD!!!
jeanl

CoNS
10th November 2005, 20:30
not following you here. You'd like to be able to delete a particular subtitle (I mean a single subtitle bitmap, at a given time)? What for?I have a number of backed up DVDs, where I've added custom subtitles in the past. However, the custom subtitles have credits for the translation at the beginning and in the end. I'd like to be able to delete/hide those subtitle pics without the need of demuxing, creating a new bitmap SUP file and reauthoring etc.

For me, too, the main request is to have a tool that can reposition the subtitles vertically, both up and down, within the vob files. That would be very, very nice to have. You asked for other suggestions and ideas, and you got 'em! But I think you should concentrate on the vertical positioning thing for the first release so that it won't drown in plans for all the supplemental features which could or could not be added later...

Anyway, I'm just really grateful that you've taken upon you to start the development of yet another DVD editing tool to add to the list of handy and very effective tools created by Doom9 members. It's much appreciated. :)

jeanl
10th November 2005, 20:34
Yes, CoNS, I do intend to focus mainly on the repositioning, I was just curious about you request. Note that it's probably possible to make a given subtitle not show without removing it from the vob (simply by changing one of the commands (for example, setting the display area to 0 pixels, if that's valid)...
Thanks for the thanks, but you should wait until I come up with something! ;) Give me a little more time, I don't want mess that one up!
Jeanl

jsoto
10th November 2005, 23:49
For Release 3.0 I'd like to have an automatic translator from different languages (like Klingon) to Spanish :p :p

jsoto

CoNS
11th November 2005, 08:56
Note that it's probably possible to make a given subtitle not show without removing it from the vob (simply by changing one of the commands (for example, setting the display area to 0 pixels, if that's valid)...I was hoping for something like that! Perfectly suitable for a version as soon as 1.5, I'd say :D

phusg
12th November 2005, 17:55
Jeanl I love you already! ;)

For me personally (1) moving subpics straight from the VOBs is the major one. AFAIK mplayer (http://www.mplayerhq.hu/) is the only player that can do this 'on-the-fly', maybe they have some reuseable source code that can help?

I just realised I lied about mplayer. Well at least in that it doesn't reposition them as low as I'd like it to. I just tried Geexbox (http://www.geexbox.org) 0.98.7 which uses mplayer 1.0pre7, but readjusting subtitles on-the-fly only allows you to adjust the value between 1-100 relative to the display area of the video. So no re-adjusting downwards to below the video. It may be the Geexbox implementation of mplayer, or the version of mplayer, but to me it doesn't look like switching to Linux provides the solution I'm looking for, just thought I'd let you'll know...

ydl3
16th November 2005, 12:33
waiting for your tool,i need it

phusg
16th November 2005, 12:39
waiting for your tool,i need it
Sjeesh. Nice selfless contribution to the thread. Really worth sending everyone who's subscribed to the threa a mail for. :stupid:

jeanl
16th November 2005, 17:39
phusg, not so useless in fact, it's helpful to know you're not writing a tool that won't be used... I've had the idea for this tool in the back of my head for a while, but didn't act on it because I didn't think people would use it.
Anyway, I'll post a beta version soon, give me a few more days :)
jeanl

sweetness
17th November 2005, 19:50
I've had the idea for this tool in the back of my head for a while, but didn't act on it because I didn't think people would use it.
Thank you, jeanl.
i may not use this app b/c 99% of may backups are one audio, one sub but i can not speak for the whole dvd world, so a app like this is always appericiated.

over the past few years DVD blackups has evolved do to the contributions of the members of this forum and i would like to thank everyone(just WAY too many names to mention, you know how you are.) who has created an app or past on their knowledge to make DVD backups easier.

Lets bring on HD DVD and Blu-Ray.

So jeanl, if you have anymore things in the back of your head don't hesitate to bring them forward. i know we all have lives but one day at a time. :)

CoNS
18th November 2005, 06:26
i may not use this app b/c 99% of my backups are one audio, one subThe tool will enable you to edit the subtitle stream(s) inside the vob files in various ways, i.e. change the vertical position up and down. This could be used on your backups, too, even though they usually just have one subtitle stream, no?

jeanl
18th November 2005, 18:55
Guys,
I had an idea to delay the subpics a bit without remuxing: How about creating 3 sets of SPU commands (instead of the normal two - one to turn on, the other to turn off). The first one turns it on with transparency set to transparent, the second one - with the appropriate delay - turns the transparency off, the third one turns display off.

This should work (unless subpics bump into each other (i.e., the end of one is later than the start of the next, in which case, I'm guessing the next one causes the previous one to be turned off? - Mpucoder???)

Jeanl

jsoto
18th November 2005, 20:18
It's an interesting idea!

Only two comments:
- You'll need some (minimum) room to add the new set.
- Moving the subs in advance is not possible. Is it? do you have another idea?

IMHO, the best choice in case of delay problems is to remux again...


jsoto

jeanl
18th November 2005, 20:20
Yes of course remuxing is the way to go, but doing that isn't as easy as what I was suggesting above. And you're right, if you want to advance the subpic you really have to remux. And yes again, if you don't have room for a new set of commands, you're screwed (but you'd have to be very unlucky, but yes, it can happen!).
jeanl

jeanl
21st November 2005, 08:06
Here's a very incomplete beta version of subedit...
YOu can get it here (http://www.videohelp.com/~menushrink/DVDSubEdit/)...
The latest is Beta0.55. It's still missing a lot of things:
- No saving of modifications
- Can only modify y position (and it's not reflected correctly in the display yet).
- Does not show the background image...
- Does not use the colorscheme mechanism for menus
etc etc etc...

Still, you can give it a shot. Drag/drop one or several VOBs and get going...
Any feedback is welcome.
Jeanl

bourtzovlakas
21st November 2005, 10:25
:thanks:

A little OT, but could this tool be used to fix any subtitle desync problems, in ARccOS protected titles...
In some of the new releases, when you back-up the DVD the sync is fine, but when you try to rip the subtitles with SubRip or VobSubRip the timings are way off...

jeanl
21st November 2005, 17:44
bourtzovlakas I believe the latest version of the psl2 plugin tells you a delay value which you can use in subrip to resynchronize your subtitles...
jeanl

jeanl
21st November 2005, 19:31
New Beta version 0.56 available at
http://www.videohelp.com/~DVDSubEdit/

The CLUT support has been improved. The "Ignore CLUT" check box now shows the 0-3 pixel values in the subpic, coded with different colors.


jeanl

CoNS
21st November 2005, 20:30
Thanks for the new beta!

A couple of minor GUI suggestions:

At startup, the large grey (unused) area at the top looks a bit strange. As soon as a VOB is loading, it changes so that the preview area is shown. Maybe you could let the dedicated preview area show at startup by assigning a different colour than the normal grey background colour?

Also, I think you should consider integrating the status window (when loading) in the main window somewhere...

BTW, how does the Colour Look Up Table support work? Is the CLUT automatically loaded from the corresponding IFO file, when a VOB is dragged and dropped? And what does "p", "e1" and "e2" mean?

The CLUT consists of 16 colours, where each SPU uses 4 colours, which don't have to be the same from SPU to SPU, right? But you can't see all 16 colours in the display in SubEdit at the same time? Do the display of the 4 colours change if SPU #2 uses a different set of colours from the CLUT than SPU #1? (none of the test discs I have on my harddisk ATM contain subs like that, so I haven't been able to test it)

jeanl
21st November 2005, 20:43
CoNS, thanks for the feedback!
- I agree, I don't like the large gray area. I'll paint it black for now!
- I could integrate the status window into the main window, but wouldn't that be a waste of space? I'll look into it.
- The CLUT is automatically loaded from the IFO when you drag/drop a vob file(s), using the "lowest" vob you dropped: if you drop vts_01_1.vob vts_01_2.vob ... vts_05_1.vob, the ifo from vts 5 will be used, title domain. If you drag vts_01_0.vob the menu domain will be used. SubEdit looks for any pgc that references the VCID a given subtitle belongs to, and displays the CLUT for the first one it finds (not ideal, I know)...
- P,b,e1 and e2 are the "traditional" names for the "types" of pixels that are defined in subpics. Pixels in subpics can only be of 4 types: b,p,e1,e2. Each type is assigned an index in the CLUT, via the SPU's color table (set by the Set Color command, which you see in the command display). SubEdit (at the moment) only displays the 4 colors used by the current SPU. If the next SPU uses a different set (different Set Color command, or different CLUT because it's referenced by another PGC), then the colors are also updated in SubEdit. I have some DVDs that do that.

Note that for menus, things are more complicated, because of the color scheme. I haven't implemented that yet...

jeanl