Unable to play back MPEGs with PlayVideo()

Started by Matt Goble, Sun 17/08/2003 21:51:21

Previous topic - Next topic

Matt Goble

I've been experimenting with different video formats for cutscenes, and have run into a strange bug with MPEG video files.

www.mattgoble.com/interaction/ags/zips/video.rar 1.2Mb

This file contains a test game along with 4 small video files:

320x240.avi - DivX 5 encoded
640x480.avi - DivX 5 encoded

320x240.mpg - MPEG-1
640s480.mpg - MPEG-1

Clicking the hand icon of the various objects should play from left to right...

320avi, 320mpg, 640avi, 640mpg

The AVI based video plays, although it is rather grainy which I am guessing is to do with the colour depth that DivX work in.

The MPEG based videos just display a black screen for the duration of the video.

This occurs in both fullscreen and windowed in both 320x240 and 640x480.

All videos play back fine in windows media player 7, I have had mpeg files playing within AGS before.

I am running Windows98SE on a 1Ghz Athlon with 256Mb RAM and 8Mb ATI All-in-wonder Pro card at 24Bit colour depth.

If people could try out the files on their computer I would greatly appreciate it - MPEG I feel is one of the best options in terms of installed userbase and processor requirements.  Unfortunately people also need to be able to see the content!  ;D

Many Thanks for your help

Matt

Pumaman

I just gave it a try and they all played fine for me. Does it make any difference if you run the game in a window?

Matt Goble

Hi Chris,

No, I get the same problem when playing in a window - black screen on the mpegs.

Could my desktop colourdepth affect it?  Or perhaps a bizzare ATI issue - does AGS still run in 15bit as opposed to 16Bit?

Also, do you know what version of Windows Media Player you're using - as I said I'm on 7, but with all the latest codecs installed.  I know there was some issue with I think 8 or 9 where they change ClassIDs or something causing problems for embedded DVD streams (You can tell I'm really clutching at straws here!).

I'll try it on  my old laptop tomorrow which I believe has Media Player 6.4 on it.

Then again, it could just be a problem with my aging graphics card (if you remember it has a 'thing' about letterboxing).

Thanks anyway

Matt

Matt Goble

Update:

Well I haven't had a chance to check this on my laptop, but I did run it through Windows 2000.

The display appear offset by about 100px to the left, but I'm guessing this is me with the wrong graphics drivers.

The AVI files did not play because I didn't have the codec installed.  BUT both MPEG files did play, both fullscreen and windowed modes.

Windows was running Windows Media Player 6.4

I'll try it at work tomorrow, but I am beginning to suspect Windows Media to be the culprit here.

If anyone else could download the file and test it, I would really appreciate it.

Many Thanks

Matt

electric_hare

The mpegs played fine in both resolutions - the avi files didn't play at all, despite the fact that I've got the DivX 5.0.2 codec installed. Then again, running the avi files through the DivX Player only produced multi-coloured flickerings, so that might be DivX not agreeing with my video card.

PIII 800
256Mb RAM
64Mb Voodoo 5 card running at 32bit
Windows 98SE
Media Player 7

Pumaman

Yeah I'm using Media Player 6.4 . It's strange though if you're using MP7 that it works within media player, but not within AGS. Hmm.

Matt Goble

Hi Chris,

Well, I tried the files at work on a Windows XP Pro system and it all played fine botn fullscreen and in a window.  Forgot to check which version of Windows Media PLayer, but I'm guessing 8 or 9 for XP.

Found this nugget of information on a DVD forum concerning the embedding of DVD Content (Basically MPEG-2 files) into web pages.  Not sure how AGS calls Media Player, so it may or may not be of any use...

Quote

The First thing to mention is, that the Controll and Tags you are using are the one for WMP 6.4 (ClassID=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95). WMP7.1 (that in Reality is 7.01) and WMP8 (that in Reality is a WMP7.01 with some XP add ons and some bugs (or better undocumented and unsupported Features)) have a new Controll, new Tags and a new SDK (ClassID= CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6).

The second is, that when installing WMP7.1 or WMP8 the "classic" WMP6.4 still remains on the system and is not overwritten or exchanged. So you can use the 6.4 controlls in your webpages even if the user has WMP7.1 or WMP 8 installed. But when you install WMP9 it overwrites every previous Version of WMP. WMP9 can only "understand" the WMP7 Tags and Parameters. It has to some extend the ability to translate the WMP6.4 Tags and Parameters to the new version, but that does not always function correctly.


I'll look into updating WMP to whatever the latest 'core' version Win98SE will accept (Even though I have all the up-to-date codecs installed).

Electric Hare, so the files played fine within the game as well as within media player?  Maybe there is some sort of hardware conflict, or certain codecs 'break' something...

Many Thanks for your help

Matt

m0ds

Doesn't that pose the problem that the player has to have the same version of WMP as the developer, tho?

Pumaman

To be more specific, AGS uses DirectShow to play video content. This is also the method that Media Player uses to do so, and it is actually DirectShow that accesses all the codecs and so forth. So AGS doesn't actually use MP itself, but it uses the same video playing code that MP does.

j2

Some codecs tend to break other codecs. Check if you have the Angelpotion video codec installed, it made my computer unable to view MPEGs and messed up Adobe Premiere. Everything's worked just fine after uninstalling it, though.

Matt Goble

#10
No AngelPotion Codec installed.

I've downloaded WMP9, so I'll install that and see if it helps.

--EDIT--

OK, so Windows Media Player 9 has been installed, as has DirectX 9, I've also tried a different set of graphics drivers and changing the PlayVideo() flag not to scale.

And still no joy.  I'm pretty much out of options, so for whatever reason my Graphics card is incompatible with MPEG files within AGS.

Very Wierd indeed  :-\

Thanks again for everyone's help.

Matt

SMF spam blocked by CleanTalk