Log in or register to post comments

Video Playback

December 16, 2013 - 5:39am #1

I want to stream a video from the web server. So I imported the video prefab and in the path I gave the link of the url. But there is nothing happening when I play . What modifications should I make ? . Thank you in advance

Video Playback

December 23, 2013 - 2:45am #19

...and this is what you tried:

So I just took the video prefab and gave the path of the web server. But it does not work

 

The Vuforia VP code was designed to work within the scope of AR, which means all the scripts triggering its functionality depend on this use case.

It sounds like you want to re-purpose this to use the code to simply play an online video.

 

I am unable to guide you specifically in this because it is outside the pure scope of Vuforia.  However the steps I suggested may still be valid, and if you can investigate the code and find out which functions may trigger video playback in your particular use case then you might get lucky.

 

Alternatively you may be better off by simply buying a plug-in to achieve the same, or possibly even Unity Pro?

 

N

Video Playback

December 22, 2013 - 11:38pm #18

Sorry for the ambiguity. I just want a video to be played as soon as the scene is loaded without any target detection. I've been trying this from quite some time without any productive results using vuforia playback and Handheld.PlayFullScreenMovie separately.Can you guide me in how to achieve this ?

 

Video Playback

December 20, 2013 - 5:01am #17

It does work when we do that as I have done that before.

Well, that was never clear to me :)

 

At least we have established there is no fundamental problem here.

My suggestion is to try to create the VP scene from scratch, to check first that it works locally, and then remotely.  You need to make sure that all objects and all scripts work as expected.  It may also be an idea to have two instances of Unity open in this case.

This will help you to narrow down the issue, as there has to be an explanation - exactly what this is I cannot tell you.

 

HTH

N

Video Playback

December 20, 2013 - 4:22am #16

Thanks Nalin for quick reply. It does work when we do that as I have done that before. But I  just want a video to be played from the server as soon as the scene is loaded without any target. Just  playing a video. So I just took the video prefab and gave the path of the web server. But it does not work . Is there anything else I should do?  I searched and tried a lot but couldn't find anything. Waiting to hear from you soon. Thank you

Video Playback

December 20, 2013 - 3:39am #15

All I did was take the standard video playback sample application and change the video path to the URL for the stones target, and rebuild.

N

Video Playback

December 20, 2013 - 2:26am #14

Ok, just one quick question. What were the things you had in your inspector ? I just have a video prefab. Is there anything more ?  

Video Playback

December 20, 2013 - 1:41am #13

Sorry, can I just check what happens when you try this URL in the path:

http://oneshot.qualcomm.com/webAR/content/strawberryfields_H264_AAC.mp4

 

For me when I tried it yesterday it worked first time - streaming and playing fullscreen, and I made no code changes.

Have you tried this on multiple devices?

 

N

 

Video Playback

December 20, 2013 - 12:10am #12

There is also one more thing I tried. I created an empty gameObject and added this script to it

var movie:String;
var isplaying:boolean=false;
function Start () {
 
}
 
function Update () {
 
if(isplaying==false)
{
 Handheld.PlayFullScreenMovie(movie,Color.black,FullScreenMovieControlMode.CancelOnInput,FullScreenMovieScalingMode.AspectFill);
  isplaying=true;
  //Application.LoadLevel(level);
}
}
/*function Start () {
Handheld.PlayFullScreenMovie ("StarWars.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput);
}*/
 
But result still the same :(

Video Playback

December 20, 2013 - 12:05am #11

Thanks for replying. I tried it but unfortunately the result is the same. I googled for the first two pages of the search but didn't find anything that works.I have tried  Videos of mp4 having extension  MPEG4 SP, H263 as mentioned in the documentation, but it didn't work. Here is what I have done; In an empty scene having just main camera I imported the video prefab. I added the above url in the path textfield in the inspector and checked autoplay. Is there something more that should be done ?  Thank you

Video Playback

December 19, 2013 - 7:29am #10

Ok it seems that you need to ensure that the Web Server you are using conforms to the http Live Streaming protocol

https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html

...otherwise it will not work.

When I did a test using this URL in Unity on an iOS device it streamed fine, so you may like to test this yourself:

http://oneshot.qualcomm.com/webAR/content/strawberryfields_H264_AAC.mp4

It's probably also worth doing a web search on this protocol.

 

HTH

N

Video Playback

December 19, 2013 - 12:36am #9

I did exactly what you said but still no luck. Even the vuforia files did not play locally when I tried to play them  without target texture. They play fine with the target. In debug.log I got a message saying it could not initialize video player.I've given the attachment Capture2.

In second case I gave the link of http://demos.mindspacetech.com/videos/Bajaj/Videos/jamanlalbajaj.m4v which is on a web server .The message is the same(Capture1)

Could not initialize video player
UnityEngine.Debug:Log(Object)
VideoPlaybackBehaviour:Update() (at Assets/Vuforia Video Playback/Scripts/VideoPlaybackBehaviour.cs:177)
 
I've attached the screenshot of this too.
Thanks
AttachmentSize
Image icon Capture1.PNG179.63 KB
Image icon Capture2.PNG198.01 KB

Video Playback

December 18, 2013 - 10:55pm #8

I did exactly what you said but still no luck. Even the vuforia files did not play locally when I tried to play them  without target texture. They play fine with the target. In debug.log I got a message saying it could not initialize video player.I've given the attachment Capture1.

In second case I gave the link of http://demos.mindspacetech.com/videos/Bajaj/Videos/jamanlalbajaj.m4v which is on a web server .The error is the same

Could not initialize video player
UnityEngine.Debug:Log(Object)
VideoPlaybackBehaviour:Update() (at Assets/Vuforia Video Playback/Scripts/VideoPlaybackBehaviour.cs:177)
 
I've attached the screenshot of this too.
Thanks

Video Playback

December 17, 2013 - 6:04am #7

This has no file extension - something you may wish to look at.

As a first step to get this working, try to copy one of the standard vuforia files and aim to link to this remotely - this should help you narrow down the problem.

The other thing you can do is to try your actual video file locally to see if it is compatible with your device.

 

HTH

N

Video Playback

December 17, 2013 - 5:00am #6

It is still not working. I uploaded the video on my dropbox https://www.dropbox.com/sc/hkbw1qmeq2pttom/Eu93dn3THA and its an ogv file so it should work.Same was the case with the web server http://blinksolution.com/video/ . Are there any other modifications because all I did was, imported the video prefab and copied the link to the path variable. Thanks for replying

Video Playback

December 17, 2013 - 5:00am #5

It is still not working. I uploaded the video on my dropbox https://www.dropbox.com/sc/hkbw1qmeq2pttom/Eu93dn3THA and its an ogv file so it should work.Same was the case with the web server http://blinksolution.com/video/ . Are there any other modifications because all I did was, imported the video prefab and copied the link to the path variable. Thanks for replying

Video Playback

December 17, 2013 - 3:21am #4

The link in the inspector needs to be a URL to the exact path of the actual video file - nothing else will do.

If this is your own video then you may be able to try it by uploading your own hosted video to be available via dropbox.

If it is something on Youtube, or some other hosted service you will need to make your own arrangements.

 

HTH

N

Video Playback

December 16, 2013 - 11:01pm #3

Hey Nalin, thanks for the quick reply.  As you said I followed searching in the forums.  But they suggested the same thing that I had mentioned. The link I pasted in the path variable in inspector  is  http://blinksolution.com/video/ .Are there any other changes that I should make ? I just want to play a video on my android through a web server. I have attached a screen shot .Thank you

 

AttachmentSize
Image icon video.png275.76 KB

Video Playback

December 16, 2013 - 7:17am #2

Try searching the forums for the following keywords:

video, playback, url, remote

...as this has come up several times before

 

thanks

N

Log in or register to post comments