Videos don't play

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
MiaCorvere
Newbie
Posts: 9
Joined: Sun Dec 01, 2019 12:47 pm
Tumblr: https://arent-we-all-game.tumblr
Contact:

Videos don't play

#1 Post by MiaCorvere »

I'm confused. I tried to implement videos in my game, so I made a cutscene label like this:

Code: Select all

label cutscene1:
   		 $ renpy.movie_cutscene("/videos/dimension.mp4")
But instead of playing the video, the choice menu button that is supposed to transport you to the label just freezes in the "hovered" state and nothing happens for the amount of time the video would need. If I click, it just jumpes to the thing that comes after the video. I also tried different formats, but it does the same thing with an .avi.

So I tried this instead:

Code: Select all

image dimension = Movie(play="/videos/dimension.mp4"
And then this in the label:

Code: Select all

label cutscene1:
 		show dimension
But then it just skips the video and shows me the thing that's coming afterwards right away.

Am I missing something? Do I have to set playing videos to true somewhere or something like that? Or did I just miss putting in a tiny piece of code somewhere?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Videos don't play

#2 Post by rayminator »

this one take out the first / and correct the indention

Code: Select all

label cutscene1:
   		 $ renpy.movie_cutscene("/videos/dimension.mp4")

this one take out the first / and add channel="movie",

Code: Select all

image dimension = Movie(play="/videos/dimension.mp4"
it should look like this and I do suggest that you add in the start_image="" and image="" so it will get rid of the grey & white pixels background

Code: Select all

image movie1 = Movie(channel="movie", play="video/schoolnight.webm", start_image="background105", loop=False, image="background104")
this one correct the indention

Code: Select all

label cutscene1:
 		show dimension
and I do suggest that you use webm video format

MiaCorvere
Newbie
Posts: 9
Joined: Sun Dec 01, 2019 12:47 pm
Tumblr: https://arent-we-all-game.tumblr
Contact:

Re: Videos don't play

#3 Post by MiaCorvere »

Thanks for trying to help. I fixed the /, and the indention was right all along, it just didn't work to copy it properly. But the video just doesn't play. I don't get an error message, it just doesn't do what it's supposed to do.

It should work with mp4 too, right? So I don't have to change the format for it to work at all?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Videos don't play

#4 Post by rayminator »

the only thing I can think of is that you have the videos in a different locations

check if the folder is called videos and make sure the folder is inside of the game folder

here what is supported with renpy so mp4 will not work

Ren'Py is capable of using libav (included) to play movies using the video codecs:

VP9
VP8
Theora
MPEG-4 part 2 (including Xvid and DivX)
MPEG-2
MPEG-1

inside the following container formats:

WebM
Matroska
Ogg
AVI
Various kinds of MPEG stream.

MiaCorvere
Newbie
Posts: 9
Joined: Sun Dec 01, 2019 12:47 pm
Tumblr: https://arent-we-all-game.tumblr
Contact:

Re: Videos don't play

#5 Post by MiaCorvere »

Yeah, I thought of that already and checked and even took the video out of the sub folder and just put it into the game folder and changed the path accordingly, to make sure there wasn't some kind of issue with the sub folder.

Idk, at least it'd good to know that it should work. I'm gonna check for stupid mistakes a few more times.

MiaCorvere
Newbie
Posts: 9
Joined: Sun Dec 01, 2019 12:47 pm
Tumblr: https://arent-we-all-game.tumblr
Contact:

Re: Videos don't play

#6 Post by MiaCorvere »

Okay, I solved this. It works with the webm format.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], DewyNebula, IVANtheVN