320x480 does not work, not does any other combination of size that
maintains that precise aspect ratio (e.g. 160x240).  However, if I
change the ratio slightly, say by adding or subtracting 16 from the
width, it plays fine.  Odd.

I'll have a look at the source and see if I can tell what's up.

Thanks.

On Nov 12, 9:30 am, Dave <[EMAIL PROTECTED]> wrote:
> I've never tried 320x480 but it should work. The constraining factors
> are the memory size (dictated by the frame size and bit rate) and the
> complexity of the encoded material (typically expressed in
> macroblocks).
>
> When you say "full screen" video, do you mean that you want the video
> stretched to the dimensions of the display, ignoring the aspect ratio?
> The VideoView widget won't get you this, but I think you can subclass
> it and override the behavior. Also, the source code is available on
> source.android.com, and it's just a few hundred lines of code. You
> could create your own widget with custom behavior.
>
> On Nov 12, 7:55 am, jean-guys <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the reply!  This is good info.  It may be that the b-frames
> > are causing the problem, I'll make sure the H264 video is baseline (I
> > didn't do the encoding myself so not sure at this point) and try using
> > a MP4 container.
>
> > Regarding the video size, would a 320x480 resolution video be beyond
> > the "max" since the vertical resolution exceeds 320?  Our app is
> > intended to run in the portrait (i.e. slide closed) mode and hence we
> > encoded the video at 320x480.  If we were to reencode at 480x320 with
> > rotated frames how would we accomplish this from the VideoView?
>
> > Lastly an observation that as  more devices with differing screen
> > aspect rations appear full screen video would seem to become an
> > exercise in packaging multiple videos simply to get a fullscreen
> > experience on each.  I hope this changes in the future.
>
> > Again, thanks for the informative response.
>
> > On Nov 11, 11:46 am, Dave <[EMAIL PROTECTED]> wrote:
>
> > > The following are for the T-Mobile G1, other Android devices will
> > > likely have different specs based on their hardware capabilities:
>
> > > H.264 AVC baseline, H.263, and MPEG4-SP codecs are supported in a 3GPP
> > > container file. H.264 AVC is also supported in an MP4 container.
>
> > > The H.264 AVC format is preferred due to support for h/w acceleration.
> > > Video size up to 480x320, with video bit rates up to 600K bps average.
> > > Make sure you disable b-frames (not supported in baseline).
>
> > > VideoView adjusts the surface size based on the reported aspect ratio
> > > from the video. If you want it to fill the display, make sure that the
> > > video aspect ratio matches the screen aspect ratio.
>
> > > On Nov 10, 6:42 pm, jean-guys <[EMAIL PROTECTED]> wrote:
>
> > > > Our app has a simple 3 second intro video that plays the first time
> > > > the app is launched. So far we've experienced two issues with this.
>
> > > > The first is that we seem to be limited to H263 video in a 3GP
> > > > container at "standard" resolutions (i.e. 352x288).  H264 video
> > > > doesn't play at all in a 3GP container.  Is there a published list of
> > > > supported video codec and container combinations?
>
> > > > The second is that we can't get the VideoView to fill the screen in
> > > > the case that the source video does not exactly match the device
> > > > screen.  We'd like to be able to programatically determine the optimum
> > > > video dimensions and have the video player scale appropriately.
> > > > Setting the VideoView to FILL_PARENT works fine until the video starts
> > > > playing, at which time the VideoView is resized to the video
> > > > dimensions.
>
> > > > Is there an equivalent to a setWidth and setHeight that will stick?
>
> > > > This is our simple layout:
>
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > > > android"
> > > >               android:orientation="vertical"
> > > >               android:layout_width="fill_parent"
> > > >               android:layout_height="fill_parent">
>
> > > >     <VideoView android:id="@+id/surface"
> > > >                android:layout_gravity="center"
> > > > android:layout_width="fill_parent" android:layout_height="fill_parent"
> > > >                android:minHeight="480">
> > > >     </VideoView>
>
> > > > </LinearLayout>
>
> > > > Tried with and without the minHeight and the results appear identical.
>
> > > > Help?  Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to