Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Media_play #219331
08/02/08 03:06
08/02/08 03:06
Joined: Aug 2008
Posts: 25
B
bluemax Offline OP
Newbie
bluemax  Offline OP
Newbie
B

Joined: Aug 2008
Posts: 25
I'm trying to write a script that plays(displays) avis, mpgs and jpgs. The jpegs display correctly but the motion files display a black screen. The script sample in the manual doesn't work if I copy and paste. Any help would be greatly appreciated.

Re: Media_play [Re: bluemax] #219412
08/02/08 14:50
08/02/08 14:50
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
media_play("movie.mpg",NULL,100);
media_play("movie.avi",NULL,100);

Re: Media_play [Re: Spirit] #219584
08/03/08 12:51
08/03/08 12:51
Joined: Aug 2008
Posts: 25
B
bluemax Offline OP
Newbie
bluemax  Offline OP
Newbie
B

Joined: Aug 2008
Posts: 25
Yes, but when I go to run the routine, the window just goes blank. It does a successful compile but hangs on the code you suggested. Heres the code:
#include <litec.h>
#include <default.c>
#include <acknex.h>

function Main()
{
Sound_vol = 100;
media_play("CTST.mpg",NULL,100);
}

If I change the file to a jpeg, it runs fine. It just hangs on movie files.

Is there a difference if I'm running MS VISTA?
Do I need to #include another class?
Is the function Main() ok or should I try another call?


Any other suggestions would be greatly appeciated

Re: Media_play [Re: bluemax] #219595
08/03/08 15:38
08/03/08 15:38
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
When a still image works your code is ok. But for playing a movie on a PC, the CODEC for that movie format must be installed on the PC.

Windows comes with standard codecs so normally you should be able to play mpg, but maybe that mpg file has some special format that is not supported.

Re: Media_play [Re: Tobias] #219604
08/03/08 16:12
08/03/08 16:12
Joined: Aug 2008
Posts: 25
B
bluemax Offline OP
Newbie
bluemax  Offline OP
Newbie
B

Joined: Aug 2008
Posts: 25
Good point,
If I play the mpg in Windows media player or other software, it does play normally. I tried other versions of the movie (avi, etc.) but to no avail. I'm wondering if lite-C is not accessing the CODEC library on my computer. I'm running VISTA and I know 3DGS has some issues running under VISTA. Also, the .c file is in the same folder as the mpgs. Does that make a difference? And finally, I'm running a trial version (A7)

Re: Media_play [Re: bluemax] #219611
08/03/08 17:07
08/03/08 17:07
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Hmm, when it plays in Media player I normally would assume that it also plays in 3DGS because 3DGS uses the media player for the media_play function. I dont think Vista can be the reason, 3DGS has no issues with Vista. Can you try some other movies in other formats?

Re: Media_play [Re: Tobias] #219623
08/03/08 17:53
08/03/08 17:53
Joined: Aug 2008
Posts: 25
B
bluemax Offline OP
Newbie
bluemax  Offline OP
Newbie
B

Joined: Aug 2008
Posts: 25
Yes, I tried avi(different codecs), wmv, different resolutions(320x200) and different video modes(5,6,7).
I thought I read on the installation instructions of A7 that vista users should keep the files out of \program files and instead put them under \user. Thats why I mentioned vista.
Any other ideas?

Re: Media_play [Re: bluemax] #317752
04/02/10 10:07
04/02/10 10:07
Joined: Dec 2009
Posts: 5
D
DaGr81 Offline
Newbie
DaGr81  Offline
Newbie
D

Joined: Dec 2009
Posts: 5
not sure if you have it working yet but here is what i think might fix it. are you getting any errors when you run it, because i see no need for "Sound_vol = 100". also not to make out that you are stupid but is the mpg in the same folder as the *.c file you are running. i found that it only runs from the same directory. also for somereason see if media_loop works, when trying to code a similar thing today i found that loop worked (i needed it to loop anyway).

Re: Media_play [Re: DaGr81] #317754
04/02/10 10:34
04/02/10 10:34
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
I had the same problem. I found out, "Well this worked for me" that the media_play only played media of a certain resolution and also if you didn't lock the FPS to around 60 they where choppy.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1