"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Playing Video Over the image

Hi All, I understood the concept of tracking an image in Image Targets sample code. I am able to track the image which I uploaded using Target Management Tool. When ever image got tracked, instead of displaying another image on top of tracked image is it possible to play a video on top of the traced image using AR? I tired to play using below code -(void)renderFrameQCAR{ [self performSelectorOnMainThread:@selector(playVideo) withObject:nil waitUntilDone:NO]; } -(void)playVideo{ MPMoviePlayerController *videoViewCont = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL fileURLWithPath:@"WP_000019-qcif-180k.mov"]]; [videoViewCont play]; [videoViewCont.view setFrame:self.bounds]; [self addSubview:videoViewCont.view]; } the method is getting called but video is not playing. please give your valuable suggestions.

Hi shivintu, To add additional UI, whether video views or UI controls, it's probably best practise to create a new parent view, that parents both the EAGLView and a view that contains the overlaid content. I've done that here as a test, to play the video in a 2D pop-up overlaying the 3D/Camera vie

[QUOTE=MoSR]Hi shivintu, To add additional UI, whether video views or UI controls, it's probably best practise to create a new parent view, that parents both the EAGLView and a view that contains the overlaid content. I've done that here as a test, to play the video in a 2D pop-up overlaying the 3

[QUOTE=shivintu" />http://ar.qualcomm.at/node/2000523> 1) Using QCAR::Image won't give you what you need as what you want is the projected size of the image in the view, not the original size of the source image.

[QUOTE=MoSR]When you create the trackable, you specify a size of the trackable in your own 'internal units' (see config.xml in the project) - the scale information from the pose is relative to that. For example if your trackable is 50x50 units then if you take a 50 by 50 quad and transform it by th

The following will give you the four coordinates of the target corners within the EAGLView. Using the max/min in each dimension will allow you to specify another UIView that hides the target. I used this code to display a different coloured 10x10-pixel UIView at each corner of the target.

BTW - the target size in 3D units, that I've hard coded as {247,173}, can be recovered from the Trackable, by using it's subclass, eg. ImageTarget, see: QCAR::ImageTarget::getSize()

[QUOTE=MoSR]BTW - the target size in 3D units, that I've hard coded as {247,173}, can be recovered from the Trackable, by using it's subclass, eg.

[QUOTE=shivintu]but i am unable to change the rect of "videoV" using "s0,s1,s2,s3" Could you please explain these parameters and how can we give x,y,width,height to the videoV rect.[/QUOTE] As I stated earlier: "Using the max/min in each dimension will allow you to specify another UIView that hides

Hi shivintu, I am also trying to play video over image but i am also getting the same problem as yours method is called but video is not playing. Can u plz help me with this?

[QUOTE=nm] I am also trying to play video over image but i am also getting the same problem as yours method is called but video is not playing. [/QUOTE] You've probably done this, but check the the video runs in the player view in a test app before you start integrating with AR.

Hi nm, It would be worth checking that the NSURL and 'video' are valid objects. The path you are giving should either have its full path added or, if the video is in the bundle, you should be using something like: [CODE] NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@

can somebody help me with a sample example.... or tell me where I have to write the code viewController = [[ARViewController alloc] init]; parentView = [[UIView alloc] initWithFrame: screenBounds]; newView = [[EAGLView alloc] initWithFrame: screenBounds]; [parentView addSubview:view]; NSURL *url =

sallespro

Mon, 08/29/2011 - 02:06

Hi MoSr, it is good to know you're pushing functionality ahead ! I have already successfuly implemented the "Toast" example and called a video intent, but I would like to know how overlay the AR & video playback ( Not to include the video frames as a texture into the 3D scene ). The problem I fo

Hi ksiva, Thanks for replying but using your way the video starts playing when the app startsbut i want to play the video when the camera focuses on the trackable. Plz help me with this...

sallespro and nm: It seems like your questions are related (one for Android, one for iOS). In either case, I might set up the video view ahead of time, add it to the view hierarchy, hide it, and wait until a target is found to show the view and play the video.

can you specify how i can store the moviecontroller in the eaglview? i have a method called - (void)showMovieController in my appdelegate where i switch on the video but when i call it via selector in my eaglview it crashes cause it does not find this method.