Select Aspect ratio in menu
-
- Posts: 43
- Joined: Tue May 04, 2021 9:51 pm
Re: Select Aspect ratio in menu
No worries so it's best to stick with the udf script I have above (the modified one for 4:3 and 16:9 ) and use that in a popup menu or assign to a button etc.
-
- Posts: 43
- Joined: Tue May 04, 2021 9:51 pm
Re: Select Aspect ratio in menu
Finally found some time to look into the UDF, the scripts above can you not just put that in a Java script and refer to it from there.
I looked at the user guide and it says go to properties/ function and create a udf from there, but looks like I can't just copy and paste , as I'm not a Java guy I'm abit lost.
I looked at the user guide and it says go to properties/ function and create a udf from there, but looks like I can't just copy and paste , as I'm not a Java guy I'm abit lost.
-
- Posts: 43
- Joined: Tue May 04, 2021 9:51 pm
Re: Select Aspect ratio in menu
So I have two movie
4x3
16x9
and i created two playlists (the 1 symbol was auto generated)
4x3 1
16x9 1
I than copied and pasted the script below as a UDF in properties/function.
I am only getting the Audio not the subtitles as with the Black/white UDF in the guide https://blu-disc.net/download/user_guid ... rd_mx.pdf page 289
I than in a popmenu used a button to asign the udf i created from the context menu.
Upon generating a preview i get this one error.
4x3
16x9
and i created two playlists (the 1 symbol was auto generated)
4x3 1
16x9 1
I than copied and pasted the script below as a UDF in properties/function.
I am only getting the Audio not the subtitles as with the Black/white UDF in the guide https://blu-disc.net/download/user_guid ... rd_mx.pdf page 289
Code: Select all
public void UDF_SwitchAspect() {
int PlaylistID;
int AudioID;
long Playtime;
PlaylistID = getPlaylistID();
AudioID = getCurrentAudioID();
if (PlaylistID ='4x3 1')
{PlaylistID = '16x9 1';}
else {PlaylistID = '4x3 1';}
Playtime = getMediaTime();
playVideoFrom(PlaylistID, Playtime);
selectAudioStream(PlaylistID, AudioID,
true);
}
Upon generating a preview i get this one error.
Kind of stuck at this point15:51:49 - [ERROR]
15:51:49 - [state] Compiling: step 3...
MediaManagement.java:185: incompatible types
found : int
required: boolean
if (PlaylistID =4)
^
1 error
-
- Posts: 43
- Joined: Tue May 04, 2021 9:51 pm
Re: Select Aspect ratio in menu
Right im getting there ,fixed the code and I don't get any errors.
This generates no errors but it does not function in the simulation.
ie it does not switch from the 4x3 to the 16x9 movie playlist.
I have a item in the popup menu which upon pressing enter runs the UDF , manager.UDF_SwitchAspect();
Code: Select all
public void UDF_SwitchAspect() {
int PlaylistID;
int AudioID;
long Playtime;
PlaylistID = getPlaylistID();
AudioID = getCurrentAudioID();
if (PlaylistID == '4x3 1')
{PlaylistID = '16x9 1';}
else {PlaylistID = '4x3 1';}
Playtime = getMediaTime();
playVideoFrom(PlaylistID, Playtime);
selectAudioStream(PlaylistID, AudioID,
true);
}
ie it does not switch from the 4x3 to the 16x9 movie playlist.
I have a item in the popup menu which upon pressing enter runs the UDF , manager.UDF_SwitchAspect();
-
- Posts: 472
- Joined: Fri Mar 01, 2013 1:03 pm
- Contact:
Re: Select Aspect ratio in menu
The only issue I see here - switching audio after play video may not work, because it switches it back on video start and this operation is asynchronous.
So, for me this works:
I assigned a script
to the Red button for both playlists and everything works fine on PowerDVD
So, for me this works:
Code: Select all
public void UDF_SwitchAspect() {
int PlaylistID = getPlaylistID();
int AudioID = getCurrentAudioID();
long Playtime = getMediaTime();
if (PlaylistID == '4x3 1') {
PlaylistID = '16x9 1';
} else {
PlaylistID = '4x3 1';
}
selectAudioStream(PlaylistID, AudioID, false);
playVideoFrom(PlaylistID, Playtime);
}
Code: Select all
manager.UDF_SwitchAspect();
Best regards,
Alexey Kolesnikov
Alexey Kolesnikov
-
- Posts: 43
- Joined: Tue May 04, 2021 9:51 pm
Re: Select Aspect ratio in menu
That's great I'll give it a shot later .
So you need to test in powerdvd this operation not in the simulation.
So you need to test in powerdvd this operation not in the simulation.
-
- Posts: 472
- Joined: Fri Mar 01, 2013 1:03 pm
- Contact:
Re: Select Aspect ratio in menu
Simulation is intended for menu simulation only. It may not work with some code related to video playing.
Best regards,
Alexey Kolesnikov
Alexey Kolesnikov