Mounted in VLC media player a video shows 3 subtitle tracks: Disabled, English, English. In fact, the First English stream is silent (equal to disabled) while the second is Spanish. PgcEdit’s Domain Streams Attributes window shows two Subpic streams En and En. I changed the second to Es and that works fine. Ticking the Delete box to the right of the first Subpic gives warning: “Wrong # args: should be “winfo toplevel windowâ€. How is this message to be interpreted?. Is it possible to delete this superfluous stream?
How to delete superfluous subtitle ?
Collapse
X
-
The error message is a known bug. Just close the Domain Stream Attributes window, and retry. The second time, it will work.
But take care. "Empty" subtitle streams are sometimes used to disable the forced subtitles of the other streams. In other words, you may have to select that dummy subtitle stream to get rid of the forced subtitles. So, if you delete the first subtitle track, you may be unable to watch the movie without some subtitles.
Also, deleting unused subtitles may be dangerous if there are subsequent subtitles streams in the list (as in your case), as they will not have the original stream number any more, and a wrong subtitle stream may be selected automatically, or manually via the Subtitles menu. If you delete it anyway, you may have to fix the SetSTN commands yourself, and that's not always easy. -
Many thanks for your reply and the warning. I verified in DVDSubEdit that the first subtitle stream is not forced (selecting “Only show forced subpics” blanked out the screen). Could I now go ahead and delete this stream in PgcEdit – or are there other possible concerns ? Is the stream actually deleted or just hidden (I seem to remember that subtitles are addressed by their numbers like command buttons).
I wonder if a reference source exists where VM commands are explained ? For example, I have a pre-command: Set gprm(2) &=(and) 0x004F (preserve bits 0-3, 6)Comment
-
Many thanks for your reply and the warning. I verified in DVDSubEdit that the first subtitle stream is not forced (selecting â€ÂœOnly show forced subpicsâ€Â blanked out the screen). Could I now go ahead and delete this stream in PgcEdit â€Â“ or are there other possible concerns ?
If you want to remove the stream from the VOB and the reference from the IFO at the same time, use DVDShrink. To be sure that the stream can safely be remapped (and therefore the gap at the first stream position removed), use the DVDShrink plugin for PgcEdit. It has the option "Check Streams Remapping safety". It will tell you if you can turn on the "logical remapping of enabled streams" option of DVDShrink. If it says that it is safe to turn it on, you are lucky, and DVDShrink will fix the SetSTN commands automatically. If the plugin suggests to leave it off, that means that there are indirect SetSTN commands, and you can turn the flag on anyway but you will have to fix the VM commands yourself. If you don't know how to do it, leave the option off, and the empty stream will not be removed from the IFO (but will be removed from the VOBs).
And yes, the streams are referenced by their number. But there are two numbers. The number of the stream that is used by the SetSTN command is the number of the stream as it appears in the Domaiun Stream Attributes window. The first stream is stream #0. So, if you remove it, the second stream will become stream #0, and the third stream #1. Of course, the SetSTN command that sets, for example, the original second stream (and use #1), will set the third stream after the change. Hence the problem.
The other stream number is the stream ID used in the PGC. It references directly the stream in the VOB file, and should never be changed.
BTW, that's difficult to explain, because the official DVD specs use the name "stream" to designate two different things. So, the next version of PgcEdit will use the muxman terminology. The first concept will be called "track" instead of "stream". Therefore, Domain Streams Attribules will be Domain Tracks Attributes, and the SetSTN commands will change the tracks numbers. The physical streams in the VOBs will still be called streams.
Last edited by r0lZ; 14 Jun 2011, 02:23 AM.Comment
-
Thanks very much for the information. I checked out a video whose subtitles menu lists 9 languages. However, right-clicking on the video revealed 9 more unattributed streams. I hid 7 of the language buttons in PgcEdit, leaving just French and Spanish. The DVDShrink Plugin gave the go-ahead to set the “logical remapping of enabled streams” flag (no indirect SetSTN). Unfortunately the result was that pressing the Spanish button in the Subtitles menu now shows French subtitles! Right-clicking on the video reveals French, Spanish + two blank streams; the latter are in fact Spanish subtitles. Just as the original 9 assigned streams had an equal number of unassigned “ghosts”, now the two attributed streams have an equal number of ghosts.
It seems to me that trying to edit subtitles opens a can of worms. Perhaps one needs to go the whole hog and demux/remux ?Comment
-
When you use DVD Shrink to remove the streams, do not hide them with PgcEdit before, as that will confuse it. (Use PgcEdit's DVDShrink plugin only to see if you can set the logical remapping flag.) DVDShrink will shift the streams automatically for you and remove the "ghosts" if the logical remapping flag is and can be set, or it will only only remove the streams from the VOBs. In the latter case, it is possible to remove the "ghosts" manually with PgcEdit after the Shrink pass, but that requires some knowledge, as you will have to fix the SetSTN commands.
Demuxing and remuxing will not solve your problem, as the mess in the "track" numbers in the IFOs and the related SetSTN commands, not in the streams IDs in the VOBs.Comment
-
Many thanks for your reply. I have confirmed my finding re DVDShrink with another video – a much simpler one whose Root menu gives just two options: 1- English audio with Spanish subtitles, 2-Spanish without subtitles. Selecting Spanish from the menu confirms no subtitles. However, right-clicking on the video lists two subtitle tracks – 1-English and 2-Spanish, with English selected (not Deactivate). After deselecting the English subtitle in DVDShrink (no indirect SetSTNs nor forced subtitles, subtitles not touched in PgcEdit), the Spanish audio option again gave the expected result. However, right-clicking listed 1-Spanish, 2-Blank tracks with Deactivate selected. Selecting 1-Spanish gives blank (empty), while 2-Blank gives Spanish subtitles.
On the basis of this experience I plan basically on not using DVDShrink and so keeping the original subtitle tracks. However, for those tracks which show an attributed language but in fact are empty, I would like ideally to show them unattributed. The ISO639 language codes don’t seem to provide for this – is there any way of doing this ?
The alternative you mention is to not activate the re-mapping flag in DVDShrink, but to edit the SetSTN commands in PgcEdit. Is there a discussion of this somewhere?Comment
-
You can erase the language code in PgcEdit, to make that track "unspecified". However, the behaviour of the players with blank language code is not always coherent, so IMO it is better to assign a language code that you have no chance to see on your DVDs, such as "zu" for Zulu.
There is no guide on how to modify the indirect SetSTN commands, simply because what you have to do depends of the authoring of the DVD. When all SetSTN commands are "direct", they set the stream number directly. For example, (SetSTN) Set Audio track = 1 ; Set Sub-picture track = 0, off is a direct command that sets streams #1 and #0. Indirect SetSTN commands set the streams to the number stored in a GPRM. For example, (SetSTN) Set Audio track = gprm(5) ; Set Sub-picture track = gprm(6) sets the audio track to the number stored in GPRM 5, and the subpicture track to the number stored in GPRM 6. It is easy to edit the direct commands, as you just have to adapt the stream number to the new numbering scheme. It's what DVDShrink can do automatically when "logical remapping of enabled stream" is on. But is is much more difficult to fix the indirect commands, as you will have to change the command that puts the stream number in the GPRM, and that command can be anywhere in the DVD. Also, sometimes, the stream number is copied from another GPRM, so you have to search for that other GPRM too. You can easily imagine the problem.
The basic method to fix the indirect SetSTN commands is this:
Search for the SetSTN commands in the whole DVD. If you are lucky, you will notice that the same GPRM is always used to hold the audio track number, and another one to hold the subtitle track number. Let's assume that you want to change only the subtitle stream numbers, and that it is stored in GPRM 6. Start the trace mode, and open the Watch Registers window. Click on the GPRM number 6 in the watch window (on the "6", not on the button that shows its content). It will turn red. That means that the trace will stop automatically each time the value stored in GPRM 6 is changed by a command. Now, start the trace. When the value change, examine carefully the new value. It will be used later by the SetSTN command to set that stream. Note that for subtitle streams, 0x40 (decimal 64) is added to the stream number to tell the player that the stream is turned on. So, if the value is, say, 65, that means that subpic stream #1 will be turned on, and if it is 1, that means that stream #1 will be made "current", but off (not active, except for forced subtitles). So, to change subpic #1, on to subpic #0, on, change the value 65 to 64. But take care: examine the whole DVD before changing anything (and make a backup of the IFOs first), as the command may change the subpic stream for another title than the main movie. If there is only one movie, or several movies with the same streams, it is usually safe to change all occurrences of the GPRM that holds the subtitle stream value.
Note also that you will probably encounter a PGC (usually executed before the main menu) that initialise the GPRMs based on your preferences. It looks like this:
Code:[61 00 00 00 00 92 00 00] 7 Set gprm(0) =(mov) sprm(18:Preferred sub-picture language) [71 A0 00 06 00 40 65 6E] 8 if ( gprm(0) == 25966 ("en") ) then { Set gprm(6) =(mov) 64 } [71 A0 00 06 00 41 66 72] 9 if ( gprm(0) == 26226 ("fr") ) then { Set gprm(6) =(mov) 65 }
Sorry if my explanation is not very clear, but it is difficult to explain something that changes completely in each DVD!Last edited by r0lZ; 17 Jun 2011, 07:00 AM.Comment
-
I much appreciate your detailed reply and advice.
As regards the problem of indirect SetSTN commands, I have done some tracing of these settings by searching for “[41”. I understand the potential hazard where the DVD has more than one Title and where the menu options are not uniform. But I don’t understand why in the case of Direct SetSTN commands I haven’t been able to get DVDShrink to operate as it presumably should.
What in fact causes the “ghosting” problem in the remote (absent in PgcEdit and DVDShrink)?
Re the use of SPRM 18; either a given subpic is turned on or is off (whatever the preferred subpic might be), as set in SPRM2. So it seems to me that SPRM18’s use is for forced subtitles – would that be correct?
You mentioned earlier the numbering problem due to the ambiguous use of “streams”. The numbering of subtitle tracks in the Domain Stream Attributes window (e.g. 0 to 8), seems to be the same as the stream IDs in the top right area of the PGC Editor.Comment
-
If there are ONLY direct SetSTN commands, you should set the DVDShrink logical remapping option, then untick the streams you don't want. I have never had problem.
Of course, if there is one or more indirect SetSTN, you cannot set the flag, and the deleted streams will remain as "gaps" in the streams list. Unfortunately, some players do not like these gaps. Maybe it's the source of the "ghosting" problem you are talking about. I have never had such players, but I know that they do not allow you to change a specific stream to another one if there is a gap between them. This happens only when the stream is changed directly with the remote, when the movie is playing. Normally, the language menus should continue to work normally. To get rid of that problem, you can duplicate the references of an existing stream to fill the gap with the copy. You have to do it in all PGCs, and in Domain Streams Attributes. The other solution is to remove the gap with PgcEdit, and fix the VM commands yourself. Much more difficult in some cases.
SPRM 18 holds the preference of the user, as a two character language code (en, fr, es..). That SPRM cannot change when a DVD is playing, but only when you change the Subtitle language in the setup menu of the player. It is often checked by the DVD to set the default subtitle track automatically. SPRM 2 holds the current subtitle track number that has been set either by a SetSTN command, or manually with the remote when a title is playing.
It is not rare that the tracks numbers in Domain Track Attributes and the stream numbers in the PGCs are equal, especially for the audio streams. But it's not an obligation. In particular, after having removed some streams with DVDShrink and its logical remapping option, they will not be equal anymore. Also, 16:9 movies can have two (and even 3) variants of the same subtitle stream, one (or two) for the 4:3 TV, and one for the 16:9 TV. The subpic stream number in the PGCs must be different for the two streams, but they share the same entry in Domain Track Attributes. (It's why there are 4 stream numbers per entries in the PGC. The first one is used only for 4:3 movies, and the 3 other ones, for the various display modes of 16:9 movies.)Last edited by r0lZ; 18 Jun 2011, 11:43 PM.Comment
-
Many thanks for your reply. I have been reflecting on the lessons to be drawn from all this. I remain puzzled as to why I have these gaps when a priori with only direct SetSTN commands they shouldn’t appear. In any case, as you mention, one solution is to remove them with PgcEdit and then edit the VM commands. Hence a need to become more acquainted with VM language. It seems to me that editors are now providing subtitles in many more languages than before.Comment
Comment