Topic locked

MODE_OPTIMIZE_SPEED with video

October 30, 2014 - 5:29am #1

I have changed the camera mode to MODE_OPTIMIZE_SPEED to resolve object/camera jitter and it appears to work a treat as now my objects remain very stable.

However what I notice now is that video playback is suffering from a slightly but noticable lagging.

Is this an expected "must live with" side affect of MODE_OPTIMIZE_SPEED?

Thanks 

MODE_OPTIMIZE_SPEED with video

November 4, 2014 - 2:24am #8

Yes, of course we aim to have this fixed in the next release.

Until then, you'll need to make this modification manually.

 

 

MODE_OPTIMIZE_SPEED with video

November 4, 2014 - 1:51am #7

Works like a charm! 

I went directly and made the suggested mods to the files in my own project and can confirm works perfect on both iPhone 6 Plus and iPad 4.

I know I will need to make this mod on each new project, can assume it will be fixed in a later version of Vuforia?

 

Thanks for your help, really appreciated ;-)

MODE_OPTIMIZE_SPEED with video

November 4, 2014 - 1:11am #6

OK. We are aware of an issue when running the Vuforia VideoPlayback on certain high-end iOS devices (we observed lower video rates on 64bit devices, like the iPhone6+, but cannot exclude the iPad 4 may exhibit the same issue);

could you try the following:

if you are using the Unity version of the Vuforia Videoplayback sample:

  • go to the /Assets/Plugins/iOS/VuforiaMediaSource/ directory under your Unity sample project root.
  • open the VuforiaMedia.xcodeproj, and in Xcode edit the VideoPlayerHelper.m source file
  • find the method createFrameTimer
  • at the beginning of the createFrameTimer (just before the line "frameTimer = [NSTimer schedule...... ]) add this line of code:

      [[NSThread currentThread] setThreadPriority:0.5];

  • once you've made and saved the changes, you can close Xcode and rebuild the libVuforiaMedia.a, by running the build.sh script provided with the VuforiaMedia project (located in the same directory); this script will build the libVuforiaMedia and will also automatically replace the original libVuforiaMedia.a library with the newly built one.
  • you can then reopen your Unity VideoPlayback project, click Cmd-R to refresh all the Assets (which also include the libVuforiaMedia plugin that you have just rebuilt) and then rebuild the Unity project and run on your iPad/iPhone

 

Some usage notes about the 'build.sh' script:

before running the build.sh, make sure that the build.sh points to the valid Xcode path, i.e., open it in a Text Editor and adjust this line:

export DEVELOPER_DIR=/Applications/Xcode_511.app/Contents/Developer

You need to put there the actual Xcode.app that you're using in the path above.

and, if using iOS 8.0 or 8.1, also change this line:

export CONST_IOS_SDK=iphoneos7.1

to

export CONST_IOS_SDK=iphoneos8.0   (or iphoneos8.1)

 

Let me know if it goes any better.

 

MODE_OPTIMIZE_SPEED with video

November 4, 2014 - 12:40am #5

correct, it is not the background video but the actual video movie played from the m4v file.  When set to Default the video playback is smooth but when set to spped yes the frame rate of the video appears lower

MODE_OPTIMIZE_SPEED with video

November 4, 2014 - 12:37am #4

...video playback is suffering from a slightly but noticable lagging.

Are you referring to the lagging of the video which is being played on the texturel in the VideoPlayback sample ? (not to the camera video background, right?)

does the lagging appears as a non-smooth playback (i.e. as if the video frame rate was lower than usual?)

 

 

MODE_OPTIMIZE_SPEED with video

November 3, 2014 - 11:50pm #3

I'm running it on an iPad 4 and an iPhone 6 Plus and yes it is happening on the sample app too

 

Thanks

MODE_OPTIMIZE_SPEED with video

November 3, 2014 - 7:51pm #2

What device are you running on? Is the lagging observed with the ImageTargets sample app?

Topic locked