Log in

View Full Version : Reposition DVD subtitles inside a VOB?


Pages : 1 [2] 3

CoNS
21st November 2005, 21:57
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 usedHow are the stream numbers displayed, if more VOB files containing the same stream numbers (for example 0x20) are dragged and dropped at the same time?

Also, could you explain a bit more about how the VCIDs work inside the VOBs?

jeanl
21st November 2005, 22:54
The display on the left shows you the stream number of the SPU you're currently looking at. You can filter by stream ID, using the drop down stream selection. As of today, you can't tell which VOB file the SPU comes from (although I could display that as well), the info on the left tells you which VCID it comes from though...
VCIDs are pairs of number VOBID/CELLID that define "cells" inside the vob file. Typically you'll get 1 cell per chapter, but not always. Also in multi-angle movies you can get 1 VOBID per chapter and 1 CELLIDs for each angle, i.e. the various angles would be in 1/1 1/2 1/3 etc...
Jeanl

kumi
22nd November 2005, 00:04
Great work jeanl. I look forward to testing this, when I get one of those pesky DVDs where the subs are intersecting the letterbox boundary :)

jsoto
22nd November 2005, 00:22
Also in multi-angle movies you can get 1 VOBID per chapter and 1 CELLIDs for each angle, i.e. the various angles would be in 1/1 1/2 1/3 Does not matter in your explanation, but... IIRC, different angles are different VideoObjects by definition, so they cannot share their VobID.
You can have different chapters in CellID and the different angles in the VobID, in example

Angle 1: 3/1 3/2 3/3
Angle 2: 4/1 4/2 4/3

File Layout: .... 3/1, 4/!, 3/2, 4/2, 3/3 , 4/3.....

jsoto

jeanl
22nd November 2005, 00:25
Sorry jsoto, I think you're right... I haven't looked at angles in a while, but I think you're correct...
Jeanl

jeanl
22nd November 2005, 09:15
Here's a new version: Beta 0.57 which you can find here (http://www.videohelp.com/~DVDSubEdit/)...
Beta .57
- Transparency is now supported.
- The display is scaled to reflect the format (NTCS/PAL)
- Subpics now move when the move subpic slider is used.
- Subpics can't move out of the picture.
- "Apply to all" now runs in a separate thread.

...
Still can't save, and still can't show the video underneath the subpic (but that's coming, I had to add transparency first!).

Jean

CoNS
22nd November 2005, 20:18
Hi jeanl,

Thanks for beta 0.57! However, when the program starts up there's still the large grey area at the top, until a vob is dragged and dropped?

jeanl
22nd November 2005, 21:56
CoNS, I haven't fixed that yet, it's not as easy as you might think!
I'm not forgetting your other feedback though, I'll put it in the next beta...
Jeanl

kumi
23rd November 2005, 01:14
Thanks jeanl. I have a few questions/comments:

1) The VOB scanning control always pops up next to the upper-right corner of the SubEdit window, with about 50% of it cut off. It would be good it the scanning status window was created somewhere on top of the SubEdit window, otherwise users with low desktop resolutions might not realize it's working.

2) I'm confused as to how changes are applied. Do they happen immediately after moving the slider(s)?

3) What does "Apply to/Revert all selected" refer to? The current SPU, or the current stream/VCID selection?

4) Is there a way to edit the position of ALL of the loaded SPUs, or do I have to edit manually, one-by-one?

jeanl
23rd November 2005, 02:03
kumi,
thanks for the feedback. Your questions indicate that the UI at this point isn't that intuitive... :( I was afraid of that. Any suggestions are welcome. Here are my answers:
1) CoNS also suggested to merge the scanning into the main window for resolution impaired users, I might have to do just that...
2) The changes happen as soon as you move the slider (only 1 slider is currently enabled), on the SPU that's currently viewed.
3) "Apply to all" is intended to apply the modification (currently the change in vertical position) to all the SPUs that are currently "selected" via the stream/VCID "filters", as you mentioned. I admit it's a bit counter intuitive.
4) Yes: select all streams and all VCIDs, the move the slider, then click "Apply to all".

My problem is that I'm trying to do 2 things:
- Allow the user to modify 1 SPU with visual feedback
- Allow the user to modify a bunch of SPUs at one time, a sort of batch mode
all using the same UI. This might be too hard to do simply.
Let me know if you have an idea on how to make the UI more intuitive with regards to the above.
Thanks in advance!
jeanl

kumi
23rd November 2005, 03:56
Just an idea, maybe it's doable:

Add an extra frame on the left of the program window (spanning the height of the window).
So, from top to bottom, the new frame would be separated into three sections: "Filter", "List", "Current subpic info":

Label: "Filter (currently nn SPUs)"
[drop-down: Streams] [drop-down: VCID]

Label: "List"
[button: Select all] [button: Unselect all]

column headers: "SPU#", "sx", "ex", "sy", "ey"
1 0 719 2 479)
.
.
.
99 0 719 2 479

[button: Apply changes][button: Revert to saved]

Label: "Current subpic info"
[Current subpic info window]


The "List" is a scrollable, multi-selectable (ctrl/shift-click) table of the currently filtered SPUs, with 4 columns: SPU# + the variables to be being modified. (displayed columns could be dynamically switched, depending on what slider the user is operating?)

On loading of VOBs, the table will populate with the SPUs of all of the streams and VCIDs selected by default. (I think that editing all of the subpics at once would be the most common action users of SubEdit will want.)

(You'll have to rename "Edit current subpic" section to "Edit selected subpics" to avoid confusion.)

Say the user wants to only shift upward the first 3 SPUs:
0) Load VOBs.
1) Click "unselect all" button.
2) shift-select the first 3 SPUs.
3) Adjust the position.
4) To reflect that changes will be made, the 3 SPUs now show "*" in front of the SPU number:
*1 0 719 2 441
*2 0 719 2 441
*3 0 719 2 441
4 0 719 2 479
5 0 719 2 479
etc...5) User clicks "Apply changes" button.

Obviously, this system wouldn't apply changes in vivo, but instead require users to commit by pressing "applying changes". I think it works better this way, Since you can modify multiple SPUs, preview them in the Video Frame, and then Apply if you're happy.

EDIT: Maybe for space-efficiency you could put the SPU table right below the video frame section of the window. Then move the sliders, controls and status stuff (including "Current subpic info") to a new section on the left of the program window. You could fit more columns in the SPU table this way.

jeanl
23rd November 2005, 20:25
Kumi, do you really want to be able to select individual SPU from a list? I think it's overkill... In my view:
- Either you select an entire stream, or a VCID
- Or you do it by hand (I might add a "repeat last modification" buttons to make that easier) on each individual SPU you want to change...

EDIT: Plus, in what you describe, which SPU is being displayed then? I suppose it would have to be shown in the list.

Jeanl

jeanl
24th November 2005, 00:01
New beta version of subedit: Beta 0.58 can be found here (http://www.videohelp.com/~DVDSubEdit/)...

SubEdit is not "functional". You can make changes, save back to file, and check whether it worked!!! There's no backup made for you, so be a bit careful...

Jean
P.S. @CoNS: no more gray window at startup, hopefully!

Beta .58
- Added OnPaint so the window is redrawn when needed.
- Added "SaveAll" button to save back to file.
- Added progress bar when doing "Apply to all", "Revert all" or "Save All".
- You can enter the number of pixels by which the subpic is to be moved.

CoNS
24th November 2005, 14:43
thankyouverymuchsir!

I can see that there's plenty of room right below the preview area for integrating the status indicator in the main window...! Also, even for the resolution impaired like me it would be ok if you expanded the height of the main window a bit to make room for the status indicator. ATM the main window doesn't fill out the desktop vertically even in 1024x768.

Another thing: You've inserted a limited so that the subtitles cannot move outside the video area. But even though the movement stops in the preview window at the top or bottom, the positioning value in the program can still be increased or decreased further? Also, what happens if the original subtitles have different heights or vertical positions, and you apply the edited position of one SPU (placed at the very limit at the top or bottom) to all SPUs?

Sometimes you'll encounter Subpics that use a larger (wider and taller) area than the subtitles themselves, right? (so that the rest of the area is transparent). In those (rare?!) cases it might be nice to be able to overrule the vertical limit if possible? (by unchecking an option for example)

About the UI suggestions by kumi: I know that Paddington has previously gone through many of the same considerations when making the "Manipulate SUP" tool in SubtitleCreator. You could maybe find inspiration for the UI by testing this tool...?

jeanl
24th November 2005, 17:31
Hi CoNS!
I'll see if I can put the status in the main window, but there's more stuff to come on that window, so let's wait a bit.
The limit on how much you can move the SPU is based on the subpic data itself, not on the area. It's "smart": it detects the topmost and bottommost pixel of the subpic, and makes sure these pixels are within the screen. This means that if you apply a very large value to all subpics, none of them will go outside the screen (because the limit changes on a SPU basis).
Subpics that use the full screen size are not rare at all! It's the converse that seems to be rare (at least to me). But as I said above, that does not matter since SubEdit looks inside the subpic data for the topmost pixel.

And I do intend to take a look at paddington's tool... Haven't had a chance yet...
jeanl

jeanl
24th November 2005, 22:05
I tried to install subtitle creator, but the install failed!!!
"The application failed to initialize properly. Click on OK to terminate"...
I don't have .net installed, is that why?
Jeanl

Jalavera
25th November 2005, 08:51
yes, you need .NET framework 1.1 to run SubtitleCreator

jeanl
27th November 2005, 07:50
New beta version of subedit: Beta 0.59 can be found here (http://www.videohelp.com/~DVDSubEdit/)...

Beta .59
- Added display of background video!
- The Scan progress dialog now remembers its position.
- Fixed a bug in the CLUT display.

Here's a screenshot, just for fun...

http://img495.imageshack.us/img495/7483/test3xz.png (http://imageshack.us)


jeanl
P.S. I'm not ignoring the UI issues, I'm letting it sit for a while, until I get a better handle on what the best way would be to expose the functionalities...
P.P.S: lots more to do, in particular the colorschemes for menu highlights (as of today, SubEdit isn't good at showing button highlights because button highlights are usually transparent by default until a button is selected).

jeanl
27th November 2005, 09:13
New beta version of subedit: Beta 0.60 can be found here (http://www.videohelp.com/~DVDSubEdit/)...

Beta .60
- Aspect ratio is now read from the video and the display actually reflects it.
- The SPU slider now tries to stay around the same location in the video when various subpic streams are selected.

Jeanl
P.S. note the bloating: SubEdit is now 77kB in size! :D

kumi
27th November 2005, 11:22
Wow! Video preview really makes my day. No bugs to report so far (I tweaked 5 of my DVDs that have wierd positioning.) Keep up the good work jeanl.

bourtzovlakas
27th November 2005, 11:44
Hi,
Great work...
I don 't know if this a bug, but when i "revert to saved" with "all streams" selected, only the first stream(0x20) is reverted...
The others remain changed/moved...

jeanl
27th November 2005, 17:18
@kumi, thanks for the good word...
@bourtzovlakas, that would have to be a bug! I'll investigate!
jeanl

jeanl
27th November 2005, 19:00
@bourtzovlakas I tried to reproduce the bug, but wasn't able to. Do you remember the steps? After you did "revert to saved", you could still see some SPUS with the green "modified" word in the info area?
jeanl

jeanl
27th November 2005, 19:04
By the way, I just found out that SubEdit already exists (there's a tool by that name, written by someone in eastern europe - looks really cool, but does not do the same thing as this subedit). I better change the name of my proggy. Any suggestion is welcom!
:)

jeanl

r0lZ
27th November 2005, 19:08
SubShrink! :D :D :D

bourtzovlakas
27th November 2005, 19:24
1)SubMod(ifier)
2)FixSub

ricardo.santos
27th November 2005, 19:59
as its a tool for dvd subs i suggest

DvdSubFix

GrofLuigi
28th November 2005, 00:55
EditSub ;)

GL

dirio49
28th November 2005, 01:01
i like SubShrink ;)

jeanl
28th November 2005, 02:02
you guys are a funny lot! ;)
jeanl

jeanl
28th November 2005, 02:07
New beta version of subedit: Beta 0.61 can be found here (http://www.videohelp.com/~DVDSubEdit/)...

Beta .61
- The vertical-move slider now reflects the last "move" operation carried out on the SPU. This makes it much easier to use.
- Improved the code that determines the top and bottom of the subpics (was returning the wrong values for "Final Fantasy".)
- Fixed a bug that caused the video to never display if the app came up with
"display video" unselected.
- Fixed a bug that caused the subpic display to overflow the video display at the bottom when the CLUT was ignored.

Enjoy...
Jeanl

jinjin_jp
28th November 2005, 13:43
I used with problematic VOB. It shows error message "Inconsistent data in subpic at LBA 452. Offset to commands end of SPU.".
Thanks very much.

jeanl
28th November 2005, 17:42
That should have read "offset to commands past end of SPU" :)
Jeanl.
P.S. It seems hard to me to make SubEdit robust to badly formed supics, because the parsing would have to be a bit smarter than it is...

mpucoder
28th November 2005, 18:14
If the SPU can display at all it means the offset to the commands is probably right. DVD players aren't likely to perform sanity checks on the commands. So the total length is probably what needs fixing, which shouldn't be too hard - just remember the length must be a multiple of 2.

Oh, yeah, my suggestion for a name - SpuMeister :)

jeanl
28th November 2005, 18:19
mpucoder, the offset to commands is actually wrong (otherwise, SubEdit would have parsed the commands OK). Thanks for the name suggestion! I'm still mulling over all the ideas (subshrink, really :) )
jeanl

kumi
28th November 2005, 21:05
SpudTool !

:goodpost:

CoNS
4th December 2005, 10:12
I've just tested beta 0.61. It's been a few versions since I last tested the tool, and OMFG ... it's becoming one mean killa app!

:thanks:

Some time ago you were worried about the GUI functionality. Well, don't worry anymore, it's very self explanatory as it is... Only, like all other DVD editing apps, you'd need to have some basic knowledge of how a DVD is structured in advance (DVD Shrink being the only exception, I guess!), but IMHO this is a small cost of having such advanced features.

You are soon ready to leave the beta stage, it seems?

Also, I just love that video preview feature that shows the video frame together with the current subpic. Though, I've noticed something strange: When VTS_xx_2.VOB (and VTS_xx_3.VOB and so on) is loaded separatedly, the first video frame is displayed as a black frame with weird subtitle colours. When the slider is moved to the next subpic, everything is fine, but the first subpic with corresponding frame is messed up?!

jeanl
4th December 2005, 17:12
I think I've noticed that, and I think it has something to do with the IFO not being loaded, and the CLUT being unknown yet. The display isn't refreshed again until you move the slider, so it remains like that. I'll take a look.
Now, tell me. What's the next feature I need to implement.
Easy:
- Change transparency for all pixels (don't know if it's really useful, except to hide subtitles)
Hard:
- colorscheme for buttons
- change subpic synchronization (that's the holy grail, but I'm not counting on it!).

jeanl
EDIT: I looked at the "bug" but there really isn't much I can do about it.. This happens when the first subpic pack appears before any navpack (this is why it only happens for "middle" vobs). In such cases, I'm missing two things:
- The previous I-Frame (so I can show it behind the subpic)
- The VCID for the vobu (I know, I could get it from the next navpack, but it might really have changed)!

The solution is to not load in-between vobs like that (load the entire vts) or deal with that first subpic...

CoNS
4th December 2005, 19:35
Now, tell me. What's the next feature I need to implement.- Display start and end times for the selected subpic.
- "Play" and "Pause" buttons for playing/pausing the video/subtitle preview.
- A "Load" button for those of us who don't like to drag and drop!
- Function to change which of the 16 colours from the CLUT to be used for the selected subpic. (so that I can give a certain subpic other colours than the rest etc.)
- Function to edit/save/import/export the CLUT.
- Rename "Subpic selection" in GUI, to "Subpic Stream Selection".
- Add an icon to the app!
- Change name to "SubpicEdit"!

Easy:
- Change transparency for all pixels (don't know if it's really useful, except to hide subtitles)It sure would be nice to be able to "delete" a single subpic this way.

I looked at the "bug" but there really isn't much I can do about it.. This happens when the first subpic pack appears before any navpack (this is why it only happens for "middle" vobs).I suspected it was because of something like that. But why are the subtitle colours messed up, too, for that first subpic?

jeanl
4th December 2005, 19:51
Because there's no CLUT (color lookup table). The CLUT is read from the IFO, but for that you have to know which PGC references the VCID you're looking at (and there might be several, but that's another story). So, if you don't know your VCID (cause you haven't found navpack), you don't know which CLUT to use, and all the pixels have not transparency (by default, I'm using opaque pixels when I can't find a CLUT, with predefined ugly colors!).

As for the rest of your list, thanks for the ideas. The one thing I don't understand is the "Play" and "Pause" buttons for playing/pausing the video/subtitle preview."
Or maybe I understand, but I fear it!
At this point, the one thing that SubEdit can't do is "play" the movie and display the subtitles at the right time. All it can do is display 1 subtitle with the corresponding video. That's quite different.
Ideally, I realize, you'd need to be able to play and display the subpics, to help you adjust the delay. BUT, for that you need SOUND! And dvd2avi can't do sound for now (it can when you save the file as an avi but not when you play it). So that's a major problem!
jeanl

CoNS
4th December 2005, 20:02
I understand about the sound... But since the preview function you made for PgcEdit can play the video smoothly (frame by frame with the correct framerate), I thought that it was possible in this tool, too. Would be a nice feature to have when locating a specific subpic in the middle of the movie.

Also, you could display the language of the various subpic streams (read from IFO file, just like the CLUT etc.). This would make it easier to identify the subpic streams.

r0lZ
5th December 2005, 10:45
Jean, I have also encountered a little problem.
When you move the subpic up, then apply the modif to all subpics, if per chance there is a subpic in the upper part of the video, it is moved up also, but in this case it should be moved down.
So, my suggestion is to add a function to constraint all subpics in a specific zone. Handy to move them up or down, so that they could be read when viewing an already letterboxed 4:3 movie on a 16:9 TV.

jeanl
5th December 2005, 17:43
Jean, I have also encountered a little problem.
When you move the subpic up, then apply the modif to all subpics, if per chance there is a subpic in the upper part of the video, it is moved up also, but in this case it should be moved down.
So, my suggestion is to add a function to constraint all subpics in a specific zone. Handy to move them up or down, so that they could be read when viewing an already letterboxed 4:3 movie on a 16:9 TV.
oh, I see what you mean. It should be moved down because you want it closer to the center of the screen. I see... Yes, that shouldn't be too hard to implement. Perhaps a tick box that says "Move relative to center of screen" or something a bit clearer!
jeanl

jeanl
5th December 2005, 17:45
I understand about the sound... But since the preview function you made for PgcEdit can play the video smoothly (frame by frame with the correct framerate), I thought that it was possible in this tool, too. Would be a nice feature to have when locating a specific subpic in the middle of the movie.

Yes, I can do the same thing in SubEdit, but what's hard is to have the subpic display at the right moment, as the movie is being played back. Hard but not impossible. But really, until I'm able to change the subpic delay, it isn't that crucial isit?

Also, you could display the language of the various subpic streams (read from IFO file, just like the CLUT etc.). This would make it easier to identify the subpic streams.
I thought about that. I'll look into it.
jeanl

tekman
10th December 2005, 10:47
Great work jeanl! I haven't been here for a month and when I come back a new tool has been written.

Tried it on my move-subtitle-project, "Ice Age" R2SE, and it worked directly with just, start -> drag&drop -> move -> apply all -> save all. Now I just have to try out on a complete DVD and try out how much overscan my TV has. An ey=563 was just some pixels to low to make it feel "right".

Suggestions on the GUI:
Perhaps two different GUI. One "quick" and one "expert". The "quick" GUI can stay the same for just moving subtitles and the "expert" can be used for the more advanced features and development (maybe even open source:-).

The "quick" GUI can translate/hide a lot of the details just like DVDShrink.
- Open DVD/DVD folder button.
- Show the names of available subtitle streams in the titles. Select one or all.
- Move and show pixels moved, top and bottom pixel position (sy, ey).
- Write changes.

Thanks again for your great work.

jeanl
10th December 2005, 17:50
You're welcome... I haven't worked on it for a little while (busy with FixVTS) but I intend to go back to it...
jeanl

CoNS
10th December 2005, 22:11
Jean, maybe it's time for a separate thread for the tool? (with a more exact title, which you can update with version number along the way)

jeanl
11th December 2005, 01:20
Yes, I need to change the name of the tool first! :D
jeanl

jeanl
14th December 2005, 18:57
New beta version of subedit (now DVDSubEdit):
Beta 0.62 can be found here (http://www.videohelp.com/~DVDSubEdit/)...

DVDSubEdit Beta .62
- The application is now called DVDSubEdit (I slightly altered ricardo.santos' suggestion here!).
- The subpic language is displayed in the stream selectiong drop-down. The display can change as you go through the SPUs as they might be referenced by different PGCs with different stream setups.
- When opening a "middle" vob in a vts (e.g. VTS_01_2.VOB), the first subpic was often displayed the wrong way (not CLUT
and no background video) because no navpack had been found prior to the subpic pack. DVDSubEdit now skips
the first subpic pack if no navpack can be found before it.
- Tried to improve (but didn't succeed entirely) the display of the first subpic (flickering etc).

I will make an official beta release in the near future and give it its own thread... NOTE: the url has been changed to ~DVDSubEdit.


Jeanl

dirio49
14th December 2005, 19:09
Thanks, Jean :)