About adding movie's to a game

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
User avatar
ZannyHyper
Newbie
Posts: 8
Joined: Tue Jul 07, 2009 7:55 pm
Contact:

About adding movie's to a game

#1 Post by ZannyHyper » Tue Jul 07, 2009 8:06 pm

Hi,

Im new here and to visual novel's in general,but I found Ren'Py and thought this could help me with my university work, but I need to include animation in there otherwise I cannot use this system(animation as in, things that I've actually animated via Flash) I've tried out all the code's in the tutorial put on the wiki page, but it doesnt work, all I see is a black screen or the game wont move forward anymore. I was wondering what the problem might be and if anyone has any idea's what could be wrong,I'll post the code down below (its just a test game so its nothing important)

Code: Select all

init:
    # Declare images below this line, using the image statement.
    # eg. image eileen happy = "eileen_happy.png"

    image Boy = "Justintest.png"
    image Girl = "sylvie2_normal.png"
    
    # Declare characters used by this game.
    $ ku = Character('Kuroni', color="#c8ffc8")
    $ D = Character('Dahes', color="#c8ffc8")
    $ ry = Character('Ryang', color="#c8ffc8") 
    
    image movie = Movie(size=(320, 240), xpos=475, ypos=50, xanchor=0, yanchor=0)
    
# The game starts here.
label start:


    "Introductioin" "Hello"

    $ renpy.movie_cutscene("POOL.mpg", stop_music=False)

    $ renpy.music.set_volume(1, 1.0)

    ku "So are you a"
    show Boy  
    ku "boy"
    show Boy at left
    with move 
    show Girl at right
    ku "or a girl?"

    menu:
        "Boy?":
            jump one
        "Girl?":
            jump two
    
label one:
    
    ku "Cool okay."
    
label two:
    
    ku "Nice, okay."

return
Does anyone out there have any idea's what could be wrong? and also sorry if this is such a novice question.

User avatar
PyTom
Ren'Py Creator
Posts: 15422
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: About adding movie's to a game

#2 Post by PyTom » Tue Jul 07, 2009 8:11 pm

Can you post the movie file? It's hard to diagnose these problems from just the script.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
ZannyHyper
Newbie
Posts: 8
Joined: Tue Jul 07, 2009 7:55 pm
Contact:

Re: About adding movie's to a game

#3 Post by ZannyHyper » Tue Jul 07, 2009 8:14 pm

Oh right, sorry about that lol.

The file type is MPEG 2
Attachments

[The extension mpg has been deactivated and can no longer be displayed.]


User avatar
PyTom
Ren'Py Creator
Posts: 15422
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: About adding movie's to a game

#4 Post by PyTom » Tue Jul 07, 2009 9:02 pm

Okay, there's a couple of things wrong here.

The first is that there's no soundtrack in the file. Ren'Py requires that video files have a soundtrack, so it can synchronize timing (the soundtrack can be just silence, but it has to be there).

Far worse is that the timestamps in the file make no sense. When I try to play it with ffplay, I get errors like:

Code: Select all

[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=21753, dts=25507, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=25507, dts=29261, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=33014, dts=36768, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=44276, dts=48029, size=1174
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=55537, dts=59291, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=66798, dts=70552, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=70552, dts=74306, size=2015
[mpeg @ 0x829e20]Invalid timestamps stream=0, pts=78059, dts=81813, size=2015
If I understand this correctly, dts is the decoding time stamp which controls when a frame is decoded, and pts is the presentation time stamp, which governs when it is shown to the user. So if I'm getting this right, your stream is asking that frames be shown before they are decoded... which is nonsensical.

If you give Ren'Py a correct stream, with an audio track, it should be able to play it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
ZannyHyper
Newbie
Posts: 8
Joined: Tue Jul 07, 2009 7:55 pm
Contact:

Re: About adding movie's to a game

#5 Post by ZannyHyper » Wed Jul 08, 2009 11:44 am

Thanks for the info, I managed to sort the problem out =3

Post Reply

Who is online

Users browsing this forum: No registered users