Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Playing video with AGK2

Author
Message
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 9th Oct 2014 17:38
I've tried several formats that play normally within windows (mov/mp4/wmv) but I can't get any of them to play in agk2... Any ideas?

Dutch
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 9th Oct 2014 17:49
hmm, can say only what docu said.
see return value.
some video formats have sub formats, means .mp4 is not .mp4.

here u can get a fee video converter if u find the dl link there.
do not click dl from advertising there!
http://www.erightsoft.com/SUPER.html

Quote: "This command loads a video file ready to be played. Only one video file can be loaded at a time so loading a video deletes any existing video. On iOS, Android, and Mac it is recommended that you use .mp4 files with the H264 (MPEG-4 AVC) codec for video. For audio it must be encoded in MP3 or AAC.


On Windows it depends on the codecs installed and although in some cases it will play mp4 files it is recommended that you use wmv on Windows for maximum support.

Returns 1 if successful, 0 if there was an error, -1 if this platform does not support videos. "


AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 9th Oct 2014 18:27
What do you mean by "play normally within Windows..," Play normally with what?

-- Jim - When is there going to be a release?
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 9th Oct 2014 23:24
Well, the files play fine in vlc or windows media player, but whatever I do or use in agk2, it returns a zero...

Dutch
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Oct 2014 00:30 Edited at: 10th Oct 2014 00:31
ok, 0 means error try
if GetErrorOccurred()
print(GetLastError())
maybe you get some useful information.

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 10th Oct 2014 09:03
Agk uses DirectShow filters and filtergraphs. You need to install these to play things other MPEG-1 and WMV.

Try the K-Lite codec pack - it's free.

-- Jim - When is there going to be a release?
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 10th Oct 2014 10:54
I'm a pro with video codecs (and have played with K-Lite), so I'm aware of these things it needs (not bragging, just letting you know the basics are covered). I'll check the error reporting tip...

Dutch
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 10th Oct 2014 10:58
Error tip was very useful: this is what I got:

ok=loadvideo("d:\video.wmv")

File not found!`

I'm probably overseeing the fact that the media should be in some project folder and not on a normal windows path?

Dutch
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 10th Oct 2014 11:00
Yep, it needs to be in the media folder. Somehow forgot that fact. Thanks for all your help guys!

Dutch
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 10th Oct 2014 12:05
wow, i am surprised, a error message with useful information

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265

Login to post a reply

Server time is: 2024-05-04 17:40:35
Your offset time is: 2024-05-04 17:40:35