Theora playback support?
by Ronald Ian Bantayan · in iTorque 2D · 04/12/2009 (10:23 pm) · 11 replies
Using a GuiTheoraCtrl works fine in TGB, but once the project has been compiled for the iDevice, passing the playback command
seems to have no effect. The video file does not play on the iDevice. Is this another one of iTGB's many, many 'gotchas'???
EDIT:
Apparently, the iPhone only supports H.264 simple profile and MP4 video. Also, digging deeper into the forums, even OGG audio streams put serious strain onto the CPU, what more if it's full video? Oh well .. .
Apple has provided a sample Xcode project on how to use MPlayer to playback supported video files (more information here.) Any chance GG might implement this into iTGB in the future? One can only hope .. .
function play()
{
*.setFile("game/data/video/*.ogg");
}seems to have no effect. The video file does not play on the iDevice. Is this another one of iTGB's many, many 'gotchas'???
EDIT:
Apparently, the iPhone only supports H.264 simple profile and MP4 video. Also, digging deeper into the forums, even OGG audio streams put serious strain onto the CPU, what more if it's full video? Oh well .. .
Apple has provided a sample Xcode project on how to use MPlayer to playback supported video files (more information here.) Any chance GG might implement this into iTGB in the future? One can only hope .. .
#2
04/13/2009 (5:00 am)
Not sure about the separate chip for WAV files and MP3s, but I'm pretty sure compressed media eats up CPU cycles to decode. I'm not aware of a special chip that does just that (except for PVRs of course.)
#3
04/13/2009 (7:02 am)
Compressed sounds in iphone supported formats are handled by a dedicated audio chip. they still cost a little cpu time for the IO and alike, but doing OGG on cpu costs ~50% on an ipod touch 1st gen.
#4
Stick to the Apple-supported formats :)
04/13/2009 (2:21 pm)
My tests show 25% CPU usage just for Vorbis decoding (and 45% with Thumb code) on a 2G iPod touch. Theora was struggling on my desktop, which is a pretty nifty piece of hardware. There's also an always-running media-related process which will eat up to 10% CPU on my device. The CPU schedule is pretty fully booked as is.Stick to the Apple-supported formats :)
#5
05/23/2009 (8:10 am)
So, is there a built-in function on iTGB to play a video?
#6
05/23/2009 (4:10 pm)
I would like to know if iTGB has the ability to play video too... mmm ... cutscene!
#8
05/24/2009 (5:00 pm)
Ok, I can understand the just of the media framework and could possibly get a video file to play. Can someone tell me where to put such code and how to link it to code or a function in TorqueScript? Hopefully that's not too much of a request, but I would be so grateful. Would a inserting a 2-second splash screen of iTGB in the video file suffice for the license if I can play an intro video?
#9
During that phase, you can't play a video anyway
05/24/2009 (5:24 pm)
if you make the itgb logo the app loading image (Default.png), its near granted to be there 4s+ after which you then can play your video without breaking your head too much.During that phase, you can't play a video anyway
#10
05/24/2009 (7:59 pm)
I thought I might have a video where it would cycle a few splash screens with a little pre-rendered pizazz. Besides, the iTGB logo is rather bland as an intro. No offense, GG. And, since my game is designed in portrait mode, the landscape logo might initially throw the user off thinking he has to rotate to landscape to start the game.
#11
They are handled by OSX, only showing the Default.png, independent if you like that or not. No video or anything at that point.
You will have to contact the licensing to see what you are allowed to do with the logo and what not.
05/24/2009 (8:17 pm)
The initial 4+ seconds are out of your control.They are handled by OSX, only showing the Default.png, independent if you like that or not. No video or anything at that point.
You will have to contact the licensing to see what you are allowed to do with the logo and what not.
Torque Owner Ee
*If I'm not correct, let me know :P