top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Android Surface Video is stretched

+2 votes

I have created surface in android Java and mentioned its width and height as below.

 android:layout_width="fill_parent" android:layout_height="fill_parent"

I'm rendering from native to the surface.

My decoded video dimension is w x h (less than surface layout size). When i render the yuv frames in native, video is filled complete area of the surface (video is stretched). I want to control the rendering area (it must be w x h). I tried with native_window_set_buffers_geometry and native_window_set_crop APIs. But still video is rendered will full area of surface.


Please help me.

posted Jul 31, 2014 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

I'm looking for native library for video play with custom buffering for rendering of big video files (500MB+) in android application. What is the best options?

+3 votes

I want to let other nearby android users stream (via bluetooth or wifi) the video that I broadcast or transmit from my android device. In fact I would like to know if there is any direct option to stream the screen as video directly. Right now, I am storing the screen as video and want to stream it.

+1 vote

I have installed my custom app in Packages/apps/

in the app, I use a simple Videoview for video playbacks (3gp or mp4). it works in actual device/ADT emulator, but If I run it in AOSP emulator, it says "Failed to open file : the path of the video"

// Retrieving file from internal file 
systemVideo.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.drawable.test));
+2 votes

I am trying to get video playback running on our board which does not have mali support (HW accelerated graphics). Before adding hardware codec, I was trying to get it working with software omx codecs.
What is the procedure for this? Do we have to add YUV support in default gralloc and software opengl library? If not, do we have to convert YUV to RGB in stagefright? how can I do that? Is there any document for it?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.