Log in or register to post comments

"Easy Movie Texture" can't play video in Vuforia, pls help!

April 11, 2016 - 7:17pm #1
Hi,
 
I am trying to use "Easy Movie Texture" (from the Unity Asset Store) to play video instead of using Vuforia Video Texture. I am able to get both to work separately but not together. 
 
I replaced the Vuforia Video prefab with VideoManager prefab of Easy Movie Texture, and made it play in OnTrackingFound() function, when runing on my iphone, the video just show black screen, but there was sound playing, what did I do wrong? 
 
 
Any suggestions?
 
Thanks!

"Easy Movie Texture" can't play video in Vuforia, pls help!

November 28, 2017 - 2:17am #13

Hi there,

 

You probably worked it out by now being a year ago, but for anyone else stumbling on this page, I just amended the DefaultTrackableEventHandler.cs script as follows:

public void OnTrackingFound() {
   var rendererComponents = GetComponentsInChildren<Renderer>(true);
   var colliderComponents = GetComponentsInChildren<Collider>(true);
   var canvasComponents = GetComponentsInChildren<Canvas>(true);

   // Enable rendering:
   foreach (var component in rendererComponents)
      component.enabled = true;

   // Enable colliders:
   foreach (var component in colliderComponents)
      component.enabled = true;

   // Enable canvas':
   foreach (var component in canvasComponents)
      component.enabled = true;

   var mediaPlayerCtrl = GetComponentInChildren<MediaPlayerCtrl> ();

   if (mediaPlayerCtrl != null) {
      mediaPlayerCtrl.Play ();
   }
}

Please note that I've use singular GetComponentInChildren<MediaPlayerCtrl>() because I only had of these components per ImageTarget. Also note that I implemented a pause on tracking lost, which is the same principle but with Pause () as opposed to Play () - Schimples!

"Easy Movie Texture" can't play video in Vuforia, pls help!

September 14, 2017 - 6:59pm #12

I'm In you same situation. Have you found a solution ? 

Thanks in Advance and Best Regards

 

 

"Easy Movie Texture" can't play video in Vuforia, pls help!

November 20, 2016 - 12:54pm #11

hi jove 

im trying to add the GetComponentInChildren<MediaPlayerCtrl>().Play(); to  In the DefaultTrackableEventHandler.cs  OnTrackingFound() of Vuforia, 

but i keep getting the error that play or pause are not definitions contained within Mediaplayer[] 

do you have examples of how you altered DefaultTrackableEventHandler.cs? was it only one line of code that you added.

 

in general im just concerned if there is an elegant way to use movie texture with out have the videos on autoplay and being in control of when the spawned

 

if you could fill me in on your thoughts i would appreciate it greatly

"Easy Movie Texture" can't play video in Vuforia, pls help!

August 30, 2016 - 12:55pm #10

Hi,

I'm trying to play a video using Easy Video Texture and Vuforia.The demo version of Easy Video Texture works... until I import Vuforia package then I got errors that APK can't be build.

Any advices ?

 

Thanks

"Easy Movie Texture" can't play video in Vuforia, pls help!

July 25, 2016 - 6:13pm #9

hi.. have found the solution? please share.. because i got it right for 1 second.. then i build the apk again.. it wont work

"Easy Movie Texture" can't play video in Vuforia, pls help!

June 30, 2016 - 9:31pm #8

Hi guys i was trying to sort this problem for whole day and finally came to a solution.

just follow these steps if you are using AR with EasyMovieTexture with unity.

* Unity      - V5.3.4 pro Version.
* Vuforia     - vuforia-unity-5-5-9.
* EasyMovieTexture  - Easy Movie Texture Video Texture v3.20.

Procedure:

1 . In EasyMovieTexture Activate the Patch given for IOS.
2 . Remove PostProcessBuildPlayer.cs from Assets->Vuforia->Editor->Scripts.
3 . Add this block of script which is given below in DataBaseLoadBehaviour.cs in ARCamera.    // this action will let normal AR with 3D models to work.
 
#if UNITY_IOS
 
  AddExternalDatasetSearchDir(Application.dataPath + "/Raw/QCAR/");
 
#endif


4 . Modify block of code in CustomVideoPlayer.mm     // this is for fixing VideoTexture Errors.

AVPlayerStatus status = (AVPlayerStatus) [[change objectForKey: NSKeyValueChangeNewKey] integerValue];


lastFrameTimestamp = _curFrameTimestamp;
          size_t w, h;
          w = (int) _videoSize.width;
          h = (int) _videoSize.height;
          curTex = CMVideoSampling_SampleBuffer (& _ videoSampling, _cmSampleBuffer, & w, & h);  

5 . Build the IOS project file by checking LinkLib in Build properties in Unity.

6 . After building open the XCode in Built file.

7 . Add Team in general Setting.

8 . in Build Setting enable BitCode to NO.

9 . ARC In objective C in should be turned to Yes(by Default).  // if you Disable ARC for the whole project ,it will leade to other errors at that time of executing the output.

10. In Build phase ADD Security.framework in LinkBinary with Library.

11. In Build Phase ADD -fno-objc-arc to disable ARC effect on CustomVideoPlayer.mm & VideoPlayerPlugin.mm. (To disable ARC for selected files)

12. Built Success.

"Easy Movie Texture" can't play video in Vuforia, pls help!

May 23, 2016 - 9:54pm #7

I had the same problem like jove.

Thanks for the solution, it works perfectly for me.

"Easy Movie Texture" can't play video in Vuforia, pls help!

May 8, 2016 - 10:50pm #6

you can load the video and enable the auto play when image target detected in onTrackingFound method and stop , unload that video into the onTracking found method.Please try this solution i am sure it will work.

"Easy Movie Texture" can't play video in Vuforia, pls help!

May 8, 2016 - 10:44pm #5

Hi
I am using easy movies texture plugin it is playing video on texture in ios and android both. But i am getting issue in iphone6 video is displaying but there is no sound in the app while it is working fine in other device.Please help how to reslove this issue.

 

Thanks.

"Easy Movie Texture" can't play video in Vuforia, pls help!

April 15, 2016 - 9:41pm #4
I tested it on Android, it all running good, no black screen, but for iOS, the video will play black screen at the first time, if I press Home button return to the Home screen, then re-enter the app, the video plays normally, no black screen any more. 
 
So maybe it's a bug for Easy Movie Texture in iOS? anyone succeed in iOS?

"Easy Movie Texture" can't play video in Vuforia, pls help!

April 14, 2016 - 5:35pm #3

It sounds like you said you have it working - but it's not *quite* what you want. I'm a little lost on where exactly you are in this process. What is it doing now and what is the behavior you're looking for?

I've used Vuforia & EasyMovieTexture on Android for sure (without significant problems) and I feel like I've used them together on iOS but I'm less sure. It *was* autoplaying though, and it sounds like maybe you're looking for it to load paused but not start playing?

"Easy Movie Texture" can't play video in Vuforia, pls help!

April 13, 2016 - 5:57pm #2
I found the key point lead to the black screen.
 
If I uncheck the "B Auto Play" in the MediaPlayerCtrl of Easy Movie Texture,
 
In the DefaultTrackableEventHandler.cs  OnTrackingFound() of Vuforia, add 
GetComponentInChildren<MediaPlayerCtrl>().Play();
and OnTrackingLost(). 
GetComponentInChildren<MediaPlayerCtrl>().Pause();
it will show black sreen with sound playing.
 
If I do nothing with DefaultTrackableEventHandler.cs, it will play all well.
 
Any suggestions?
 
 
[update]
if I press Home button return to the Home screen, and re-enter the app, the video plays perfect!!! no black screen any more. 
 
and If I select "auto play" on the MediaPlayerCtrl, set no condition to play, it plays perfect at the begining as well.
 
I'm using iPhone, and no Android to test. is this a iOS bug or Vuforia bug? or something wrong with my code?
 
AttachmentSize
Image icon attach.jpg58.07 KB
Log in or register to post comments