Topic locked

Is it possible to stream the video from URL in the video playback example ?

January 7, 2013 - 9:16pm #1

Is it possible to stream a video rather than keeping it inside the device itself as used in Video Playback example ??

 

Is it possible to stream the video from URL in the video playbac

December 4, 2014 - 11:17pm #41

Thanks for pointing this out. I am aware that you can play streamed video on texture using third party libraries;

what I was referring to is that it is not possible using the functions/API used in the Video Playback sample application code "as is" (i.e. without using 3rd party libs)

 

Is it possible to stream the video from URL in the video playbac

December 3, 2014 - 4:23am #40

EDIT: I tried to delete this post because of the last one. But I couldn't.

 

Actually it is possible to play the streamed video on texture on iOS. And also it doesnt have to store it first. Video starts in 2 seconds with 3G network (16mb). We use rackspace ios video streaming service. We have managed to achieve that with 3rd party plugins. 

Is it possible to stream the video from URL in the video playbac

December 3, 2014 - 4:22am #39

AlessandroB wrote:

In general it is possible to play video that are streamed from a URL, this article for instance shows how this can be done with the Unity Video Playback sample:

https://developer.vuforia.com/forum/faq/unity-how-do-i-play-video-url

However note that there are some limitations; for example, on iOS you cannot play a video "on-texture" if this is streamed from a network URL;

for more information on what is possible and what not (depending on which platform you use) see also:

https://developer.vuforia.com/forum/faq/videoplayback-what-videos-can-i-play-what-platform

 

 

Actually it is possible to play the streamed video on texture on iOS. And also it doesnt have to store it first. Video starts in 2 seconds with 3G network (16mb). We use rackspace ios video streaming service. We have managed to achieve that with 3rd party plugins. 

Is it possible to stream the video from URL in the video playbac

December 3, 2014 - 4:06am #38

What if i wanna play multiple videos for different targets available in the videoplayback sample ??
setdatasource take's path of only one video ... I wanna add multiple video files to it.

Is it possible to stream the video from URL in the video playbac

September 27, 2014 - 8:54am #37

Thanks for this tip, temporalxD;

this is interesting,

so, using this library, what is the approach you would recommend ?

Downloading the video from youtube and storing it on your file system, and then loading and playing the video from the file system ? or is there a way to get a video URL that works with the VideoPlayback (i.e. direct streaming from the URL ) ?

 

Is it possible to stream the video from URL in the video playbac

September 27, 2014 - 8:39am #36

To play youtube stream video, you could use this library http://rg3.github.io/youtube-dl/download.html 

You could generate stream url using youtube-dl -g {url video} but its too slow, the library takes 8 seconds to get stream url, and there are 4 seconds to get video playing.

Also youtube create a customized stream url, then you can't generate stream url in a serverside or pre generate the url. 

 

Tested  in Android. 

Is it possible to stream the video from URL in the video playbac

September 24, 2014 - 9:26am #35

In general it is possible to play video that are streamed from a URL, this article for instance shows how this can be done with the Unity Video Playback sample:

https://developer.vuforia.com/forum/faq/unity-how-do-i-play-video-url

However note that there are some limitations; for example, on iOS you cannot play a video "on-texture" if this is streamed from a network URL;

for more information on what is possible and what not (depending on which platform you use) see also:

https://developer.vuforia.com/forum/faq/videoplayback-what-videos-can-i-play-what-platform

 

Is it possible to stream the video from URL in the video playbac

September 24, 2014 - 9:00am #34

Hi!

my question is similar but not same. I have to stream a video for a standard URL (example http://www.someurl.it/video.mp4) and also I have to download it in background (but this is not a problem) and make it in full screen also if in streaming also if in localhost.

Is it possible? And if it is, how can I do this?

Thank's a lot

 

Is it possible to stream the video from URL in the video playbac

August 22, 2014 - 3:11am #33

HI Guys

 

Can you please help me out in playing the external video over the texture of image. Currently if we pass the external url , the MPMoviePlayer is psuhed on navgation controller and played. If the video is saved locally, then video is played over the image. So can you please help me by which means i can play video from external url over the image.

Thanks in advance!!!

Is it possible to stream the video from URL in the video playbac

July 17, 2014 - 1:56am #32

You can't just load a Youtube video with the sample code used in the VideoPlayback sample, because the VideoPlayback sample cannot play or load URL of Youtube videos, as I was saying. The reason is that the URL must point to an actual video file (Youtube videos do not expose a video file, they just expose a video link which hides the actual file behind the Youtube public interface) 

So, there is simply no line of code to change. It just cannot be done.

If you wanted to play a Youtube video, you would need to use a Web browser (e.g. a UIWebView in iOS for example, i.e. open the Youtube link in a web page), but this is a different technique, which has nothing to do with the Video Playback sample and with Vuforia.

 

 

 

Is it possible to stream the video from URL in the video playbac

July 17, 2014 - 12:52am #31

Thanks for the info !! But my question is in which file should i change the code to load the video from youtube rather than local file. !!

Is it possible to stream the video from URL in the video playbac

July 17, 2014 - 12:21am #30

Youtube links (URLs) typically do not explicitely reveal the video file  (e.g. .mp4 or .m4v), so you will not be able to apply the videoplayback sample technique for those;

you would need a URL where the video filename appears explicitly, like: //http://host/videos/some_video.mp4 (Youtube videos are not exposed this way)

See also:

https://developer.vuforia.com/forum/faq/videoplayback-what-videos-can-i-play-what-platform

 

Is it possible to stream the video from URL in the video playbac

July 16, 2014 - 11:53pm #29

HI Guys

 

I am developeing an IOS application using vuforia Video Playback. I want to play the video from you tube link in vuforia video playback. When the video is added in the local bundle , it works fine. Now can you share me piece of code where i can add the youtube link and play the video when user clicks on texture.

 

 

Thanks

Roh

 

Is it possible to stream the video from URL in the video playbac

June 30, 2014 - 10:52pm #28

Hi,

     I added the link in Videoplayback.java , VideoPlayerHelper.java and FullScreen.java like this,

in videoplayback.java 

 mMovieName[STONES] = " http://giftsoninternet.com/android/EngageApp/VuforiaSizzleReel_1.m4v";

in VideoplayerHelper.java

 mMediaPlayer.setDataSource(" http://giftsoninternet.com/android/EngageApp/VuforiaSizzleReel_1.m4v");

and in FullScreenPlayback.java

mMediaPlayer.setDataSource(" http://giftsoninternet.com/android/EngageApp/VuforiaSizzleReel_1.m4v");

but i am getting the video played. Am I wrong anywhere? plz help me.....

Thanks in Advance.

 

 

 

Is it possible to stream the video from URL in the video playbac

June 30, 2014 - 10:46pm #27

Hi kahyin,

      Have you got solved your issue? and if so please let me know the steps what you have did? 

Is it possible to stream the video from URL in the video playbac

May 18, 2014 - 9:53pm #26

hi , I  m facing a problem when loading the video from URL .when i capture to image target ,the error button image will showing and i can not play the video .

i had change the coding on the videoPlayback.java 

        
    

 

 

and the coding on the videoPlayerHelper.java

     mMediaPlayer = new MediaPlayer();
                        
                        // This example shows how to load the movie from the
                        // assets folder of the app
                        // However, if you would like to load the movie from the
                        // sdcard or from a network location
                        // simply comment the three lines below
                      /*  AssetFileDescriptor afd = mParentActivity.getAssets()
                            .openFd(filename);
                        mMediaPlayer.setDataSource(afd.getFileDescriptor(),
                            afd.getStartOffset(), afd.getLength());
                        afd.close();
                        */
                        // and uncomment this one
                         mMediaPlayer.setDataSource("http://giftsoninternet.com/android/EngageApp/VuforiaSizzleReel_1.m4v");
 
 
.is it correct ?
can someone correct my error??
.thank uu
 
btw ,i am using the android platform 

Is it possible to stream the video from URL in the video playbac

April 29, 2014 - 2:54am #25

how can I get direct link youtube as m4v ??
I add this code:

  mMediaPlayer.setDataSource("rtsp://r7---sn-o097zuer.c.youtube.com/CiILENy73wIaGQmePdP8gDEB8hMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp");

but it's not working ! help me plz

Is it possible to stream the video from URL in the video playbac

March 14, 2014 - 4:00am #24

Yes

Is it possible to stream the video from URL in the video playbac

March 14, 2014 - 2:25am #23

Hi, NalinS.

Is this still valid for the last version of Vuforia (2.8.7) and Sample apps (2.8.9)?

Thank you very much in advance.

 

Is it possible to stream the video from URL in the video playbac

November 19, 2013 - 8:57am #22

Using the sample, remote video only plays full-screen.

N

Is it possible to stream the video from URL in the video playbac

November 19, 2013 - 5:53am #21

Actually when I changed the path to the link the video streamed correctly. But it only plays in full screen and when I deploy the app to iPad 4 it sees the app as an iPhone app. (with x2 scaled) I use videoplayback 2.6.7 sample. Is it possible to play inside of the rectangle as normal with as native iPad app.

Is it possible to stream the video from URL in the video playbac

November 19, 2013 - 5:34am #20

AlessandroB wrote:

This code is for Android, and the code should be still there in the samples... are you using Unity or iOS ?

 

 

I m using Unity and I couldn't find a code to uncomment or smt to achieve remote video streaming. Can anyone help?

Is it possible to stream the video from URL in the video playbac

October 8, 2013 - 4:28am #19

Same here? how can I stream a video with unity?

Is it possible to stream the video from URL in the video playbac

September 12, 2013 - 2:56pm #18

Hi Alessandro,

Thanks for your reply. I am using Unity (and targeting Android devices). Could you advise me on how to stream a video through using Vuforia (with Unity)? At the moment I am trying to modify the Vuforia classes: VideoPlayerHelper class and the VideoPlaybackBehaviour but I can't seem to get it to stream a video. I always end up with an hour glass icon on the screen which never goes away and no useful error information from Logcat or Unity.

El

Is it possible to stream the video from URL in the video playbac

September 9, 2013 - 11:13pm #17

This code is for Android, and the code should be still there in the samples... are you using Unity or iOS ?

 

Is it possible to stream the video from URL in the video playbac

September 9, 2013 - 3:36pm #16

Hi Alessandro, I am trying to stream a video exactly as the OP mentions and your solution sounds like what I'm looking for. However, the latest download from the Vuforia website for the Video Playback example does not contain the code you posted (below)-

  mMediaPlayer new MediaPlayer();

  // This example shows how to load the movie from the assets folder of the app

  // However, if you would like to load the movie from the sdcard or from a network location

  // simply comment the three lines below

  AssetFileDescriptor afd = mParentActivity.getAssets().openFd(filename);

  mMediaPlayer.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength());

  afd.close();

  // and uncomment this one

  // mMediaPlayer.setDataSource("/sdcard/myMovie.m4v");

In practice you will need to use something like:

  mMediaPlayer.setDataSource("http://some_url_to_some_video");

 

Also, the class you use - MediaPlayer, does not exist. Could you please advice me on the latest solution? Thanks a lot!

Is it possible to stream the video from URL in the video playbac

January 22, 2013 - 9:17am #15

You're welcome. Yes, make sure to add it to our wish-list.

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

Thanks.

Is it possible to stream the video from URL in the video playbac

January 22, 2013 - 5:15am #14

@Alessandro and BeHappy-Thanks for confirming that and for your quick response too!

I will surely add this in feature request:)

 

Thanks,

Dalee Davis

Is it possible to stream the video from URL in the video playbac

January 22, 2013 - 3:39am #13

@ Dalee: afaik, BeHappy is right on the YouTube URL; you cannot use it directly, as it does not point to the actual video (the Youtube URL rather points to some page that will play the video, but this is not equivalent as pointing to the video file directly)

But as Dalee said, by searching the internet you might find more detailed information on this topic...

Is it possible to stream the video from URL in the video playbac

January 22, 2013 - 3:18am #12

Sorry, As far as i know we can't play youtube video directly as the URL doesn't point to specific video link.  But you can Google again.

Is it possible to stream the video from URL in the video playbac

January 22, 2013 - 2:26am #11

@BeHappy   Thanks for your response and your explanation! I am able to play the video from the URL on remote server on full screen but is there a way directly to load a youtube URL.

 

Thanks,

Dalee Davis

@Dalee I will explain how i

January 21, 2013 - 6:10am #10

@Dalee I will explain how i did it in Unity for Android device,

I downloaded the youtube video using SaveVid Downloader in the mp4 format and added it to a server. After that you can try to open the video pointing to the URL in your mobile browser to check if it is playing. If it doesnt play then there is some problem with the server or mobile.

If it is playing then u can just copy paste the URL directly into the path of the VideoPlayback behaviour script. That should work for sure.

@BeHappy  Thanks for your

January 20, 2013 - 10:42pm #9

@BeHappy  Thanks for your response!

 

I tried adding the youtuble and converted it to .flv format (using the links provided but no go i just see a vuforia image on top with a play button and when i click on it an hourglass comes up for a second and nothing else.

Can you also explain me how did you download a youtube video and add it in assets using this sample and i am doing this in iOS.

 

Thanks,

Dalee Davis

 

@ Dalee, May be the following

January 16, 2013 - 6:26am #8

Hi Dalee and Alessandro,The

January 16, 2013 - 6:23am #7

Hi Dalee and Alessandro,

The limitation with URL streaming is we cannot play the video on top of the Target and hence it will play on the video player only.

We need to provide the URL in the variable named "path" available in video behaviour script and Yes we need to give the exact path of the video link like http://www.123.com/videos/myvideo.mp4

And if we want to play the video on top of the Target we need to download it to the Streaming Assets folder at runtime and then play it, but well it will take some time.

 

Edit : I used Unity to develop the application hence am not sure of the Java file name, think it is the one given by Alessandro in a comment below.

Thaks for ur

January 16, 2013 - 3:39am #6

Thaks for ur Reply!!

@AlessandroB - Can you let me know how it can be done in iOS.

As you mentioned Youtube URL points to a link so can you tell me if i can add a UIWeb View to embed youtube link  for iOS

but i am not able to figure out how will i add a UIWebview when a target is detected and how will i specify its frame(i.e. x, y cordinates)

I want the same the frame size that comes in the default video playback sample provided. Kindly help me..:)

 

Thanks,

Dalee Davis

Hi Dalee, I hope BeHappy will

January 16, 2013 - 3:28am #5

Hi Dalee, I hope BeHappy will also answer your question;

just a little comment from my side; 

afaik the Youtube videos URLs usually do not point to the actual video file, but rather to some web page link; as a consequence you should not be able to stream directly from Youtube URLs using the Android MediaPlayer API (of course you can run a quick test to confirm that).

 

 

Can you please share the URL

January 16, 2013 - 2:25am #4

@BeHappy - you said you found a solution by adding the url. I tried adding a youtube URL will that work?

Also can you share the URL that you used and its for ios.

 

Thanks,

Dalee Davis

Yes, it is possible. If you

January 8, 2013 - 1:28am #3

Yes, it is possible. If you are using Android, you can have a look at the VideoPlayerHelper.java file, in the load function:

there you'll find some code to do that (I report it here for convenience):

  mMediaPlayer = new MediaPlayer();

  // This example shows how to load the movie from the assets folder of the app

  // However, if you would like to load the movie from the sdcard or from a network location

  // simply comment the three lines below

  AssetFileDescriptor afd = mParentActivity.getAssets().openFd(filename);

  mMediaPlayer.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength());

  afd.close();

  // and uncomment this one

  // mMediaPlayer.setDataSource("/sdcard/myMovie.m4v");

 

In practice you will need to use something like:

  mMediaPlayer.setDataSource("http://some_url_to_some_video");

 

Got the solution from one of

January 8, 2013 - 1:25am #2

Got the solution from one of the thread from Vuforia itself...

Just giving the video link URL in the path resolved it...

Thank you :)

Topic locked