Log in or register to post comments

Trouble following Video Playback Sample

February 20, 2014 - 10:42am #1

Hey guys,

 

I recently started using Vuforia with Unity and following the available video tutorials, managed to achieve basic AR functionality with markers displaying a 3D model on top of them. I want to enable video playback by my application, but am having problems following the provided sample. I followed the same approach as when following the tutorials, creating ARCamera and ImageTarget prefabs and loading the correct data set. However, I am unsure how to enable the video to play -- I tried setting the Video prefab as Child of ImageTarget, but it did not work. I searched the forums and Internet for couple of hours, but people are understandably focusing on more complicated problems and I could not find an answer to my problem.

How do I proceed to enable video playback, using the sample application provided? I believe I need to add some of the Video-related scripts to the ARCamera, but I am unable to find information/tutorial on how to do so.

I would really appreciate your help. Thank you for your time.

Trouble following Video Playback Sample

July 20, 2016 - 4:01am #11

” 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” any idea

Trouble following Video Playback Sample

January 25, 2016 - 11:04am #10

I have the same problem. everything was OK and I update and install new vuforia and now I have the same problem I cant play any video.....

Trouble following Video Playback Sample

January 16, 2016 - 5:46pm #9

i have some problem, when program play and marker tracked, video show in a screen than i touch the icon play, video cannot play. debug log

"Playing videos is currently not supported in Play Mode".

please give advice to solved the error my code.

Trouble following Video Playback Sample

December 3, 2015 - 3:03am #8

yes me too, i got the same problem with you Saeid, but i did'nt find the solution, anywhere i ask, them at the group and forum about vuforia unity ,but the resolve i did'nt find , 

maybe who are people here, can answer this question,

will be thank very much

 

Trouble following Video Playback Sample

February 1, 2015 - 10:25am #7

hi

could you help mi, i searched a lot of on the web but i could not risolve the my problem, i did all, but at the end i receve the compiler msg :

Could not initialize video player
UnityEngine.Debug:Log(Object)
VideoPlaybackBehaviour:OnRenderObject() (at Assets/Vuforia Video Playback/Scripts/VideoPlaybackBehaviour.cs:164)
UnityEditor.DockArea:OnGUI()
tnx
 
AttachmentSize
Image icon Immagine.jpg313.54 KB

Trouble following Video Playback Sample

February 21, 2014 - 12:45am #6

OK, just running the same exercise here... there are a few more steps involved.

In the Video object (the one that you have attached to the Image Target), check if the KeyFrame Texture (in the Inspector panel) is assigned to some texture; if not, assign it to the VuforiaSizzleReel_1.png (which is located in Assets/Textures).

Second, tick the Checkbox "Auto Play" to enable start of video when the target is detected.

This should enable your app to have video-playback on the target.

Then, in order to enable the "tap on target" event handling (i.e. to start / stop the video by tapping on the screen), you need to dig a bit in the sample code; the best is to extract the code in the method called "private void HandleTap()" located in the VideoPlaybackAppManager.cs script (in "Assets/Scripts").

I hope this helps.

Trouble following Video Playback Sample

February 20, 2014 - 12:07pm #5

Thank you for your reply.

I did what you suggested and the app runs perfectly; however, when I try to create this effect from scratch, I seem unable to do so. Like I mentioned in my previous post, I follow the order you suggested (get basic 3D model display recognition working and then replace with video), but unlike the Sample, the videos do not play (even though I indicated the same path as the Sample).

Do I need to add anything except ARCamera, ImageTarget and Video prefabs, with the last one's Path pointing to the file? I just want to achieve really basic video playback, without the features introduced in the Sample app, but, for some reason, it is not working.

Thank you for your help.

Trouble following Video Playback Sample

February 20, 2014 - 11:50am #4

Check that the video files are located in the Streaming Assets folder, as I said; although, if you imported the video-playback sample package, everything should be there.

Have you tried just importing the VideoPlayback sample, opening the VideoPlayback scene and building it and runng on your device without any changes ? This should work out-of-the-box.

 

 

Trouble following Video Playback Sample

February 20, 2014 - 11:41am #3

Hello, and thank you for your reply and help.

My plan was to learn using the Video Playback sample like you mentioned, but I find myself unable to understand how to get it to work properly. My issue is combining the provided assets correctly to enable actual video playback --

I import the sample videoplayback-2-8-9 Unity package. I add the ARCamera and ImageTarget prefabs and designate the provided Video prefab as child of ImageTarget. I can notice it has the VideoPlaybackBehaviour script added and should have the assets already copied; however, when I change the Path to "VuforiaSizzleReel 1.m4v", all that is displayed is an X marker (the player's error texture).

The console outputs

Could not initialize video player
UnityEngine.Debug:Log(Object)
VideoPlaybackBehaviour:OnRenderObject() (at Assets/Vuforia Video Playback/Scripts/VideoPlaybackBehaviour.cs:164)
UnityEditor.DockArea:OnGUI()

Do I need to do/add anything else to this sample application, or is my mistake elsewhere?

Thank you for your assistance.

AlessandroB wrote:

Hi, to enable VideoPlayback, you need to attach an instance of the Video Prefab as a child of an Image Target;

Also, you can copy all the scripts and materials and textures that you find in the VideoPlayback sample, under the folder "Vuforia Video Playback".

The Video prefab requires a VideoPlaybackBehaviour (which is part of the prefab itself), but also the VideoPlayerHelper script, which is in the same folder.

Then, copy the video files into the Streaming Assets folder.

Then you need to set the video path on the Inspector panel of the video object.

Another tip is to first try a simple Image Target with a simple augmentation to make sure that the basics of the AR + Image target do work; once you are sure that the Image targets can be detected and tracked, you could move on and add the video stuff.

Another approach would be to start from the Video Playback sample itself, and build your app on top of it, by removing the parts that you deem not necessary and customizing everything else.

 

Trouble following Video Playback Sample

February 20, 2014 - 11:26am #2

Hi, to enable VideoPlayback, you need to attach an instance of the Video Prefab as a child of an Image Target;

Also, you can copy all the scripts and materials and textures that you find in the VideoPlayback sample, under the folder "Vuforia Video Playback".

The Video prefab requires a VideoPlaybackBehaviour (which is part of the prefab itself), but also the VideoPlayerHelper script, which is in the same folder.

Then, copy the video files into the Streaming Assets folder.

Then you need to set the video path on the Inspector panel of the video object.

Another tip is to first try a simple Image Target with a simple augmentation to make sure that the basics of the AR + Image target do work; once you are sure that the Image targets can be detected and tracked, you could move on and add the video stuff.

Another approach would be to start from the Video Playback sample itself, and build your app on top of it, by removing the parts that you deem not necessary and customizing everything else.

 

Log in or register to post comments