Queue movies
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.
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.
-
- Regular
- Posts: 111
- Joined: Thu Aug 06, 2009 6:51 am
- Completed: Begin of Evangelion, SAO - Smile of the black cat, SAO - Project "Ceramic Heart", Time for Dragons
- Location: Russia
- Contact:
Queue movies
Is there any way to queue movies (different files) with transitions between them like queue music works ?
Thanks in advance.
Thanks in advance.
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Queue movies
Code: Select all
image vid1 = Movie(play="vid1.webm")
image vid2 = Movie(play="vid2.webm")
label queue_videos(*video_details):
$ vd = list(video_details)
while vd:
$ v, d, t = vd.pop()
scene expression v with t
pause d
return
label start:
call queue_videos(
("vid1", 5.0, fade),
("vid2", 2.0, None))
-
- Regular
- Posts: 111
- Joined: Thu Aug 06, 2009 6:51 am
- Completed: Begin of Evangelion, SAO - Smile of the black cat, SAO - Project "Ceramic Heart", Time for Dragons
- Location: Russia
- Contact:
Re: Queue movies
Thanks, though i need to do it without specifying video length, otherwise should be fine.
May be i can try to get video length from pygame.movie.Movie.get_length.
Do you know, is renpy Movie - pygame.movie.Movie, and therefore have get_length() method ?
May be i can try to get video length from pygame.movie.Movie.get_length.
Do you know, is renpy Movie - pygame.movie.Movie, and therefore have get_length() method ?
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Queue movies
i don't think so since Movie displayable is a whole lot different from an ordinary pygame movie, add that the movie module doesn't exist in renpy's version of pygame. Might be wrong though.
You can easily search online on how to find a video's duration, then modify the code a bit according to what you want.
But I think some of them might involve third party libs so yeah, you might need to install those inside `game/python-packages` if they're python libs.
You can easily search online on how to find a video's duration, then modify the code a bit according to what you want.
But I think some of them might involve third party libs so yeah, you might need to install those inside `game/python-packages` if they're python libs.
-
- Regular
- Posts: 111
- Joined: Thu Aug 06, 2009 6:51 am
- Completed: Begin of Evangelion, SAO - Smile of the black cat, SAO - Project "Ceramic Heart", Time for Dragons
- Location: Russia
- Contact:
Re: Queue movies
Found
But can't get it to work - renpy.music.get_playing correctly show file name, renpy.music.get_duration always says 0.0, and renpy.music.play('movies/movie.webm',channel='movie',loop=False) seems totally lock screen until played.
Well, music.play webm on movie channel mostly works as wanted queue too, but then there are other question - is it possible to show / hide it with transition.
Code: Select all
renpy.music.get_duration(channel=u'music')
Returns the duration of the audio or video file on channel. Returns 0.0 if no file is playing on channel.
Well, music.play webm on movie channel mostly works as wanted queue too, but then there are other question - is it possible to show / hide it with transition.
Re: Queue movies
Eliont wrote: ↑Sun Feb 28, 2021 12:05 pm FoundBut can't get it to work - renpy.music.get_playing correctly show file name, renpy.music.get_duration always says 0.0, and renpy.music.play('movies/movie.webm',channel='movie',loop=False) seems totally lock screen until played.Code: Select all
renpy.music.get_duration(channel=u'music') Returns the duration of the audio or video file on channel. Returns 0.0 if no file is playing on channel.
Well, music.play webm on movie channel mostly works as wanted queue too, but then there are other question - is it possible to show / hide it with transition.
Not tested (of course), but try 'movie' channel - https://www.renpy.org/doc/html/movie.html#Movie
Code: Select all
renpy.music.get_duration(channel=u'movie')
-
- Regular
- Posts: 111
- Joined: Thu Aug 06, 2009 6:51 am
- Completed: Begin of Evangelion, SAO - Smile of the black cat, SAO - Project "Ceramic Heart", Time for Dragons
- Location: Russia
- Contact:
Re: Queue movies
Can not use this command during any video playback, as it fully lock all controls, and i dont know how to get it to work with Movie displayable.
Initial idea was about to get duration of webm file without playing it, to show Movie displayable with transition, but move to next video or line of code when video ends without manually setting pause time.
Initial idea was about to get duration of webm file without playing it, to show Movie displayable with transition, but move to next video or line of code when video ends without manually setting pause time.
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot]