[Solved] How can I play a video with sound?

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
nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

[Solved] How can I play a video with sound?

#1 Post by nanashine »

How is the "correct" way of using a video file?

In a simple way like this:

Code: Select all

label start:
    
    scene config
    play movie "tv.mp4" loop 
The video is mute and while it's playing it "unables" the game (the mouse disappear, etc).

I wanted the video to be in the background and playing its sound. While the game with texts, choices, etc run normally.
I also wanted to stablish a position for the video.
I tried something like:

Code: Select all

image movie = Movie(size=(720, 300), xpos=0, ypos=0, xanchor=0, yanchor=0)
But it didn't work.

Is it possible to make this on Renpy? Or you can't use videos this way?

Thanks.
Last edited by nanashine on Fri Mar 15, 2019 8:31 pm, edited 1 time in total.
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

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

Re: How can I play a video with sound?

#2 Post by Imperf3kt »

If your target is mobile such as Android as I assume it may be, then you can only play back video files as fullscreen. Android doesn't support displaying video files any other way with Ren'Py. Or at least, at one point it didn't.
I cannot find mention of it in the documentation anymore.

Related documentation.

https://www.renpy.org/doc/html/android.html
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

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: How can I play a video with sound?

#3 Post by nanashine »

Imperf3kt wrote: Fri Mar 15, 2019 8:03 pm If your target is mobile such as Android as I assume it may be, then you can only play back video files as fullscreen. Android doesn't support displaying video files any other way with Ren'Py. Or at least, at one point it didn't.
I cannot find mention of it in the documentation anymore.

Related documentation.

https://www.renpy.org/doc/html/android.html
https://www.renpy.org/doc/html/movie.html
Thank you so much! I didn't find this information when I searched :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

Post Reply

Who is online

Users browsing this forum: No registered users