Log in or register to post comments

Defining Path

February 5, 2013 - 4:36am #1

Hey guys im still quite new to Unity and the video playback feature to work. Im unsure how to define the path of the file in the Unity Inspector. Thanks 

Im using Unity 4 and Vuforia 2 for android.

 

 

Defining Path

February 5, 2013 - 8:27am #16

Great.

Defining Path

February 5, 2013 - 8:27am #15

Thanks again for the help, Ive posted it in the wish-list

Defining Path

February 5, 2013 - 8:21am #14

Happy to hear that it is now working.

 

Alpha channels in videos is not supported at the moment; however we have seen a few more requests for this;

may I invite you to post in the wish-list section of our Forum ?

https://developer.vuforia.com/forum/general-discussion/wish-list

Defining Path

February 5, 2013 - 7:58am #13

If you dont mind me picking your brains a bit more, Do you know if the video play back supports Alpha channels in videos?

Defining Path

February 5, 2013 - 7:38am #12

Thats sorted it out, Thanks ALOT. Ill post up what ive created tomorrow.

Defining Path

February 5, 2013 - 7:30am #11

OK, so, first, if you imported the full sample and double-clicked on the "Vuforia-VideoPlayback" scene, you would get everything working;

 

however, if you want to setup things step-by-step, you need to add a few scripts here and there:

  • ARCamera, make sure you have these scripts attached:
    • InstructionalScreen.cs
    • VideoPlaybackController.cs
    • DataSetLoadBehaviour.cs
    • QCARBehaviour.cs
    • DefaultInitializationErrorHandler.cs
  • for each video object, make sure you have these scripts attached:
    • VideoPlaybackBehaviour.cs
  • for each Image target object, make sure to have these scripts attached:
    • ImageTargetBehaviour.cs
    • TrackableEventHandler.cs (note: this is different from the usual DefaultTrackableEventHandler which you normally have in ImageTargets sample)

Note: all the scripts above are under the scripts/ folder of the project (except for DataSetLoadBehaviour.cs, which is in QualcommAugmented Reality/Scripts) 

Defining Path

February 5, 2013 - 7:07am #10

Defining Path

February 5, 2013 - 6:57am #9

Im using the sample files "as is" in my own scene, I have the Video prefab as a child of the ImageTarget. 

Defining Path

February 5, 2013 - 6:52am #8

Yes, you need something like the picking logic implemented in the VideoPlaybackController.cs script which comes with the sample.

Are you suign the VideoPlayback sample "as is" right now, or have you built your own ?

 

 

Defining Path

February 5, 2013 - 6:37am #7

Great, I can just render a new one out, I just did a quick test with the sizzle reels_1, It now displays the "Play" icon but when I tap on it to play it dosnt play, do I need to add some thing like raycasting to allow it to be pressed?

Defining Path

February 5, 2013 - 6:22am #6

Yes, the .mov format is not supported (I overlooked the extension of your file, sorry);

on Android, the video player supports the following formats:

http://developer.android.com/guide/appendix/media-formats.html

 

I would suggest trying with mp4 or m4v files (MPEG format).

 

Defining Path

February 5, 2013 - 6:16am #5

Sorry I missed read it, Ive changed it but still getting the same results, Is it possible that the file is the wrong format?

Defining Path

February 5, 2013 - 5:49am #4

Hi,

File is called EE_Full.mov and in the streamingassets folder so i have "StreamingAssets/EE_Full.mov"

if the file is  "StreamingAssets/EE_Full.mov", then you should put just "EE_Full.mov" in the Path box

(please read again carefully my previous message)

 

Defining Path

February 5, 2013 - 5:46am #3

Thanks, Ive put it in. File is called EE_Full.mov and in the streamingassets folder so i have "StreamingAssets/EE_Full.mov" in the box. I just tested it on my Samsung Note and it displayed the Playback box as a white box with the X "icon error" in the centre of it.

Defining Path

February 5, 2013 - 5:08am #2

Hi, the Path field located in the VideoPlaybackBehaviour script (which is attached to each video object) can be set in different ways, depending if the video file will be packaged with the App or if it is stored outside the App (for instance if it is stored on the SD card of your Android device);

  • if you want to package your video in bundle with your App (or Apk file on Android), you need to put your video files under the "StreamingAssets" directory under your Unity project folder (note that the videoplayback sample comes with two videos already located in such directory); in this case, the Path field must be set to the relative path under StreamingAssets (for instance, you can use the simple filename like "my_video.mp4"  if the file is located directly under "StreamingAssets", i.e. if its path is like "StreamingAssets/my_video.mp4")
  • if the video files are instead stored externally (e.g. they are downloaded and stored into the SD card of your device), you can use a file path like the following:
    • mnt/sdcard/MyVideosDirectoryName/my_video.mp4

​I hope this answer your question.

Log in or register to post comments