Use of Video Texture on iOS

Software: Away3D 4.x

Tig, Newbie
Posted: 19 February 2015 01:03 PM   Total Posts: 5

Ok, this is going to be quite a wordy one..

I’ve managed to create a very simple plane with a video texture on it. The video plays fine, the plane looks alright, everything is good. But on iOS the video is choppy, poor quality and skips complete sections. I need this video to be clear quality as it will be used in image recognition as well (another Away3d thing - it will play a video with associated image recognition).

The video seems to play fine in the Flash tester but it doesn’t seem to matter how I encode the video, the same thing happens.. in fact, I’d almost say the quality is getting poorer.

Questions:
1. Is there a standard encoding of mp4 to flv for VideoTexture?
2. Is this the right code to be using? (it’s what I’ve gathered looking at tutorials/other forum posts)

//at the very top, before the public class definition:
[SWF(backgroundColor="#000000"frameRate="24"quality="HIGH")]

//further in after the scene has been initiated
var _texture:VideoTexture = new VideoTexture("assets/test_vid2.flv"256256);
var 
_material:TextureMaterial = new TextureMaterial(_texture);
   
//setup the scene
_plane = new Mesh(new PlaneGeometry(512,288,1,1,false,true),_material);
_view.scene.addChild(_plane);
   
_texture.player.play(); 

3. Is VideoTexture the correct method to be using in this case??

Thanks in advance for all your input.

   

Avatar
mrpinc, Sr. Member
Posted: 19 February 2015 01:56 PM   Total Posts: 119   [ # 1 ]

The method you are using is going to be very expensive on mobile.  Using the FLV is the correct way for this method.  The latest version of AIR (17) in labs has a new feature context3D.createVideoTexture();  This would be the most performant way to get a video texture into your app but I have not tried it and I am not sure how you would go about integrating it into away 3d.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X