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 / AGK Video Playback?

Author
Message
SeanBoyle
12
Years of Service
User Offline
Joined: 12th Sep 2011
Location:
Posted: 13th Sep 2011 02:39
Hi, I just started exploring the AppGameKit engine a few days ago and I was curious about this: Is there currently any way to play videos (such as mp4 files) onto a sprite surface or to the background of my AppGameKit application? We plan on using the tier2 AppGameKit in our project.

Or is there plans for future releases to support video playback?

We would mostly be using it to play fullscreen videos in the background, behind our sprites. Previously in our Windows applications we used DirectShow for this, which worked great, but a simple solution in the AppGameKit would be very useful for us.

Thanks for making such an easy to use engine I really appreciate it guys.
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 13th Sep 2011 09:55
No support for video playback at the moment, although it is something for us to consider for an update.
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 13th Sep 2011 10:44
Strangely enough, I was going to post the same thing this morning. In my case, I think I'd just want full screen video for use in things like pre-rendered intro sequences and so-on.

But if there are options for displaying sprites on top the video that would great, as would 'video sprites' that could be resized and moved around the screen.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Sep 2011 12:22
I think it's time for us T2 users to start checking our how to implement important functions not supported by AppGameKit like video playback, in app purchases, and post some examples...
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 13th Sep 2011 15:10
hi guys i found this post it might be a start for someone to start investigating vid playback.

Quote: "Create an AVURLAsset with the URL of your video - which can be a local file URL if you like. Anything QuickTime can do is fine, so MOV or M4V in H.264 is probably the best source.

Query the asset for tracks of type AVMediaTypeVideo. You should get just one unless your source video has multiple camera angles of something like that, so just taking objectAtIndex:0 should give you the AVAssetTrack you want.

Use that to create an AVAssetReaderTrackOutput. Probably you want to specify kCVPixelFormatType_32BGRA.

Create an AVAssetReader using the asset; attach the asset reader track output as an output. And call startReading.

Henceforth you can call copyNextSampleBuffer on the track output to get new CMSampleBuffers, putting you in the same position as if you were taking input from the camera. So you can lock that to get at pixel contents and push those to OpenGL via Apple's BGRA extension."


chunks

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Sep 2011 18:35
Yes it would be nice to have. It would certainly help to add polish to a product. I would hope that it will be included as an update at some point in the future.

Login to post a reply

Server time is: 2024-04-24 02:08:20
Your offset time is: 2024-04-24 02:08:20