Possible To Add Video In This Manner?

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
bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Possible To Add Video In This Manner?

#1 Post by bDunks »

Hello!
I am new here, so I hope I am posting in the correct place. :)

I saw this code for audio & would like to know if there is similar code to add video?

Code: Select all

init python:
    renpy.music.register_channel("sound", mixer="sound", loop=True, file_prefix="sound/", file_suffix=".mp3")
Then I could just say, e.g.:
play video "park"

I could replace
file_prefix="sound/ with video/
&
file_suffix=".mp3 with .webm

as opposed to the way I have learned thus far:
image animation1 = Movie(play="video/park.webm")

scene animation1

etc....

If this is possible, I would also like to include a size & maybe a transition. (1280) (720) with fade.

Thank you for your time & any help or direction. :)

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Possible To Add Video In This Manner?

#2 Post by Per K Grok »

bDunks wrote: Tue Jan 08, 2019 3:24 pm ----

Thank you for your time & any help or direction. :)
You could start looking at this page
https://www.renpy.org/doc/html/movie.ht ... t=cutscene


If you use the image model you can change size and other stuff that you can do with an image.

bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Re: Possible To Add Video In This Manner?

#3 Post by bDunks »

Per K Grok wrote: Tue Jan 08, 2019 4:16 pm

You could start looking at this page
https://www.renpy.org/doc/html/movie.ht ... t=cutscene


If you use the image model you can change size and other stuff that you can do with an image.
That's what I am looking at now, but not seeing how to use what I have posted.
I am playing around with renpy.movie_cutscene, but no go... so far.

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: Possible To Add Video In This Manner?

#4 Post by Per K Grok »

bDunks wrote: Tue Jan 08, 2019 4:33 pm ---
I am playing around with renpy.movie_cutscene, but no go... so far.
Have you entered

Code: Select all

$ renpy.movie_cutscene("video/park.webm")
in your script at the point where you want to play the video?

If so what happens when you try to launch the game?
Do you get any error message?

bDunks
Newbie
Posts: 21
Joined: Tue Jan 08, 2019 3:07 pm
Contact:

Re: Possible To Add Video In This Manner?

#5 Post by bDunks »

Per K Grok wrote: Tue Jan 08, 2019 4:52 pm
bDunks wrote: Tue Jan 08, 2019 4:33 pm ---
I am playing around with renpy.movie_cutscene, but no go... so far.
Have you entered

Code: Select all

$ renpy.movie_cutscene("video/park.webm")
in your script at the point where you want to play the video?

If so what happens when you try to launch the game?
Do you get any error message?
I have no problem inserting/playing video.
I was hoping to use something like the audio code I posted to play video, making it a bit simpler.
Right now, the way I do it, based on my current knowledge, is creating a line for each video, then referencing to those lines. It works & not a big deal, but again, wanted to know if there was a simpler, cleaner way.
:)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]