Trouble playing movies without audio

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.
Post Reply
Message
Author
User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Trouble playing movies without audio

#1 Post by SelLi » Mon Feb 16, 2015 6:41 am

Hello again. :)
I've been trying to put short videos into a VN I'm working on, but it doesn't work at times.
I think it has something to do with some files not having audio, but I'm not sure.

I have this code properly placed:

Code: Select all

image movie = Movie(size=(800, 600), xpos=0, ypos=0, xanchor=0, yanchor=0)
And I'm using this code after starting the game to have the movie play behind Serra.

Code: Select all

show SerraHappy with dissolve
show movie behind SerraHappy
play movie "WithoutSound.avi"
Serra"Here's some text~!"
Originally, "WithSound.avi" and "WithoutSound.avi" were both .webm files: one silent, the other not. Then, they were each converted into .avi files with the same converter.

Why does WithoutSound not work while WithSound does?

WithoutSound flickers a black square on the screen (behind Serra) for a split second and then vanishes. Is there some way to fix this?
Thank you for listening. :)
Last edited by SelLi on Mon Feb 16, 2015 8:59 pm, edited 3 times in total.

User avatar
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:

Re: Trouble playing AVI movies (without audio) ?

#2 Post by Donmai » Mon Feb 16, 2015 11:53 am

SelLi wrote:I think it has something to do with some files not having audio, but I'm not sure.
You guessed it right. Ren'Py will have trouble playing movies that don't have an audio track.
http://lemmasoft.renai.us/forums/viewto ... 79#p194079
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing AVI movies (without audio) ?

#3 Post by SelLi » Mon Feb 16, 2015 5:01 pm

Donmai wrote:You guessed it right. Ren'Py will have trouble playing movies that don't have an audio track.
http://lemmasoft.renai.us/forums/viewto ... 79#p194079
Thank you very much. Now I know what the problem is. :)
Is there some kind of free program I can get that will let me give the .avi a silent audio track so I can play it properly?

Edit: Or should I ask this in the other thread?

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: Trouble playing AVI movies (without audio) ?

#4 Post by PyTom » Mon Feb 16, 2015 5:09 pm

It may also have trouble playing AVIs, full stop - the format is very underspecified. I'd suggest converting to a webm.
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
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing AVI movies (without audio) ?

#5 Post by SelLi » Mon Feb 16, 2015 5:14 pm

PyTom wrote:It may also have trouble playing AVIs, full stop - the format is very underspecified. I'd suggest converting to a webm.
Thanks :)
I didn't know that Ren'Py supported webm but reading the other thread I learned that it does.
The same effect, though: The webm without sound flickers a black square for a split second before vanishing, while the webm with sound works fine.

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing movies (without audio) ?

#6 Post by SelLi » Mon Feb 16, 2015 8:02 pm

Even though I know now that webms are supported when they have an audio track, I still don't know how to add an audio track. Can someone help me? I've been trying to open stuff in windows movie maker and then export it, hoping that it would export it with an audio track since the editor can add audio tracks to stuff, but it gives me this error when I try to open webms:
"X.wemb"cannot be imported because the codec required to play the file is not installed on your computer. If you have already tried to download and install the codec, close and restart Windows Movie Maker, and then try to import the file again.
And I don't get it. VLC can open webms just fine, as can Ren'Py, and I can watch webms on the internet fine, too. So that error simply sounds like windows movie maker being incompetent, which isn't exactly a surprise to me...
I just want to be able to play these movies in Ren'Py.

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing movies (without audio) ?

#7 Post by SelLi » Mon Feb 16, 2015 8:28 pm

Alright, actually, it seems to work now. I can just convert the webm I want into a wmv and then it can load it, then I can add an audio file and delete it and it'll export it as a wmv, then I can convert it back into a webm, and I'll be able to play it in Ren'Py.
*sighs~* hah~ good~ awesome.

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing movies (without audio) ?

#8 Post by SelLi » Mon Feb 16, 2015 8:43 pm

Well, it does play, but now I'm having the "It only plays the few first frames" issue now, but I'm only having that issue with the webm files that I've put through windows movie maker, which is quite peculiar.

The original sound webm I have on its own (Sound.webm) works fine in Ren'Py.
But when I export it with Windows Movie Maker and convert it back into a webm (Sound2.webm), only the first few frames are played, while the sound continues on in the background.

The original silent webm I have on its own (Mute.webm) doesn't work in Ren'Py due to the lack of an audio track.
I put it through Windows Movie Maker and convert it back into a webm (Mute2.webm) and Ren'Py does play it, but only the first few frames.

Both Sound2 and Mute2 can play in VLC, but for some reason it seems that Ren'Py is having trouble with things that have specifically gone through Windows Movie Maker... at least, in my case.

That's really quite strange. I hope I'm not boring you or rambling. Again, I'm just trying to figure this stuff out.

User avatar
SparkyRailgun
Regular
Posts: 30
Joined: Tue May 27, 2014 9:16 pm
IRC Nick: SparkyRailgun
Contact:

Re: Trouble playing movies without audio

#9 Post by SparkyRailgun » Mon Feb 16, 2015 9:54 pm

Try converting the file using theora: http://www.theora.org/

I've had success with it in the past, even though the converter is sort of trash.

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing movies without audio

#10 Post by SelLi » Mon Feb 16, 2015 10:16 pm

SparkyRailgun wrote:Try converting the file using theora: http://www.theora.org/

I've had success with it in the past, even though the converter is sort of trash.
Thanks for the suggestion. I don't really... know what I'm looking at there, though.
There are a lot of download links... so I downloaded a zip and after extracting it I looked around its contents and found a few... HTML documents? And then I found something like this:

Code: Select all

int th_encode_ctl 	( 	th_enc_ctx *  	_enc,
		int  	_req,
		void *  	_buf,
		size_t  	_buf_sz	 
	) 	
And... uh... I don't actually know much about computers and I'm certainly not willing to learn some other coding language just to have videos playing properly in my Ren'Py game.

Also, the videos play properly on my brother's Windows 7 laptop. :) But not my Windows Vista computer.

User avatar
SelLi
Veteran
Posts: 486
Joined: Fri Apr 27, 2012 4:49 pm
Completed: Memory Mage
Projects: A Lily from the Lightless Water, The Silent Column, A Castle on an Island
Deviantart: SelLillianna
itch: SelLillianna
Location: Canada
Contact:

Re: Trouble playing movies without audio

#11 Post by SelLi » Tue Feb 17, 2015 4:16 am

Huh... apparently... Ren'Py plays things properly when I move my mouse as they play.
And, as I said before, it works properly on Windows 7.
I've been using a Depthy webm as a transition into one of my backgrounds and I'm very happy with how it looks.
I mean it isn't completely perfect but I'm very happy with it. :) Thanks y'all~

Post Reply

Who is online

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