can we play video in 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.
Message
Author
edwardelricwife

can we play video in a game?

#1 Post by edwardelricwife »

In the ren'py features we can read:

"Can play mpeg1 movies."

what does that mean? we can put video? It would be so cool if i can make my own credit with movie maker and then put it in my game! :mrgreen:
and, what's a mpeg1 movie by the way ? :shock:

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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: can we play video in a game?

#2 Post by PyTom »

Mpeg-1 is a type of movie format that many programs can produce. While it's not the world's best movie format, it has the benefit that every even remotely modern computer can play it at a reasonable speed.

So the answer is yes, Ren'Py can play video, provided it's in the right format.
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

edwardelricwife

Re: can we play video in a game?

#3 Post by edwardelricwife »

thank you very much :mrgreen:
so, once you got the right type of video, how do you pu it into the game, it's like
play "nameofthevideo.mpg1" ?
as we do for music?

bloodywyvern
Veteran
Posts: 338
Joined: Wed Dec 26, 2007 5:26 am
Location: US
Contact:

Re: can we play video in a game?

#4 Post by bloodywyvern »

Code: Select all

renpy.movie_cutscene(filename, delay=None, loops=0)
I believe that does it, delay should be the length of the movie I think.
Project - R.E.M: Reality's Dream - Team head/Lead Writer
Other projects - Jamais Vu (script 10k), Chronicles of Etemis
Scripts in planning- 1

Guest

Re: can we play video in a game?

#5 Post by Guest »

awwww, i'm such a dumb ! it didn't work o_o
may i ask for an exemple?(forgive me ^_^')
and is there something to do with python or declare it with the image before?....

bloodywyvern
Veteran
Posts: 338
Joined: Wed Dec 26, 2007 5:26 am
Location: US
Contact:

Re: can we play video in a game?

#6 Post by bloodywyvern »

Code: Select all

$ renpy.movie_cutscene("On_Your_Mark.mpg", 394)
That example is from the Ren'Py reference, which you might want to take a look at: http://www.renpy.org/wiki/renpy/doc/ref ... nce_Manual
Project - R.E.M: Reality's Dream - Team head/Lead Writer
Other projects - Jamais Vu (script 10k), Chronicles of Etemis
Scripts in planning- 1

Guest

Re: can we play video in a game?

#7 Post by Guest »

the game work but don't read the video while making a strange noise.... :lol: i'm driving crazy ><
thanks for the help, but i think i'm gonna give up....... :lol:

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: can we play video in a game?

#8 Post by Jake »

Guest wrote:the game work but don't read the video while making a strange noise....
Are you sure that the movie is the right format, though? It's not that common to find videos encoded into MPEG1 these days unless something specificially needs it, because more-recent formats are better in terms of compression.

IIRC MPEG1 is what VCDs are encoded in; DVDs are MPEG2, and things like DivX and H.264 are various implementations of MPEG4. I've not tried getting Ren'Py to play movies at all, myself, but it seems pretty likely that you'll have to convert video from most sources into the appropriate format. Unfortunately I don't think you can get Movie Maker to output in that format, so you'll need to find some other tool to re-encode the output.
Server error: user 'Jake' not found

Guest

Re: can we play video in a game?

#9 Post by Guest »

thanks but i did convert well on an online converter that i like very much "media convert"
it's very useful ^^

josh
Newbie
Posts: 22
Joined: Fri Dec 07, 2007 3:57 pm
Completed: Threed's Heroes and Happy Happy Halloween
Projects: Yotsuba&! Kinetic Novel, Other Projects.
Location: Birmingham
Contact:

Re: can we play video in a game?

#10 Post by josh »

Thats odd, Whenever I try to add video to my game, i get the text, a blank screen, and lots of weird static noises. It happens with every video that i try. Audio / Video can be provided upon request.
"My Name is Ozymandias, King of Kings: Look On My Works Ye Mighty And Despair!"

Counter Arts
Miko-Class Veteran
Posts: 649
Joined: Fri Dec 16, 2005 5:21 pm
Completed: Fading Hearts, Infinite Game Works
Projects: Don't Save the World
Organization: Sakura River
Location: Canada
Contact:

Re: can we play video in a game?

#11 Post by Counter Arts »

I think it's just trying to make sure it's mpeg1 format... not 2 or 4. I think most VN trailers are in mpeg1 format because it's easy to play and japan has fiber at home.
Fading Hearts is RELEASED
http://www.sakurariver.ca

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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: can we play video in a game?

#12 Post by PyTom »

Providing video would really help.
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

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: can we play video in a game?

#13 Post by Asceai »

Even just the first 32kb or so of said video file would probably suffice for determining what it is.

josh
Newbie
Posts: 22
Joined: Fri Dec 07, 2007 3:57 pm
Completed: Threed's Heroes and Happy Happy Halloween
Projects: Yotsuba&! Kinetic Novel, Other Projects.
Location: Birmingham
Contact:

Re: can we play video in a game?

#14 Post by josh »

here it is
Attachments

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

"My Name is Ozymandias, King of Kings: Look On My Works Ye Mighty And Despair!"

honoreixix
Regular
Posts: 115
Joined: Wed Apr 16, 2008 10:36 am
Contact:

Re: can we play video in a game?

#15 Post by honoreixix »

does the video only need to be in mpeg1? I'm wondering if it requires specific FPS or resolution...
I'm hidden and no one expects much of me... I just hope I don't disappoint anyone...
I'd rather fail doing something I love than succeed doing something I hate...
Image

Post Reply

Who is online

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