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.
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#1
Post
by vollschauer » Sun Oct 11, 2015 11:49 am
I'm trying to get a mpeg movie to play but no luck so far :/ so I read a bit more carefully the renpy movies reference page...
and it says that a audio track is required. lets add one with ffmpeg (using version 2.8)
original file, mediainfo output:
Code: Select all
General
Complete name : input.mpg
Format : MPEG-PS
File size : 9.68 MiB
Duration : 10s 0ms
Overall bit rate : 8 123 Kbps
Writing library : encoded by TMPGEnc (ver. 2.525.64.184)
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=9
Duration : 10s 0ms
Bit rate : 8 000 Kbps
Width : 800 pixels
Height : 600 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.556
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
Stream size : 9.49 MiB (98%)
Writing library : TMPGEnc 2.525.64.184
I searched the web and came up with this:
Code: Select all
ffmpeg -f lavfi -i aevalsrc=0 -i input.mpg -vcodec copy -acodec mp2 -ab 128000 -map 0:0 -map 1:0 -shortest -strict experimental -y out.mpg
mediainfo output:
Code: Select all
General
Complete name : out.mpg
Format : MPEG-PS
File size : 9.73 MiB
Duration : 10s 0ms
Overall bit rate : 8 163 Kbps
Writing library : encoded by TMPGEnc (ver. 2.525.64.184)
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=9
Duration : 10s 0ms
Bit rate : 7 872 Kbps
Maximum bit rate : 8 000 Kbps
Width : 800 pixels
Height : 600 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.547
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
Stream size : 9.38 MiB (96%)
Writing library : TMPGEnc 2.525.64.184
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 9s 979ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel count : 1 channel
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : -11ms
Stream size : 156 KiB (2%)
The move is now "playing" but stuttering like hell? What I'm doing wrong?
Thanks ...
-
Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
-
Contact:
#2
Post
by Donmai » Sun Oct 11, 2015 2:47 pm
vollschauer wrote:What I'm doing wrong?
You are using mpeg. Have you tried OGG or webm?
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#3
Post
by vollschauer » Sun Oct 11, 2015 3:11 pm
yeah no luck with ogg audio neither, so i decided to give up and convert all my mpeg's to ogv
Code: Select all
ffmpeg -ar 48000 -ac 2 -f s16le -i /dev/zero -i input.mpg -c:v libtheora -c:a libvorbis -q:v 10 -q:a 4 -shortest -strict experimental -y out.ogv
at least they a playing now

-
Jae
- Regular
- Posts: 192
- Joined: Sun Sep 13, 2015 5:41 pm
- Projects: Pokémon Academy Life
- Location: New York, NY
-
Contact:
#4
Post
by Jae » Sun Oct 11, 2015 3:43 pm
Ren'Py is fickle.
Just stick to .ogv for videos and .ogg for audio tracks.
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#5
Post
by vollschauer » Sun Oct 11, 2015 5:04 pm
I will

now I face another issue my scene jumps in before the movie has played to the end ...is that normal behavior?
Code: Select all
play movie "video/out.ogv"
scene cg xxx with flash
inserting a pause seems silly!?
Edit:
Found out myself, looks it there is quite a difference to
Code: Select all
$ renpy.movie_cutscene("video/out.ogv")
-
Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
-
Contact:
#6
Post
by Donmai » Sun Oct 11, 2015 7:32 pm
Donmai wrote:Have you tried OGG or webm?
My bad, of course I meant OGG Video. BTW, webm seems to be the way to go.
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#7
Post
by vollschauer » Sat Oct 17, 2015 6:12 pm
Didn't even know webm before you told me

I checked it out and have to say nice compression!
But my movie "lags" if I loop it (little stutter between the loops, it's not playing smooth)...
If I watch my movies (with loop) in mpv player all is fine, you cant see where the start/end is.
I use this code:
Code: Select all
init:
image movie = Movie (size=(config.screen_width, config.screen_height), xalign=0.0, yalign=0.0)
Code: Select all
show movie
play movie "video/movie_01.webm" loop
Doesn't matter if I use webm or ogv.
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#8
Post
by vollschauer » Thu Dec 03, 2015 1:43 pm
Getting my movies to work is still on my big TO-DO list. As I mention my mpegs don't work, they are stuttering like hell ...
Then I had a look at the free game on steam "Written in the Sky" and noticed they used a mpeg for they intro.
My mpg (not working!):
Code: Select all
Format : MPEG-PS
File size : 79.6 MiB
Duration : 2mn 5s
Overall bit rate mode : Variable
Overall bit rate : 5 318 Kbps
Writing library : encoded by TMPGEnc (ver. 2.524.63.181)
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=18
Duration : 2mn 5s
Bit rate mode : Variable
Bit rate : 5 084 Kbps
Width : 800 pixels
Height : 600 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.353
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first frame : Closed
Stream size : 76.1 MiB (96%)
Writing library : TMPGEnc 2.524.63.181
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Duration : 2mn 5s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 1.92 MiB (2%)
Written in the Sky mpg (working!):
Code: Select all
Format : MPEG-PS
File size : 1.07 MiB
Duration : 8s 255ms
Overall bit rate mode : Variable
Overall bit rate : 1 084 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 1
Format settings, BVOP : No
Format settings, Matrix : Default
Format settings, GOP : N=12
Duration : 8s 0ms
Bit rate mode : Variable
Bit rate : 934 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.018
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first frame : Closed
Stream size : 912 KiB (84%)
Audio
ID : 192 (0xC0)
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Duration : 8s 255ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : -25ms
Stream size : 129 KiB (12%)
Does anybody know why this one is working and the other not? I also tried ogv which is much better, but I still have that lag/delay between the loops ... :/
-
Jae
- Regular
- Posts: 192
- Joined: Sun Sep 13, 2015 5:41 pm
- Projects: Pokémon Academy Life
- Location: New York, NY
-
Contact:
#9
Post
by Jae » Fri Dec 04, 2015 1:57 am
Forget everything and use .webm.
V8 video codec and Vorbis audio.
I've had issues with different file formats in the past with Ren'Py. Switched to .webm for everything and never had another issue ever again with any machines I've tested on.
-
vollschauer
- Veteran
- Posts: 231
- Joined: Sun Oct 11, 2015 9:38 am
- Github: vollschauer
-
Contact:
#10
Post
by vollschauer » Thu Dec 10, 2015 11:40 am
I've tried every format by now, still getting the "loop lag"
(I'm running Linux btw.)
-
Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
-
Contact:
#11
Post
by Donmai » Thu Dec 10, 2015 12:36 pm
Check your video file, then. Can it loop properly?
-
Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
-
Contact:
#13
Post
by Donmai » Sat Dec 26, 2015 1:22 pm
Well... calling Ren'Py technicians...
Users browsing this forum: Hojoo