Log in

View Full Version : Possible w/ PgcEdit?


EpheMeroN
4th January 2007, 22:34
Using PgcEdit, can I change which audio stream starts by default with the main movie on a dvd? If yes, is there a tutorial somewhere?

Also, is http://download.videohelp.com/r0lZ/pgcedit/third_party/2cool/subtitles/subtitles_on_default_pgcedit.htm still the recommended way to turn subs on/off in PgcEdit?

BigCondor
4th January 2007, 23:43
I have a lot of experience in that. Every DVD is differently mastered so I think there is no single solution to that. It all depends on how the DVD itself manages the stuff. You try out your option, monitors it in trace mode, and see if it works. If you see some commands halfway changes the subtitles then you have to find a way to skip it or a workaround. Sometimes you need to use the skill of the DVD itself for the setting.
Sometimes it is not an easy task but I can assure you, you will learn a lot from it.

r0lZ
5th January 2007, 00:09
IMO, the guide well. But the method has some drawbacks.
Since the pre-commands of the main title are modified, that means that the audio and/or subpic stream you have forced with the SetSTN command will always be selected when you enter the title, regardless of the setup made via the audio and subtitles menu.
It is also possible (but not certain) that it will work fine for the main title, but the original streams will be selected again when you play a bonus (unless you apply the same method on all titles of the DVD.)


Another powerful, semi-automatic method to force your preferred streams is to use the Jump To PGC Upon DVD Insert function. This function is primarily designed to skip the annoying stuff at the beginning of the DVD and to jump directly to the main menu or the movie, but it can be used also to setup your preferences exactly like you want.

Here is what you have to do:
Select the PGC you want to jump to at the beginning and set a pre/post breakpoint.
Go to trace mode, and be sure to restart it (with the button with the insert/eject DVD icon.)
Normally, you must run the trace until it stops automatically at the breakpoint. But in this case, you have to continue the trace and navigate to your audio and/or subtitles menus, and select the streams you want, exactly like with a real player. Then, continue to trace to the breakpoint.
Apply the Jump2PGC function.
The result of that method is that you will jump to your target PGC immediately when you insert the DVD, and your preferred streams will be pre-selected. The advantage of this method is that the streams have been selected the standard way, and you can continue to use the audio/subtitles menus if you want to select another language or the director comments. The menus will still work normally.

See this guide (http://download.videohelp.com/r0lZ/pgcedit/third_party/blutach/How_to_use_PgcEdit_new_macro.htm) for an explanation of the Jump2PGC method.

jsoto
5th January 2007, 01:49
Another powerful, semi-automatic method to force your preferred streams is to use the Jump To PGC Upon DVD Insert function. Semiautomatic? This is one of the most elaborated and automated thing I've seen.
Even a completely newby, w/o any knowledge of VM commands can use it. It is really fantastic. I use it always, even if the starting PGC is already the one I want. This is because in many DVDs the player has to jump between the different VTSs with warnings, logos (blanked or playback killed), and this jumps take some time in my old settop (you can hear the laser head going inwards and outwards looking for the VTSs...
Amazing function, r0lZ.

jsoto

BigCondor
5th January 2007, 03:59
Here are some notes of some DVDs I had done.
Case 1
I found this:
(SetSTN) Set Sub-picture stream = 0, on
so I change it to
(SetSTN) Set Sub-picture stream = 1, on
Then I trace from the beginning, but the stream switched back to 0
then I found:
(SetSTN) Set Audio stream = gprm(11) ; Set Sub-picture stream = gprm(10)
and the value of gprm(10) is 64
so I search again and found
Set gprm(11) =(mov) 0
Set gprm(10) =(mov) 64
and I change the last line to Set gprm(10) =(mov) 65 and everything is fine.

Case 2
I found this:
Set gprm(2) =(mov) sprm(2:Sub-picture stream number)
The program is getting the sub-picture stream from sprm(2)
so I placed this line before this line:
(SetSTN) Set Sub-picture stream = 2, on
then my sub will be preferred.

Case 3
I found these:
Set gprm(13) =(mov) 0
Set gprm(1) =(mov) sprm(18:Preferred sub-picture language)
if ( gprm(1) == 25971 ("es") ) then { Set gprm(13) =(mov) 65 }
if ( gprm(1) == 26226 ("fr") ) then { Set gprm(13) =(mov) 66 }
in this case, which is quite general, the program get the sub-picture from the player, so I added:
if ( gprm(1) == 31336 ("zh") ) then { Set gprm(13) =(mov) 67 } to add the Chinese option.

Case 4
Set gprm(2) =(mov) sprm(2:Sub-picture stream number)
Set gprm(2) &=(and) 67
It is very common to do masks to reject invalid value, in this case, if your stream is 68 then it will be masked off. We have to watch carefully for its occurance.

Case 5
A DVD with English, French and Spanish audios and menus, so by default:
(SetSTN) Set Audio stream = 0 ; Set Sub-picture stream = 0, off
the subtitle is off. So simply change that line, but...there were several more similar line, so I had to search and all of them.

Case 6
Set gprm(8) =(mov) sprm(18:Preferred sub-picture language)
Set gprm(0) =(mov) 26226 ("fr")
if ( gprm(8) == gprm(0) ) then { (SetSTN) Set Sub-picture stream = 1, off }
that's another way of getting the player sub-picture language, so I added:
Set gprm(0) =(mov) 31336 ("zh")
if ( gprm(8) == gprm(0) ) then { (SetSTN) Set Sub-picture stream = 2, on }
to turn on the Chinese subtitle.

Doing all these are time cosuming but very interesting. Thanks r0lZ for his PgcEdit to make these come true. At times I will do a direct jump when I think it is more appropriate.

r0lZ
5th January 2007, 07:09
Semiautomatic? This is one of the most elaborated and automated thing I've seen.
:thanks:
I said it's semi-automatic because the user has to trace to the target. It's not as easy as selecting the target and pressing a button. But you're right. I am proud of this function!

Take care however, there is a little drawback. If your DVD analyses the SPRMs to know which default language should be used and you bypass that code, the DVD will lose its intelligence. It will initialize the same default language regardless of the configuration of the player. It's exactly what EpheMeroN wants, so I didn't mention this limitation in my previous post, but in some cases it's a serious problem.

r0lZ
5th January 2007, 07:25
@BigCondor
Well done!

A few notes:
In Case 2, it is probably easier to change the original SetSTN command to (SetSTN) Set Sub-picture stream = 2, on.

Also, note that sometimes, you cannot change all SetSTN commands in the whole DVD without caution. If there are different audio/subpic streams assignments in the titlesets, you cannot assume that the same value must be used everywhere.
My method to change the subpic assignments is to search for the SetSTN commands using the trace mode. I set a breakpoint on the SetSTN commands (via Break at log output) and I start the trace. If, during the trace, an indirect SetSTN is encountered, I add a break on the GPRM that is used, and I restart the trace. Finally, I change the values during the last trace.
I verify also if the right streams are selected when I play the bonus, and if it's not the case, I repeat the procedure.
Although it's time consuming, it's the best method I've found so far.

BigCondor
5th January 2007, 07:48
@rolZ
Thanks!

In case 2, there were no SetSTN command before that line so I added this to initialize the register.
My before that line doesn't mean the previous line but somewhere before that, usually an appropriate place.

You've point out something I have always overlooked:- the extras. We don't care much about the extras and in fact most likely they will be thrown away. The line in case 5 certainly belongs to the extra titles.

But as I have said, it is very interesting and the job tends to get easier as experience grows.