Vuforia developers can move their augmented reality platform to the cloud on your preferred device(PC/android/iOS with hosted virtual desktop from CloudDesktopOnline with 24*7 excellent support from one of the best DaaS providers – www.Apps4Rent.com.
Augmented Reality Video Playback
In this Augmented Reality Video Playback tutorial video scales up when you get further away from the image target and scales down to original size, when you get close to the image target.
Download # 5.2.4 version Unity3D 32bit is available from here
Download # Download and Import Vuforia Advanced from Advanced Topic section for Unity3D (*.unitypackage file)
You can download it also from here.
Download # Print Euforia of Beauty Logo for Scene Augmentation and Create the Tracker (*.jpg file)
Download # You Can Use Already Created Tracker Based on Euforia of Beauty Logo (*.unitypackage file)
Download # Print Chips and Stones Targets for Scene Augmentation (*.pdf file)
Download # Archived App Content (*.m4v file video , C# scaling code, etc.) (*.rar file)
Download # Download Whole Augmented Reality VideoPlayback Tutorial Project Files (the result to test it) (*.rar file)
Download # Download app for Android device (*.apk file)
Tags: augmented reality, Augmented Reality and video, videoplayback
good!
does the video when we scan has backsound?
What do you mean by backsound?
Thanks! I was searching for a tutorial like this!
Video with a new marker can not be played. The video with the marker provided can be played. Do I need to upgrade to Unity Pro to play the video? Thanks in advance. 🙂
No need for Unity3D Pro license, really, it’s possible to make it on your own target just some attention is needed. Did you follow my steps?
I did everything step by step but my videos wont play.
It shows up but it gives me the x image and when i click on it it gives me the loading image forever.
How do i get my video to actuall play?
actually play,
sorry
ok
Do you have any idea whats wrong?
Why my video and image appears inverted ? How can I fix that ?
Struggling with this also, changing orientation by – scale does not work.
The video in preview is correct, but when playing is inverted D:
Aha fixed it, select the “Video” prefab, change Transform: Scale from +(number) to -(number), it inverts the image.
Example:
Scale X 0.1 Y 0.1 Z -0.1 <—
Doesn’t work for me. I tried -0.1 and 0.1 but nothing change.
try to invert X axis X 0.1 Y -0.1 Z 0.1 (it worked for me)
Sorry, it is
X -0.1 Y 0.1 Z 0.1
My bad i forgot to actually export it into a android project
Now it works
For any one reading the comments
THE VIDEO WON’T PLAY IN THE EDITOR YOU HAVE TO EXPORT IT OR IT WONT’ WORK
I just want to say you are a beast, really appreciate the effort you put in.
Hey i downloaded ur APK for testing it and when i click on the video, it loads for ever, any idea of what im doing wrong or anything?
Please rebuild the apk file using provided project files. It should work.
hello sir, this tutorial is very nice..
but i want ask the c# code in appcontent..
did you has update the new c# code in appcontent
I didn’t need to. Why do you ask?
How to play video continuously when i am taking camera focus from target. Thanks in advance.
Hi Kiran,
Did you find out how to play video continuously when target is moved out of camera’s focus? We would like ideally to use Vuforia to only trigger video player, so it comes out of the image and turning/moving towards the screen finally getting into the place. Once it’s in the place we can touch play button for video to play in the full screen mode. Also would be nice to close finished video and return to the targeting mode to trigger another video from different image. Any help would be greatly appreciated. TIA.
Only video preview in full screen mode would not depend on the tracking state.
About other needs – there is no easy description how to do so, you just need to code, but I don’t think you’ll be able to have some additional buttons (from your side) when the video is in full screen.
Thank you, will try it.
why cant i find the appmanager??
Hi, I followed your tutorial and worked perfect! than you so much for providing this kind of knowledge, I really appreciate it.
What I would like to ask you, is how can I get the resulted .apk being as light as possible? Could you give me some tips on that?
I assume you only use videos in the app. So you could stream it from cloud.
How can I do that? (Streaming from cloud.)
hi, i followed your tutorial, and i couldn’t find AppManger.cs and SceneViewManager.cs in /Asset of Unity.
could you tell me how and where can i find it.
Hey please can you tell be how can i put my own video instead of the video in appcontent file. Or how do you convert the video to its meta files.
The same way I did in the video, you don’t need to convert to meta files.
So basically you mean i just have to put my video in the appcontent folder instead of your augmented_reality_technology?
By doing this can my video play instead of the video provided by you?
Pretty much, don’t forget to add file extension *.m4v.
I tried it but when i play it through mobile the moment i click on the screen to play the screen goes black…any specific mistake that i am doing ? can you please tell me?
thank you for your tuorial, it’s very helpful
i followed your tutorial, but i i’ve an error like this :
Error attempting to SetHeadsetPresent
UnityEngine.Debug:LogError(Object)
Vuforia.VuforiaAbstractBehaviour:SetHeadsetPresent(String)
Vuforia.VuforiaAbstractBehaviour:Start()
how to fix it ?
Hello Edgaras,
thank you very much for your tutorials.
I tried this with my own video and it works perfectly.
I also changed the orientation of the video by Selecting VIDEO in Hierarchy and changing the X Scale value from 0.1 to -0.1
I have a problem when I pause the video and play it again: the music start from beginning but the video remain blocked.
Where is the problem? Maybe because I stream an MP4 video instead of M4V?
Thank you very much
Marco
when i import videoplayback package, i got these error:
Assets/Common/MenuOptions.cs(10,19): error CS0234: The type or namespace name `UI’ does not exist in the namespace `UnityEngine’. Are you missing an assembly reference?
Assets/Common/SplashAbout/AsyncSceneLoader.cs(7,19): error CS0234: The type or namespace name `UI’ does not exist in the namespace `UnityEngine’. Are you missing an assembly reference?
Assets/Common/SplashAbout/LoadingScreen.cs(10,19): error CS0234: The type or namespace name `UI’ does not exist in the namespace `UnityEngine’. Are you missing an assembly reference?
how to solve it?
I have the same problem as:
” I did everything step by step but my videos wont play. It shows up but it gives me the x image and when i click on it it gives me the loading image forever” also I can’t find this file “AppManger.cs”. Any idea I use the latest unity and Vuforia plugins
I noticed there were questions on the videos being inverted upon tests. Mine is doing the same. I have tried all suggested. Can any help regarding where the proper axis change is made?
Current setting for ImageTarget is: X -0.1 Y 0.1 Z 0.1
Thanks in advance.
I ‘ve tried to make video playback like this. but the unity said that “IsampleAppUIEventHandler” cannot be found. it’s because I dont have that file in my project. so where I can get that file ???
No audio in android player? Do I need to do something specific?
There should be audio, nothing additionally is necessary.
why my appmanager.cs got error
#region PUBLIC_MEMBER_VARIABLES
public string TitleForAboutPage = “About”;
public ISampleAppUIEventHandler m_UIEventHandler; (The type or namespace name ‘ISampleAppUIEventHandler’ could not be found)
#endregion PUBLIC_MEMBER_VARIABLES
#region PROTECTED_MEMBER_VARIABLES
public static ViewType mActiveViewType;
public enum ViewType { SPLASHVIEW, ABOUTVIEW, UIVIEW, ARCAMERAVIEW };
#endregion PROTECTED_MEMBER_VARIABLES
#region PRIVATE_MEMBER_VARIABLES
private SplashScreenView mSplashView;
private AboutScreenView mAboutView;
private float mSecondsVisible = 4.0f;
#endregion PRIVATE_MEMBER_VARIABLES
//This gets called from SceneManager’s Start()
public virtual void InitManager()
{
mSplashView = new SplashScreenView();
mAboutView = new AboutScreenView();
mAboutView.SetTitle(TitleForAboutPage);
mAboutView.OnStartButtonTapped += OnAboutStartButtonTapped;
m_UIEventHandler.CloseView += OnTappedOnCloseButton;
m_UIEventHandler.GoToAboutPage += OnTappedOnGoToAboutPage;
InputController.SingleTapped += OnSingleTapped;
InputController.DoubleTapped += OnDoubleTapped;
InputController.BackButtonTapped += OnBackButtonTapped;
mSplashView.LoadView();
StartCoroutine(LoadAboutPageForFirstTime());
mActiveViewType = ViewType.SPLASHVIEW;
}
public virtual void DeInitManager()
{
// mSplashView.UnLoadView();
// mAboutView.UnLoadView();
// m_UIEventHandler.CloseView -= OnAboutStartButtonTapped;
// m_UIEventHandler.GoToAboutPage -= OnTappedOnGoToAboutPage;
InputController.SingleTapped -= OnSingleTapped;
InputController.DoubleTapped -= OnDoubleTapped;
InputController.BackButtonTapped -= OnBackButtonTapped;
m_UIEventHandler.UnBind();
}
public virtual void UpdateManager()
{
//Does nothing but anyone extending AppManager can run their update calls here
}
public virtual void Draw()
{
m_UIEventHandler.UpdateView(false);
switch (mActiveViewType)
{
case ViewType.SPLASHVIEW:
// mSplashView.UpdateUI(true);
break;
case ViewType.ABOUTVIEW:
mAboutView.UpdateUI(true);
break;
case ViewType.UIVIEW:
m_UIEventHandler.UpdateView(true);
break;
case ViewType.ARCAMERAVIEW:
break;
}
}
#region UNITY_MONOBEHAVIOUR_METHODS
#endregion UNITY_MONOBEHAVIOUR_METHODS
#region PRIVATE_METHODS
private void OnSingleTapped()
{
if (mActiveViewType == ViewType.ARCAMERAVIEW)
{
// trigger focus once
m_UIEventHandler.TriggerAutoFocus();
}
}
private void OnDoubleTapped()
{
if (mActiveViewType == ViewType.ARCAMERAVIEW)
{
mActiveViewType = ViewType.UIVIEW;
}
}
private void OnTappedOnGoToAboutPage()
{
mActiveViewType = ViewType.ABOUTVIEW;
}
private void OnBackButtonTapped()
{
if (mActiveViewType == ViewType.ABOUTVIEW)
{
Application.Quit();
}
else if (mActiveViewType == ViewType.UIVIEW) //Hide UIMenu and Show ARCameraView
{
mActiveViewType = ViewType.ARCAMERAVIEW;
}
else if (mActiveViewType == ViewType.ARCAMERAVIEW) //if it’s in ARCameraView
{
mActiveViewType = ViewType.ABOUTVIEW;
}
}
private void OnTappedOnCloseButton()
{
mActiveViewType = ViewType.ARCAMERAVIEW;
}
private void OnAboutStartButtonTapped()
{
mActiveViewType = ViewType.ARCAMERAVIEW;
}
private IEnumerator LoadAboutPageForFirstTime()
{
yield return new WaitForSeconds(mSecondsVisible);
mSplashView.UnLoadView();
mAboutView.LoadView();
mActiveViewType = ViewType.ABOUTVIEW;
m_UIEventHandler.Bind();
yield return null;
}
#endregion PRIVATE_METHODS
someone help me
Hey Guys, i have used your tutorial to make the simple video playback app, and its working great, i just want to know, how we can change size of video appearing after tracking the image target ?
Please i need help
how to increase the rate of scaling videoplayback in unity . i want my scaling should be doubled how can i do this
how to increase the rate of scaling videoplayback in unity . i want my scaling should be doubled how can i do this ?
how to export the AR app in unity, I always get the error message : Unable to locate Android SDK
Its because you need to install the sdks in the website of android.
Downloading android studio will help you then you need to locate inside unity the path
Thats it.
hi sir
your tutorials are great. thanks for uploading…
can we integrate 2 or more videos with single Image target and make next and previous buttons to change between videos…
is it possible ?
thanks in advance
thanks for all i have a questions the size off app so big can we add link of the video ?? like save the video in youtube and see it with AR ??
Download # Archived App Content (*.m4v file video , C# scaling code, etc.) (*.rar file) link broken
Actually, it’s working. Starts downloading at once.
I am not able to download any the CS codes please help thank you.
( *.rar file ) error when downloading nothing comes in.. please help
Hello, it is automatically downloaded in the background. Check your browser/downloads folder.
why i cannot load my database using vuforia-samples-advanced-unity-5-0-10?
Please help