Background Music with Video

Started by joelphilippage, Sun 14/12/2008 01:57:39

Previous topic - Next topic

joelphilippage

I hope this isn't my fault but I am trying to play a video while the background music is still playing.
Code: ags
function room_Load()
{
  PlayMusic(7);
  PlayVideo("Movies/Intro.Avi", 1, 10);
  cEgo.Transparency = 100;
}

The music needs to line up with the video and doesn't start until I select the window. The game won't start up selected. Is there a way to fix this?



Dualnames

Quote from: joelphilippage on Sun 14/12/2008 01:57:39
I hope this isn't my fault but I am trying to play a video while the background music is still playing.
Code: ags
function room_Load()
{
  PlayMusic(7);
  PlayVideo("Movies/Intro.Avi", 1, 10);
  cEgo.Transparency = 100;
}

The music needs to line up with the video and doesn't start until I select the window. The game won't start up selected. Is there a way to fix this?

I've used once and more a certain thing in my games..and it did work..does the movie work properly if played by itself?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

joelphilippage

The movie works fine either way. It's just the sound that won't work while the games not selected.



Dualnames

ow, that has to do with setmultitaskingmode function.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

joelphilippage

Your close. Now it works in windowed mode but not full screen.



Dualnames

 PlayVideo("Movies/Intro.Avi", 1, 11);

Try changing to this..that might work full screen..if it does, you can check if the game is full screen or window and play the video accordingly.. 
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

joelphilippage

That didn't work. I guess I'll just run it windowed unless someone knows a way to fix it.



Trent R

It has nothing to do with the slash in the file name? That seems to me like it could screw stuff up....


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

subspark


Dualnames

Quote from: subspark on Mon 15/12/2008 05:13:51
So's this a bug or...

Sparx.

Joel? Can you remove that line with cego transparency..or add a wait before it?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

joelphilippage

Trent R: The / in the file name is to show that it's in the movies folder.
Dualnames: I tried it and it still didn't work.



Dualnames

Well, I'm out of ideas. I'd go and post about it at AGS Engine Topic. Last guess: are you using media manager plugin(whatever it's called)?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

joelphilippage




Dualnames

Quote from: joelphilippage on Tue 16/12/2008 23:31:27
Sorry I don't.

Well, it's definetely weird..well CJ might give you an anwer..
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Trent R

Quote from: joelphilippage on Tue 16/12/2008 22:20:51
Trent R: The / in the file name is to show that it's in the movies folder.
Well yeah, but have you tried it in the root folder? Does it work then?

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

joelphilippage

I tried that too. It's still not working.



Gilbert

It would be odd if it's related to in what folder the file is placed, so there's little chance it's the cause.

I'm not familiar with movie playing, but a thing you may check is with what codec the AVI file was encoded in. It may be possible that the driver responsible for playing that kind of movies steals the focus or prevents other sounds to play. You may try AVI files encoded with other codecs (for testing purpose just random movie files may do) and see if it yields a different result.

joelphilippage

It's encoded with divix and I'm using a divix codec.



Dualnames

Quote from: joelphilippage on Wed 17/12/2008 01:24:57
It's encoded with divix and I'm using a divix codec.

Try placing a normally encoded AVI instead of that of yours to see if it works,.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

What exactly is the problem? Is the sound not playing at all?

SMF spam blocked by CleanTalk