playing 3D rotated video on android - android

I'm trying find a way to play a video in a view while rotating it on Android 2.2. I'm not talking about 90 degrees rotation, I'm talking about 3D rotations.
I see that starting from API level 14 there is View.SetRotation/X/Y but I want to use API LEVEL 8.
I've tried creating my own video view by extending VideoView, create a custom matrix and set:
canvas.setMatrix(matrix);
in onDraw(Canvas) and dispatchDraw(Canvas), but this didn't make a difference. My video is playing completely flat.
Any idea how I can do this?
Here you can see some examples to what I would like to achieve:
http://www.youtube.com/watch?v=PDXxPQEDegY
http://www.youtube.com/watch?v=OBoCrWrabs4
Thanks!!

Check out NineOldAndroids.
Android library for using the Honeycomb animation API on all versions
of the platform back to 1.0

In the examples you have mentioned, no one is rotating videos.That is a simple AR app which recognizes an image provided as the "marker" in the app bundle itself.When it recognizes the image a set action is performed, that can be playing video or doing anything you want (possible in Android :)).I have done this in past and will try to fetch some snippets for you.

Related

Android Camera API Advance Features

I am to start working on an Android Custom Camera App. I just want to know is there any way to add the following features to my app:
Beauty Level
Red Eye Removal
Acne Removal
I just want to know that if it is possible, can someone suggest or give me any idea how can code it into my app.
Though I am familiar with Android Camera API functions, and worked on several simple custom camera apps.
Thanks in advance
For beginning, you can use FaceDetector to detect faces in the picture.For example , you can remove Red eyes by searching for Red pixels in the picture and try to decrease red level of them.And also , you can use OpenCV for detecting eyes.I found a sample for eye detection in Here

Android VR player

I am little new to Virtual Reality concept in android and also developed one sample demo with Rajawali VR library to show video side by side and watch it with CardBoard.
I have used this link which also help for Head Tracking, but I want to show normal videos (I mean not 360 video), like same way in Side by Side app.
Actually I want to know which View should I use instead of Sphere, because to see normal video with CardBoard we need some flat surface to play video in it side by side.
So please kindly help in that.
Try ScreenQuad material primitives of rajawali and then set the scale accordingly.It will be worked.

Video Capture and implementation Google Cardboard (like Paul Mccartney app)

Regards community
I just want to build a similar app like this,
with my own content of course.
How to capture 360 degree video (cameras, format, ingest, audio)?
Implementation:
2.1 Which one Cardboard SDK works best for my interests (Android or Unity)
2.2 Do you know any blogs, websites, tutorials, samples in which I can support.
Thank you
MovieTextures are a great way to do this in Unity, but unfortunately MovieTextures are not implemented on Android (maybe this will change in Unity 5). See the docs here:
For a simple wrap-a-texture-on-a-sphere app, the Cardboard Java SDK should work. But if you would rather use Unity due to other aspects of the app, the next best way to do this would be to allocate a RenderTexture and then grab the GL id and pass it to a native plugin that you would write.
This native code would be decoding the video stream, and for each frame it would fill the texture. Then Unity can handle the rest of the rendering, as detailed by the previous answer.
First of all, you need content, and to record stereo 360 video, you'll need a rig of at least 12 cameras. Such rigs can be purchased for GoPro cams. That's gonna be expensive.
The recently released Unity 5 is a great option and I strongly suggest using it. The most basic way of doing 360 stereo videos in Unity is to create two spheres with MovieTextures showing your 360 video. Then you turn them "inside out", so that they display their back faces instead of the front faces. This can be done with a simple shader, turning on front face culling and removing the mirror effect. Then you place your cameras inside the spheres. If you are using the google cardboard sdk camera rig, put the spheres on different culling layers and make the cameras only see the appropriate spheres. Remember to put the spheres in proper positions regarding the cameras.
There may be other ways to do this, leading to better results, but they won't be as simple. You can also look for some paid scripts/plugins/assets to do 360 video in VR.

Is it possible to play one video on top of another in Android?

I'm trying to figure out if Android can handle two video video players occupying the same screen space, preferably with the one on top having alpha channel regions that are transparent to the one behind.
I know how to implement this code wise, I'm curious if anyone knows if this is physically possible before I bother throwing coding time at it.
TIA
AFAIK, no, at least before Android 4.0. You can't have two SurfaceViews overlap.
Now, it is conceivable that this is possible with TextureView with Android 4.0, though I am far from confident of that.
Another option :
Player 1 : Stock MediaPlayer that renders on a SurfaceView
Player 2 : Yet-another-player that can render on a GLSurfaceView or a Bitmap. This must be custom-built to decode frames and write on a GLSurfaceView's context or Native-bitmap via JNI.

OpenGL model Overlay of Camera Preview

I am trying to display a .md2 model over top of the camera preview on my android phone. I don't need to use the accelerometers or anything. If anyone could even just point me in the right direction as to have to set up an opengl overlay that would be fantastic. If you are able to provide code that shows how to enable this that would be even better! It would be greatly appreciated..
I'm not able to provide code until later this week, but you might want to check out a library called min3d, because I believe they already have a parser written for .md2 files. Then I believe that if you use a GLSurfaceView, the background can be set to be transparent, and you can put a view of the camera behind it. Are you trying to get some kind of augmented reality effect? There are android specific libraries for that too, but they're pretty laggy (at least on my Motorola Droid).

Categories

Resources