"main_menu.png" -> "main_menu.mp4"

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Njiorm
Newbie
Posts: 3
Joined: Sun Mar 17, 2019 8:18 am
Contact:

"main_menu.png" -> "main_menu.mp4"

#1 Post by Njiorm »

Hello, everyone.
I have registered here, because I haven't found my question here yet. If it is already answered, I apologize for the double post.

Question:
Is it possible to play a video (mp4) in the main menu (and another one for game_menu)? I would like to run the mp4-file as loop in the background and replace the normal "main_menu.png".
I have already tried to replace main_menu.png with main_menu.mp4. Even a defined image doesn't seem to work.
Do any of you have a solution for this?

Thanks in advance for your help.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: "main_menu.png" -> "main_menu.mp4"

#2 Post by Imperf3kt »

mp4 is not supported. (because its a licensed format that costs potentially hundreds of thousands of dollars to license)
You'll need to use a supported video format.

See here for details:
https://www.renpy.org/doc/html/movie.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Njiorm
Newbie
Posts: 3
Joined: Sun Mar 17, 2019 8:18 am
Contact:

Re: "main_menu.png" -> "main_menu.mp4"

#3 Post by Njiorm »

Thank you, but i also use mp4 in the splashscreen. It works fine.

I am trying to do the same with the video as *.ogv but it does not work. I don't know how to set the video in main_menu.

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: "main_menu.png" -> "main_menu.mp4"

#4 Post by IrinaLazareva »

There are many options for implementing the problem (beautiful and not so much; productive and not so much; simple and not so much....). However, easy way is:

To replace main_menu image with a "main_menu video", you need to find a line (gui.rpy file)

Code: Select all

define gui.main_menu_background = "gui/main_menu.png"
and replace to

Code: Select all

define gui.main_menu_background = Movie(play='video_file.mpg', channel='movie')
For game menu, similarly:

Code: Select all

define gui.game_menu_background = ....

Njiorm
Newbie
Posts: 3
Joined: Sun Mar 17, 2019 8:18 am
Contact:

Re: "main_menu.png" -> "main_menu.mp4"

#5 Post by Njiorm »

It works :D Thank you!!!

Post Reply

Who is online

Users browsing this forum: Andredron, Bing [Bot]