View Full Version : Turning Subtitles (On/Off) by Default Guide
meRobs
1st January 2011, 07:32
Thanks.
Can I assume then that if the only subPic track is turned ON via STN and there is no audio/subpic/language menu, then the set subpic track will always be on (visible).
r0lZ
1st January 2011, 12:45
Having a value for not set (by the user) eliminates the need for using a GPRM to remember that. The same for choosing forced only. Some movies have forced subs that are not language related, BOV's are one example. The setup menu can have choices for subs like English, Spanish, or follow the rabbit. Setting the SPRM to 63 indicates an explicit choice of forced, and the on/off feature of the remote, if present, does nothing. If instead you use stream 0/off you will get the forced subs, but if the remote has a subs on/off button it will work.
That's what I wanted to know. Thanks!
The only time a player's firmware should make a choice of audio or subpic for a title is when SPRM 1 == 15 or SPRM 2 == 62. The choices should be based on SPRM 16, 17, 18, and 19, although most players I have will choose an audio track but leave subs off. If there is no matching audio or sub stream the first one listed is supposed to be the default.
IIRC, my old Sony player selects the audio and subpic automatically. It's why I have programmed that in the trace. But since you say that "most players I have will choose an audio track but leave subs off", maybe I will change that to leave the first subpic/off. Or I'll add an option in the trace setup to tell the trace if the player can select the subpic automatically or not.
The player always chooses audio and subs for menus by deciding which language unit to use, which should be based on SPRM 0. If there is no matching language "unspecified" is the default.
I did not know that "unspecified" is the default. I have assumed that it's always the first LU. I'll change that too. Thanks also for this!
Stream 63 should be called simply "forced" not "force subpic 0"
I'll change that too.
"Stream" is an overused word in the specifications and in most software related to DVD. The SetSTN command actually is talking about tracks.
Seems logical, yes. But where exactly should "track" be used? In the SetSTN command, and in VTSI_MAT (called Domain Stream Attributes in PgcEdit, but that should be renamed Domain Track Attributes), but not in the table of streams in the PGC, since it maps the tracks to the real streams, right?
btw, if there are forced subpictures in a thread (video, audio, and subpictures from one angle of one story multiplexed together form a thread) every subpic stream must have matching forced subpics in them. The forced subpics do not have to have the same graphic, but they must have the same timing.
I don't understand why. Only one subpic stream is active during playback (depending of the current track and the display mode), so why is it necessary to sync the forced subpics with the other streams? Anyway, that's not important for PgcEdit, but if I understand correctly, that means that it is dangerous to change the timings of forced subpics with DVDSubEdit, unless exactly the same modification is made in the other streams as well. Right? Or is it necessary only in case of multi-angle?
r0lZ
1st January 2011, 13:27
Thanks.
Can I assume then that if the only subPic track is turned ON via STN and there is no audio/subpic/language menu, then the set subpic track will always be on (visible).
Usually, yes, but it's not the presence of the language menu that matters. A DVD without a language menu can change the current subpic with a SetSTN command, without giving to the user a chance to decide which subpic language to display. So, you should add a SetSTN command yourself only if the original DVD does not contain already a SetSTN command, or if that command is not executed before the playback of the title, or if you want to overwrite it with your own selection. (In the latter case, you must be sure that your command is executed after the original SetSTN, and, of course, before the playback of the title begins.)
BTW, here is an example of the code I use when I re-author a DVD with several audio and subpic tracks. I assume that GPRM 15 is unused or can be used to store temporary values.
The code assumes also that the language of the first audio and subpic tracks is the default (the original language of the movie, English for example), and that the second one is a foreign language (in my example, French, my native language).
The first line selects by default the first audio track, and turns the subpics off.
Lines 2 to 6 check if the user has specified that he wants the French audio track, and if it's the case, it selects the second audio, and changes also the subpic track, but leave it off, so that only the French forced subpics are displayed, and so that the user will be able to turn on or off the French subtitles with the subtitle on/off button of the remote (unfortunately rarely present). The Goto in line 5 skips the selection of the subpic, as usually, you don't need to see the (non-forced) French subtitles if the French audio has been selected.
The last lines are executed only if the user has not specified French as his preferred audio. The current audio is therefore still the default audio track (English). The preferred subpic language is checked, and if it is French, then the corresponding subpic track is turned on.
Of course, that code must be expanded if more audio and/or subpic languages are present, but usually, when I re-author a DVD, I keep only the original language and French.
[51 00 00 80 80 00 00 00] 1 (SetSTN) Set Audio stream = 0 ; Set Sub-picture stream = 0, off
[61 00 00 0F 00 90 00 00] 2 Set gprm(15) =(mov) sprm(16:Preferred audio language)
[00 B1 00 0F 66 72 00 06] 3 if ( gprm(15) != 26226 ("fr") ) then { Goto line 6 }
[51 00 00 81 81 00 00 00] 4 (SetSTN) Set Audio stream = 1 ; Set Sub-picture stream = 1, off
[00 01 00 00 00 00 00 0A] 5 Goto line 10
[00 00 00 00 00 00 00 00] 6 NOP
[61 00 00 0F 00 92 00 00] 7 Set gprm(15) =(mov) sprm(18:Preferred sub-picture language)
[00 B1 00 0F 66 72 00 0A] 8 if ( gprm(15) != 26226 ("fr") ) then { Goto line 10 }
[51 00 00 00 C1 00 00 00] 9 (SetSTN) Set Sub-picture stream = 1, on
[00 00 00 00 00 00 00 00] 10 NOP
Note that currently, it's a similar logic that is used by the trace mode to select automatically the right audio and subpic tracks when they are still "not set" (values 15 and 62, respectively) when a title is played. But maybe I will remove the code that selects the subpic track, if it is confirmed that most players do not select the subpic track automatically.
mpucoder
1st January 2011, 15:06
The use of "track" - yes, that is where I believe it should be used and I think you're seeing what I mean by "stream" being overused, but that is the way the spec was written as well. To me (and MuxMan) a track is a collection of related streams that the player chooses from based on display mode. So anywhere that the streams are referenced as a group I call it a track. But that is not in the spec, I started using it to distinguish between a group and a single stream. I first became aware of the problem in terminology while reading the description of the table in a PGC that describes "the streams that make up the stream". Seemed like double-talk, probably due to the bad interpretation from the original Japanese, or just poor terminology to begin with (they could use a clear glossary like ISO standards all have).
I wrote that last bit while very tired. Not all forced subs need matching subpics in the other streams, just those with buttons. This is because they have timing information in the PCI for the buttons, and requiring all streams to have a subpic at that time simplifies player design. So when you play a movie like "The Matrix" without following the rabbit there are transparent subpics being displayed when the rabbit would appear. If the DVD is authored badly you could press the button at that time and it would jump to the extras (because the highlight information in the PCI is not conditional). Some time ago I wrote this (http://mpucoder.com/Muxman/mxp/bovcmd.shtml) example of how to handle BOVs.
r0lZ
1st January 2011, 15:24
I have tried (in PgcEdit and in the forums) to always use "VOB stream" to designate the real, physical streams, and simply "stream" to designate the tracks. But I agree that your terminology is better. I'm still not sure I will change the terminology in PgcEdit, as that will change the habits of the PgcEdit users, and I will need to modify many dialogs, and I can forget some of them.
Your explanation of the matching subpics for buttons makes sense. Thanks again! (Your example link doesn't work: ERR_CONNECTION_RESET. Site down?)
I was tired yesterday too! BTW, Happy New Year!
mpucoder
1st January 2011, 15:57
I just tried the link from my phone and it is working (can't tell if there are network problems from this PC as it is on the same LAN as the server) - maybe just a temporary glitch somewhere.
Yes - Happy New year everyone (prospero ano y filicidad)
r0lZ
1st January 2011, 16:06
I doesn't work for me. Anyway, I don't need it. I've understood your explanation.
r0lZ
2nd January 2011, 11:22
The link works today. :-) Very cleaver use of & to test a GPRM flag!
But I wonder something. You say "If GPRM0 (in this example) is zero neither the Mov or LinkTailPGC will be performed, causing the button to be ignored." Of course, if the test is not true, the command does nothing, but it is executed anyway. In my experience, a button command (even a NOP) has always (at least with my players) an effect, and is therefore not totally inactive when it is activated with the remote, even when no jumps are executed. With most players, there is a slight pause when the user presses the button. Some players do not display the button highlight any more after having pressed it (and you must wait until the menu loops back to see the highlight again), and some players hang completely. So, IMO, that command is dangerous. But maybe the tests I did were using badly authored buttons (at least for that purpose). IIRC, they were authored as a single button set, and that can explain why the highlight was not refreshed. Any comment?
r0lZ
2nd January 2011, 11:33
Is it best to set the SubPic to 0 with 'on" checked or to "Force subpic 0" on the STN panel. The former gives "0 On" in Trace and the latter gives "31 On" ??
Thanks
The "31 On" displayed in PgcEdit trace mode is a bug! I have just fixed it. It displays now "63: Forced".
BTW, mpucoder, in PgcEdit, the command SetSTN 63: forced generates the following hex code: "51 00 00 00 FF 00 00 00". Bit 7 of the track value (in byte 4) must be set to enable the modification of the subpic track number, but I don't know if bit 6 (the On flag) must also be set. In other words, does it make sense to SetSTN 63: forced, On, and perhaps SetSTN 63: forced, Off?
I don't remember why I have added the On bit, but there must be a reason. (For SetSTN 62: not set, the On bit is not set, and the code is therefore "51 00 00 00 BE 00 00 00".)
meRobs
2nd January 2011, 11:45
Thanks rOlZ for fixing that.
Before downloading the newer version, I will wait until this discussion helps me decide whether I should Force my only SubPic stream rather than just Set it ON.
r0lZ
2nd January 2011, 12:01
The new version is not available yet. I will announce it in the main PgcEdit thread when it will be ready.
You should simply use SetSTN 0, On. Forced subpics need to be specifically authored, so unless you change them with DVDSubEdit, there is no reason to use the forced mode. (Plus: forced subpics are difficult to hide. If you still want to be able to turn the subpics off with the remote, do not use forced subpics!)
r0lZ
2nd January 2011, 14:09
But I agree that your terminology is better. I'm still not sure I will change the terminology in PgcEdit, as that will change the habits of the PgcEdit users, and I will need to modify many dialogs, and I can forget some of them.
I have changed the terminology (stream to track). That was not so difficult for me :), but the authors of the PgcEdit documentation and the translators will have much work than me. Sorry to them for that new year gift! :(
mpucoder
2nd January 2011, 15:10
BTW, mpucoder, in PgcEdit, the command SetSTN 63: forced generates the following hex code: "51 00 00 00 FF 00 00 00". Bit 7 of the track value (in byte 4) must be set to enable the modification of the subpic track number, but I don't know if bit 6 (the On flag) must also be set. In other words, does it make sense to SetSTN 63: forced, On, and perhaps SetSTN 63: forced, Off?
Although the "on" bit for stream 63 should be ignored I don't know any reason to set it.
r0lZ
2nd January 2011, 15:46
So, the correct command in hex is "51 00 00 00 BF 00 00 00"?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.