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.

Author
Message
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 25th Sep 2013 16:28
Will there be a method to play video files? I am using Tier 1. Or would this be in Tier 2 only?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 25th Sep 2013 17:19
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 25th Sep 2013 18:04
Wow. I need to check my eyes! It's like it didn't exist until you pointed it out.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 25th Sep 2013 21:43
You're welcome... Trust me, I have done the same many many times
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 26th Sep 2013 06:40 Edited at: 26th Sep 2013 06:43
I am going to have to re-open this post...

No video formats will play. The video is up for a fraction of a second then is gone. I have been using Dark Basic with success and was hoping to convert over to AGK. Doesn't look like that will happen in Tier 1 anyway. ANyone try this in Tier 2?

So I am still asking, will there be a method to play video?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 26th Sep 2013 07:06 Edited at: 26th Sep 2013 07:07
the method is the good one. Use mp4 (h264) format or wmv (for windows).

And avoid fullscreen on windows. it seems there is a bug when trying to play in fullscreen (only on windows). will be fixed soon i think

--------------
AGK Chat (Alpha)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 28th Sep 2013 02:30
I tried .wmv and NOT fullscreen. It is windowed and I set the video size for the size of the actual video.

I will try broadcasting and see what happens.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 30th Sep 2013 00:11 Edited at: 2nd Oct 2013 18:33
After seeing the example code run successfully, I rendered a H.264 formatted video and used the example code. Does not play. The display screen gets HUGE and BLACK.

I am setting the initial screen size to 640x480 and the video is the H.264 format (mp4) at 640x480, and setting the video size to the same 640x480. What in the logical universe is going on?? If necessary, what in the illogical universe is going on??

Is there something else about the H.264 format that needs setting?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 30th Sep 2013 00:30 Edited at: 30th Sep 2013 00:35
After a bit of experimenting, H.264 format DOES NOT work. THe example video in the examples folder is not H.264, it is MPEG4. By opening both the example and mine I saw the difference in my video editing software. When I render the video as MPEG4 then it works. So the help documentation looks to be incorrect in stating that H.264 is needed while the example code uses something else.

However, now that the video plays, it is still HUGE! The render was 640x360 and the AppGameKit settings are the same. So why is it larger than my monitor screen?

I went back to the original example video and it is doing the same thing. WHy would it work correctly once and then after I try my video it doesn't work properly anymore? I changed ONLY THE NAME of the file and left the other code the same.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 30th Sep 2013 00:38 Edited at: 30th Sep 2013 00:50
I know that H.264 is a MPEG4 type of format, but something is different between (what my editing software calls) H.264 and MPEG4.

I am now having to set the Virtual Resolution in order to get the video to fit on screen. This was not in the original example code, but now it is needed (for some unknown bizarro reason).

Moving sprite around is cool for most game applications, but I also need video. Otherwise the AppGameKit is not a path I can follow...

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 30th Sep 2013 01:05 Edited at: 1st Oct 2013 20:43
So far, my experience with video in the AppGameKit shows me that it is extremely rudimentary and needs work before it is worth using.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 02:32 Edited at: 2nd Oct 2013 18:36
When deleting a video I get this purple remnant, which goes away after a couple of seconds. It also appears outside of the EXE screen in the upper-left of the monitor. It goes away in a couple of seconds. But wouldn't this be extremely annoying to have an app perform thus?



Also, after the video finishes, it disappears. It would be beneficial if the last frame remained (as in DBPro). I could probably work around this with an image of the last frame popup when the video stops playing.

Are there any future plans to have the ability to load at least one more video to have it buffered so it can play without hesitation?

I would like to continue writing everything with AppGameKit, but I cannot do things that can be done in Dark Basic. Is this merely growing pains?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 18:32 Edited at: 2nd Oct 2013 18:38
Here is a screen shot showing the "other" video display that occurs when playing a second video or deleting the first. This turns out to be the Active Movie window. I saw this happen in DBPro which is why I wasn't using MPEG4 video. If you use .wmv or .mov that wouldn't happen. But in this case it happens with any format.

(for some reason image of the video is not visible in my screen shot but the display rectangle can be seen)



www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Oct 2013 18:50
I suspect this is because of the way AppGameKit is using DirectX to display it in Windows. Hopefully this gets fixed up.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 18:58
Doesn't look feasible for my application to use the video function until the deletion issue gets resolved. The 1 to 3 second duration of the purple rectangle after video deletion is not an acceptable behavior.

If I try 'not deleting' and loading another video, that eliminates the purple rectangle, however the video playback eventually gets slower and slower. I checked in Task Manager and the memory usage never went above 150 MB (bounced between 90 and 150), but still the 'not deleting' was causing issues.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 19:01
Is there a way to report bugs, or does someone read all the threads to find them?

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Oct 2013 19:10
This is where bugs are reported.

Now, in my position as AppGameKit Community Tester (not an employee), I might be one of the people who needs to review what you post there and decide if it is actually a bug or something else. So, if you can create a very simple sample program (and it looks like you have one, based on the image) that shows the issue and upload the file that you are working with, then I can test and move it along as a 'confirmed' bug. Given enough data and code and such, I can usually do that process fairly quickly.

Make sure to mention the AppGameKit version (v10819 is the current beta, for instance) and your Windows version (very important).

And, just to be sure, do you have DirectX June 2010 SDK installed? That is the minimum version required.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 20:02
I have been experimenting in order to get this to work for me. It appears that the anomaly happens just the first time, yet does occur.
Once the Active Movie screen pops up the first time, then it looks like the purple rectangle and delay no longer happen, unless I re-initialize everything. But still a bug.

Of course, you will have to create your own video clips...


www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Oct 2013 20:50
I ran your code using the mp4 file in the video demo provided with v10819 and could not reproduce your problem at all.

The video played fine, no strange purple boxes anywhere.

This is my version of the test code (it allows you to control the test and exit it cleanly):


Note, make sure to click on the app when the video is playing if you want to use the escape key to stop it. Apparently starting the video defocuses the app window.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 23:03
How about the fact that H.264 format does not work but regular MPEG4 does? Is that a bug?

Both formats play on my computer: Windows Media Player, Sony Vegas, After Effects. But I cannot get H.264 to play on the AppGameKit, only regular .mp4, .mov, and .wmv.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 23:20 Edited at: 2nd Oct 2013 23:22
A bit more info:

On Windows (the EXE created by AGK):
1) .WMV files play with a small delay (about 250ms) after deleting video (with purple rectangle anomaly)
2) .MP4 files have longer delay (1-3 secs) after deleting video (with purple rectangle anomaly)

On Nook tablet using AppGameKit Player:
1) .WMV files do not play
2) .MP4 files play, bit of a glitch between videos, but I think this happens anyway because the next video is not buffered

I can live with the results I can get now on my Nook, but a smoother transition between videos swapping would be better.

I do have an app on Google Play (still in beta awaiting testers) that has a video in the 'about' screen. It has a glitch when I loop the video. So that may be for the same reason as having no buffer, except that I do not delete the video, I merely PlayVideo() again after it stops.

You say you don't see a bug, but there are performance issues afoot at least. Even at the AFK end there is a glitch in video play.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Oct 2013 23:26
Do you still get the delays and purple box if you try this?


The Sync() calls allow the AppGameKit engine to actually do things.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
mindsclay
12
Years of Service
User Offline
Joined: 1st May 2012
Location: Rocklin, CA, USA
Posted: 2nd Oct 2013 23:32 Edited at: 2nd Oct 2013 23:36
Just now tried it, and yes same issue.

My current version of code is working a lot better using SYNC() every time I make a change or look for input. That definitely improves things. I think the main issue is the Windows operating system interfacing my video card via DirectX, but I can't do anything about that at this time.

As long as I can get it to work relatively okay on my Android tablet, I can live with it for now.

www.mindsclay.com
lucifermagus.mindsclay.com (not working with Firefox)
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Oct 2013 00:10
It is generally a good idea to put Sync() calls in loops that are waiting for some process to finish. Especially for iOS and Android where they spin off lots of processes. It is in the Sync() call that those processes are tracked and taken care of. The video handling is a separate process started in both platforms.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 20:00:51
Your offset time is: 2024-11-24 20:00:51