Ren'py Video, won't work? Please help!

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.
Message
Author
AriaRules!
Regular
Posts: 36
Joined: Sat Aug 06, 2011 1:15 am
Projects: High School, for the Supernatural!
Organization: AriaGames
Location: In the closet (:
Contact:

Ren'py Video, won't work? Please help!

#1 Post by AriaRules! »

Okay so recently I've been trying to put a video into a ren'py game and it doesn't seem to be working. I've already tried MP4, AVI and WMV but when I run the game, and it gets to the cutscreen part it either plays the audio without the video while displaying a black screen OR just skip the video all together.

Code: Select all

$ renpy.movie_cutscene("computer.mp4")

Code: Select all

$ renpy.movie_cutscene("computer.avi")
Please help, and yes I do have a video converter.
Image

Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

Re: Ren'py Video, won't work? Please help!

#2 Post by Blue Lemma »

I suggest reading this if you haven't:
http://www.renpy.org/wiki/renpy/doc/reference/Movies

AVI and WMV are not supported.

My personal experience with MP4 is that it's a troublemaker. Try Ogg Theora:
http://wiki.xiph.org/index.php/TheoraSoftwareEncoders
“Among those who dislike oppression are many who like to oppress.”
- Napoleon Bonaparte


I've retired from forum administration. I do not add people to the "adult" group, deactivate accounts, nor any other administrative task. Please direct admin/mod issues to PyTom or the other mods : )

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#3 Post by TrickWithAKnife »

Forum necromancy!

I'm having problems getting my videos to display.
So far I've converted my videos to .wmv, .avi (mpeg4 and another format that I forgot), and .ogv, all without success.
What happens when I try running the game, no video shows at all.
Here is the desperate code I'm using:

Code: Select all

init:
    image movie = Movie(size=(400, 300), xalign=0.5, yalign=0.5)

Code: Select all

    "aaa"
    $ renpy.movie_cutscene("test2newogv.ogv")
    # show movie
    "bbb"
    $ renpy.movie_cutscene('test2newogv.ogv') 
    "ccc"
    play movie "test2newogv.ogv"
    "ddd"
    
    
    scene black
    show movie

    play movie "test2newogv.ogv"

    "Wow, this movie is really terrible."

    "I mean, it stars William Shatner..."

    "... speaking Esperanto."

    "MAKE IT STOP!"

    stop movie
    hide movie

    "Thats... better."
  
Pretty much everything I'm using is copied and pasted from people who know a lot more than me.

Any ideas? I've wasted hours on something that should be very easy.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py Video, won't work? Please help!

#4 Post by PyTom »

Is there sound in the video? Ren'Py requires that each video have a soundtrack with it - even if the soundtrack is silent.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#5 Post by TrickWithAKnife »

Ahh, that must be the problem. I'll post later if I get it working.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#6 Post by TrickWithAKnife »

It works, but the performance is.... not realistically usable.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

Re: Ren'py Video, won't work? Please help!

#7 Post by EwanG »

I seem to recall the one game where I used video I went with MPEG-1 which was reasonably acceptable.

Does it have to be video? With some of the animation techniques you might be better off just letting RenPy animate your frames.
Working on something... might even be something good :D

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#8 Post by TrickWithAKnife »

For the opening to the game, I hoped to use an edited video. I guess it could be possible with images, but I wonder if that would cause any problems. There may be up to 500 images in the sequence.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py Video, won't work? Please help!

#9 Post by PyTom »

Images will be much less efficient than video.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#10 Post by TrickWithAKnife »

Resized to 400x300, I'm getting about 5FPS on a test video. If I run it the same size as the window (1280x760) the image never changes from the first frame.

Basically I think this performance problem makes video not usable for what I want.
The alternative of displaying 500 images in sequence sounds like a nightmare to code, but it may be the method that gives the best looking result.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py Video, won't work? Please help!

#11 Post by PyTom »

What sort of system are you running on where you're getting 5fps? It strikes me that something is more severely going wrong there - either the video encoding is wonky, or your system is malfunctioning. Do you have GL acceleration on?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#12 Post by TrickWithAKnife »

AMD Athlon X2 Dual-Core QL-60, 1.9GHz
2GB RAM
DirectX 11
ATI Radeon HD 3200 Graphics
WIndows Vista Home Premium (Service Pack 2)

As for GL acceleration, I wasn't able to find out how to check if it's on.

I'm not sure if it's 5FPS. But I'm certain it is not getting as high as 10FPS, which is still much less than required for a smooth video.

I have no trouble playing the exact same video through other programs. I tried encoding with MPEG-1 as EwanG said he had reasonably acceptable performance, but it made no difference for me.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py Video, won't work? Please help!

#13 Post by PyTom »

Can you resize the window? If you can't, then GL isn't working.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

TrickWithAKnife
Eileen-Class Veteran
Posts: 1261
Joined: Fri Mar 16, 2012 11:38 am
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Location: Tokyo, Japan
Contact:

Re: Ren'py Video, won't work? Please help!

#14 Post by TrickWithAKnife »

Yup, it resizes fine. All art assets resize correctly at the same time.
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.

User avatar
fluxus
Regular
Posts: 133
Joined: Thu Jun 19, 2014 8:06 am
Projects: Animal Anaesthesia (a teaching game)
Contact:

Re: Ren'py Video, won't work? Please help!

#15 Post by fluxus »

TrickWithAKnife wrote:Forum necromancy!
I have an issue which sounds very similar to the above, thus the necromancy.

I use the ogv format, made with Free Video Converter for windows. Its 'Html5' conversion makes an .ogv video as well as 2 others.
180p and 240p works fine, 360p and above shows a couple of frames and then stops.
I'm going to edit out sound and add a silent track for the final version, but for testing purposes I let the audio track remain as is.
The window was resizable when using 240p, and I was able to swap to fullscreen too.

How high a resolution is Ren'Py supposed to be able to handle?
And which video conversion tools are you using/would you recommend?

Post Reply

Who is online

Users browsing this forum: Ocelot