Log in or register to post comments

playing video on the marker

December 1, 2012 - 1:16am #24

Hi , I have a question about showing video on the marker, I thought it's not possible yet , cause unity doens't support movie textures on mobile devices . but then I saw this video about apps made with vuforia . http://www.youtube.com/watch?v=rGjlTRc1J5E

and there was this app for maxim magazine which played a vidoe on the cover of magazine .

I'll be appreciated if someone can tell me how can I create such effect .

thanks

playing video on the marker

December 1, 2012 - 8:14am #23

The Maxim app was developed by Daqri using our Video Playback prefab - See the Additional Resources section here - https://ar.qualcomm.at/sdk

playing video on the marker

December 2, 2012 - 6:37am #22

wow , thanks , that's exactly what I was looking for :)

I tested it on my new ipad and on my nexus S , on my new ipad it worked fine but on nexus S it couldn't show the video on the marker and the app switched to full screen mode . is there any documentation on which devices can show the video on the marker ?

thanks

playing video on the marker

December 4, 2012 - 3:40pm #21

And another thing is about size of the app . I have an AR app which is 15mb but after adding this feature to it with a 4mb video , it increased the size to 50mb!

is this normal , or is there any way to reduce the size of this kind of app?

thanks

playing video on the marker

December 5, 2012 - 2:22am #20

Hi, on Android the video-on-texture feature is only available for Android 4.0 (ICS) and above; if your Nexus S runs on Android 2.x or 3.x then the App will automatically switch to Fullscreen mode.

On iOS (iPad) you don't have this constraint.

playing video on the marker

December 5, 2012 - 2:31am #19

ABout the size of the App:

not sure why you end up with 50 MB;

I just tested the VideoPlayback sample in Unity and the APK which is built is about 28 MB;

if I compare it with the ImageTargets APK (which is about 8 MB), the difference is 20 MB, which is indeed the size of the two sample videos (10MB each).

Maybe try the VideoPlayback sample app first and verify that the size is correct there.

 

playing video on the marker

December 6, 2012 - 5:53am #18

Thanks so much . yes my Nexus S is Android 2.3 . and about the size it seems that items in the streaming asstes folder really affects the app size , even if I don't use them . I had some videos in my streaming assets folder which I wasn't using and those were the items that affects the size . but even when I use only Qualcomm sample my apk file is 28mb .

is there any other folders like streaming assets that even if you don't use its items they affect the size?

thanks

playing video on the marker

December 6, 2012 - 7:34am #17

In general, check the content of your Assets folder in your Unity project, to see if there are for instance 3D models (usually under Assets/Models dir) or Textures (usually Assets/Textures dir) that you don't actually use in your project, otherwise those may get packaged by Unity into the final APK.

 

playing video on the marker

December 6, 2012 - 11:52am #16

Hi,

this is awesome, didn't know about this prefab. Download and tried, however on my HTC One S I get only black square where it should play video, sound is working though. When I tap it it goes full screen and video plays well, but not in the scene, just sound ;o( Is there any known issue on HTC? got 4.0.3.

Also it says at the beginning that iOS online streamed video will play only in the full screen?

Thanks

Stan.

playing video on the marker

December 7, 2012 - 5:49am #15

 

stan wrote:

this is awesome, didn't know about this prefab. Download and tried, however on my HTC One S I get only black square where it should play video, sound is working though. When I tap it it goes full screen and video plays well, but not in the scene, just sound ;o( Is there any known issue on HTC? got 4.0.3.

This was my bad, I didn;t read properly that only Gl Es 2 is supported. It works fine as soon as I changed it in player settings.

stan wrote:

Also it says at the beginning that iOS online streamed video will play only in the full screen?

Just tested and its tru streaming only fullscreen.

Funny because all solution I found so far are only for iOS so this is finally here for Android including streaming video.

However your solution does not stream on iOS as texture while some other do. Check out this one http://www.predictions-software.com/Unity3D_mov_mp4.html, there is a form to request test package, maybe you can get inspiration how to do it there ;o). I tested it works pretty well on iphone including streaming. 

Anyway, have to use 2 different solution to cover both plaforms with streaming but finaly I can see light at the end of tunnel for both.

Great work guys.

 

playing video on the marker

December 8, 2012 - 1:15am #14

Thanks for your comments.

And thanks for the link to that iOS implementation, we'll take a look.

playing video on the marker

December 12, 2012 - 2:04am #13

Hi,

I played a lot with video prefab and tried several combinations with framemarker and imagemarkers and at some point online videos stopped playing.

I thought I had a problem with encoding of the video so tried several formats. Was dealing with this for hours. Then I tried different phones and it just worked with no problems.

I swear that it worked on my phone at the beginning as well, now I cannot make it to work again. Can you help me to troubleshoot this issue? I wouldnt like to get in situation that users would face similar thing on live app.

this is what is happening.

My phone is runnign 4.0.3 and its HTC one S. 

To get rid of all other possible problems in my project I started a plain project in unity 3.5.2, imported video prefab sample project package  and  vufori aandroid package both 1.5.10 versions.

Then in the scene where 2 imagemarkers with video prefab are I did nothing else but replaced video name to full URL to online mp4 video.

Running this on my htc one s shows video with play button on image target with original local file, but shows X button on the one I changed to online video.

When I click on the video texture with X it tries to open fullscreen play but after showing only black screen for like 2 second it comes back to unity scene again and there is clock icon on the target textue. This happens all the time when I click it again. so video does not play on texture nor fullscreen.

The same project ran on HTC one X and Samsung Galaxy tab2 10.1 with same android version works well with no issues with the same online video on texture and fullscreen as well.

On the One S phone I checked the logcat to see what's there but no errors apart fron these are there. Not sure if these are any interesting though.

Thanks for help

Stan

12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported

12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported

12-12 10:06:30.860: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456

12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x2281cd8

12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x2281cd8

12-12 10:06:30.860: D/OMX-VDEC-1080P(19811):  Set the Output Buffer Idx: 17 Addr: 48cf2000, pmem_fd=5c00017b

12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e590, eRet 0

12-12 10:06:30.860: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers

12-12 10:06:30.860: D/memalloc(114): ion: Allocated buffer base:0x423f0000 size:376832 fd:37

12-12 10:06:30.870: D/memalloc(10060): ion: Mapped buffer base:0x59b04000 size:376832 offset:0 fd:166

12-12 10:06:30.870: D/memalloc(114): ion: Freeing buffer base:0x423f0000 size:376832 fd:37

12-12 10:06:30.870: D/memalloc(114): ion: Unmapping buffer  base:0x423f0000 size:376832

12-12 10:06:30.870: D/memalloc(19811): ion: Mapped buffer base:0x48dd4000 size:376832 offset:0 fd:387

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported

12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x22a9148

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x22a9148

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811):  Set the Output Buffer Idx: 18 Addr: 48e6f000, pmem_fd=5c000183

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e5e0, eRet 0

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers

12-12 10:06:30.870: D/memalloc(114): ion: Allocated buffer base:0x423f0000 size:376832 fd:37

12-12 10:06:30.870: D/memalloc(10060): ion: Mapped buffer base:0x59bb1000 size:376832 offset:0 fd:169

12-12 10:06:30.870: D/memalloc(114): ion: Freeing buffer base:0x423f0000 size:376832 fd:37

12-12 10:06:30.870: D/memalloc(114): ion: Unmapping buffer  base:0x423f0000 size:376832

12-12 10:06:30.870: D/memalloc(19811): ion: Mapped buffer base:0x48f5a000 size:376832 offset:0 fd:390

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported

12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x2268f60

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x2268f60

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811):  Set the Output Buffer Idx: 19 Addr: 48ff0000, pmem_fd=5c000186

12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e630, eRet 0

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all o/p buffers

12-12 10:06:30.870: D/OMX-VDEC-1080P(19811):  OMX_CommandStateSet complete, m_state = 2

12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_send_command 22850bc, 0 , 3

 

 

 

playing video on the marker

December 12, 2012 - 4:13am #12

Hi, 

could you start a fresh new project using the VideoPlayback sample package (without any modifs) ?

then, after testing that it works normally, I would suggest to try and replace the file Path of on of the videos with this URL:

http://realbruz.altervista.org/Vuforia1.m4v

(This URL is taken from another Thread posted in this forum, and it currently works as I tested right now).

 

Maybe I would also suggest to uninstall any previous VideoPlayback modified App from your device before testing.

Then, if all goes well, you should try to incrementally make your changes (any target or video URL or script code that you might have modified),

and test until you find that something gets broken; otherwise it is rather difficult to track the problem.

Let me know how it goes.

 

playing video on the marker

December 12, 2012 - 5:06am #11

Thnaks for the reply.

As I said in the previous post this is exactly what I did, created blank new project just with video project and imported also android vuforia as it was not included in video unity package.

I did change nothing else just the vide source to online video. I tried now to put there your video as well.

Becaus eit is new project I gave it new app name so it was first installation of the app so it could not be inthe phone before.

I did put your video there and tried first to run it on Smasung glaxy note and worked well.

Then installed to HTC one S and it doe ssame thing as before. Showing that texture immediatelly with X and full scren does not show as well, just black for few seconds.

Also tried to disconnect wifi and use cellular network, samething on both devices. One S fails on both connection types, Galaxy note works on both connection types.

I can put some debug logs if you want. Let me know what info to get out from there.

S.

 

S.

playing video on the marker

December 12, 2012 - 7:40am #10

OK, so you have the current situation:

- on Samsung the VP sample works (showing video-on-texture) with both the local video and the online URL video

- on HTC One S the sample works (showing video-on-texture) with local video file, but NOT with the online URL video

Is it correct ?

If so, it could be a problem with the device, which I can check internally.

playing video on the marker

December 12, 2012 - 8:44am #9

Yep, that's correct.

If you could that'd be great.

I'd promise that it worked on my One S as well but now I'm not 100% sure...

Let me know please.

Thanks

Stan

Hi Alessandro, did youy

December 19, 2012 - 10:51am #8

Hi Alessandro, did youy manage to try the video streaming on One S ?

I'd really like to find out is this is a general One S issue or my phone only.

tnx

Stan

Hi, yes we tried and the

December 20, 2012 - 2:18am #7

Hi, yes we tried and the problem did not show up;

have you tried switching off and rebooting the phone ? resetting the system sometime can help.

 

playing video on the marker

February 6, 2013 - 8:46am #6

Hi,

I think there is a more serious issue with video playback.

All seems to be fine when you have like 1 online video on marker. when you have 2 of them its still ok on most cases althogh problems start here as well from time to time. When you add more videos like 5 or 6 it will randomly show some with play icon and some with x icon. Each app start it is different.

As long you play with it you run probability that it will stop working completely and will show all videos with clock or x icons on all of them, this is what was happening on my HTC One X. I got the phone in such state and it never played video on canvas anymore.

With more playing around with this we found that same happened on Samsung Galaxy tablet. The permanent problem is solved only by rebooting device itself, then it starts to show on canvas playback again.

However it does not matter on device, if there is multiple online videos in scene it randomly gets some ready to play on canvas and some not.

I think it depends on hardware and internet connection quality how many videos must be in the scene to get the issue show up. But it happens often on like 6 videos in scene.

This is annoying issue, but the one which you have to reboot your device to be able toplay any video on canvas at all again is quite serious.

 

We really would like to get this to production state, these issues are quite show stopppers.

Is there something we could do about it? like initialize videos slower? or let it buffer after hitting play and not at the point of showing it on scene?

Maybe it is just too many things happening at the same time.

Thnaks

Stan

playing video on the marker

February 6, 2013 - 9:07am #5

Hi stan, thanks for this detailed update;

what I seem to understand is that the problems show up when you load (or stream) multiple videos simultaneously; this issue has been discussed also with other Forum users in other threads;  just to summarize here, using multiple videos can be quite demanding in terms of system resources, which can eventually bring to unexpected behaviours (e.g. application crashing or other wierd results as you describe).

The recommendation here is to limit the maximum number of videos simultaneously on the scene; of course, here you must be aware that different devices might have different capabilities with respect to the number of videos you can play (i.e. different CPUs, different memory capacity, etc.).

More specifically on the Vuforia side, a few notes:

  •  the video-playback sample is a sample that shows how to generate a texture from a video; however, these capabilities are shown at application (sample) level, i.e. it is not a built-in feature of Vuforia (i.e. the videoplayback is not part of the SDK API);
  • so, you should not consider the video-layback sample as a fully fledged application, but rather as the starting point to develop your own application (as the sample shows the technical how-to for setting up and playing a video on a texture and how to connect this to a trackable pose retrieved from QCAR).
  • the fact that multiple videos can lead to resource problems on specific devices is a problem related to the video loading/playing (which is controlled at low level by the Android or iOS sub-systems, not by Vuforia)

I hope this makes sense.

  

playing video on the marker

March 11, 2013 - 3:25pm #4

Hi,

Ok, I understand. thnaks for clarifying. We made modifications to videoplayback scripts not to prebuffer videos automatically but just before playback. Destroying video objects and creating new each new video playing helped to make things stable with many videos on same target.

Just a note about HTC One S if anyone faces similar issues mentioned earlier int his thread. The phone eventually gets into state when camera stops wokring properly at system level. I thought it was my code that videos are stil showing X not wanting to play not showing anything interesting in the log. But then som other time I realized that it actually does not play any video even in default video player and taking picture by camera was puting red lines accross randomly. It just got screwed. Most funny is that first phone reboot did not help, only after second reboot it started to work fine again. 

 

S.

playing video on the marker

March 11, 2013 - 11:21pm #3

Excellent. 

And thanks for the Tip on the HTC One S; good to know.

playing video on the marker

May 8, 2014 - 6:57am #2

hi there.

i am developing an AR  trackable project where i need to add videoplayback.so,i am testing it with videoplayback sample which provided  by vuforia.

The resolution of the video is quite small . How to make it full screen or enable to zoom it ? have need to add anY script for that?

playing video on the marker

May 8, 2014 - 11:20pm #1

I'm not sure what you mean by small resolution but I believe video is played in its native resolution.

Passing video frames to texture in unity is quite expensive operation on it own, I can't imaging anyting to resample video frames on the fly that be performace killer I guess.

So answer to your question is simple, use video with higher quality.

but be carefull in our tests when we used wideo above 720p it did fail to play even in some high end devides.

Question about fullscreen play, just doubletap and it will play fullscreen. if not its simle to implement vide playback has method to play fullscreen. Sometimes it may be helpfull though to use smaller video in unity and higher quality video in fullscreen play. 

 

Log in or register to post comments