I just added an Spanish audio to a DVD successfully. My main problem is when you play the DVD it gives you a choice of 2 languages: English and French.
I want to make those 2 buttons redirect to the Spanish custom audio with PGCEdit, but I don't understand very well how to do it.
(I think this is the correct VMGM)
The English audio is 0, Spanish 1 and French 2. I swap between Spanish and French to make the French button play the Spanish audio. But I prefer both redirecting to the Spanish audio from that initial audio selection.VMGM , LU 1 (--) , 2 (0:00) 2b. - Chapters: n/a, Programs: 1, Cells: 1
********** pre commands:
1 Set gprm(0) =(mov) 0
2 Set gprm(1) =(mov) 0
3 Set gprm(2) =(mov) 0
4 Set gprm(3) =(mov) 0
5 Set gprm(4) =(mov) 0
6 Set gprm(5) =(mov) 0
7 Set gprm(6) =(mov) 0
8 Set gprm(7) =(mov) 0
9 Set gprm(8) =(mov) 0
10 Set gprm(9) =(mov) 0
11 Set gprm(10) =(mov) 0
12 Set gprm(14) =(mov) 0
13 Set gprm(15) =(mov) 0
14 (SetHL_BTN) Set Highlighted Button =(mov) 1024 (button 1)
15 Set gprm(14) =(mov) sprm(16:Preferred audio language)
16 if ( gprm(14) != 26226 ("fr") ) then { Goto line 18 }
17 (SetHL_BTN) Set Highlighted Button =(mov) 2048 (button 2)
18 NOP
********** post commands:
1 Set gprm(14) =(mov) sprm(8:Highlighted button number)
2 Set gprm(14) /=(div) 1024
3 Set gprm(10) =(mov) gprm(14)
4 if ( gprm(14) == 2 ) then { Goto line 8 }
5 Set gprm(2) =(mov) 0
6 Set gprm(3) =(mov) 0
7 Goto line 10
8 Set gprm(2) =(mov) 1
9 Set gprm(3) =(mov) 2
10 Set gprm(6) =(mov) 1
11 LinkPGCN PGC 3
********** cell commands:
Also, how to skip that screen with PGCEDit? Would be OK making Spanish default and after inserting the DVD just going to the menu directly w/o going to that language selection screen. That could be more easy, but anyway would be to good know both ways.
P.S.: I've attached the IFO backup if the provided VMGM is not the correct.
+ Reply to Thread
Results 1 to 16 of 16
Thread
-
Last edited by Jorchking; 27th Mar 2022 at 03:20.
-
The audio (and subtitle) is set by SetSTN. It can't be used in VMGM but is restricted to the VTS domain.
You could set it in the pre-command to the movie(s) like this:
[Attachment 64028 - Click to enlarge]
and select the audio track:
[Attachment 64029 - Click to enlarge] -
-
-
Building up on this idea, you can make the menu buttons write a value to a suitable GPRM and then read out this GPRM in the pre-commands of the movie to play the correct language via some simple code logic.
For example.
[English button activated]
Set gprm(x) = (mov) 1234
etc...
[French button activated]
Set gprm(x) = (mov) 5678
etc...
[Pre-commands of the PGC]
(SetSTN) Set Audio Stream = 1 #default to Spanish
If ( gprm(x) != 1234 ) then { Goto line x } #execute the next line only if English was selected
(SetSTN) Set Audio Stream = 0 #Switch to EnglishLast edited by Skiller; 27th Mar 2022 at 18:56.
-
Last edited by Donnje; 2nd Dec 2022 at 14:39.
-
How do you check if it works?
Do not rely on VLC-Player, it does whatever it wants with DVDs. -
I was suspecting this might be the issue because the code is correct and does what you want.
PowerDVD is the only software player that behaves correct in regards to obeying almost all of the commands possible on DVD. Only downside is it's not free. MPC (Media Player Classic) is not as good but a million times better than VLC for DVD.
But sometimes it's also a good idea to burn to a rewriteable media and test on an actual hardware player. At least once, when you think you are done. -
-
There is no need to create an ISO.
Since you want audio stream 1 (French) to be the default at all times, you can just add a new command line of (SetSTN) Set Audio stream = 1 as the very first line in the pre-commands section of all four titles (yes, it needs to be done for each). Change all the other original SetSTN commands into NOPs.Last edited by Skiller; 3rd Dec 2022 at 19:10.
-
I entered for all the titles, but I didn't understand how and if I have to add a new line, this is the situation
sorry for my bad English
[Attachment 67969 - Click to enlarge] -
Click on the first line (1), then click on "Add before".
There is now a new line at the top that says NOP.
Click on "Edit Cmd" and then Alphabetically -> SetSTN.
First line must say (SetSTN) Set Audio stream = 1
Click on all original SetSTN lines (except the ones for the subtitles) and turn them into NOPs by clicking on "Edit Cmd". Alphabetically -> NOP.
Repeat for all four titles.
Hope this helps.Last edited by Skiller; 4th Dec 2022 at 10:01.
-
it works,great
I left the line of sub 6 and 8 as you told me, do you think it's right?
[Attachment 67980 - Click to enlarge] -
No, that's not right and not what I said. You should only turn the two audio related SetSTN commands (original lines 13 and 15) into NOPs, not the entire pre and post-commands section.
This will break a couple of things for sure.
Technically, just adding the new SetSTN command at the top should be enough to do the trick but turning the original (audio) SetSTN commands into NOPs is just for safety. -
Thank I owe you one
Can you help me for this https://forum.videohelp.com/threads/407826-PgcEdit-add-chapter-language , please?
Similar Threads
-
Aegisub default language
By Chris Allinger in forum SubtitleReplies: 0Last Post: 13th Apr 2021, 11:27 -
Language of subtitles is not displayed
By BenJamin in forum Authoring (Blu-ray)Replies: 3Last Post: 23rd Nov 2020, 03:04 -
AVI file has two language tracks. How can I burn to DVD with only one
By Matts76 in forum AudioReplies: 4Last Post: 28th Jun 2019, 16:04 -
Repairing damaged DVD files with hex language
By dvdmaster1 in forum Newbie / General discussionsReplies: 25Last Post: 9th Oct 2017, 11:06 -
DVD authoring with [Language Menu] for each [Language Audio]
By Meem in forum Authoring (DVD)Replies: 6Last Post: 23rd Sep 2017, 03:32