mpeg-4 format not working in VideoView
I'm using a videoview t开发者_StackOverflow中文版o show a movie (which works on an htc desire). But this fails on the htc wildfire. I don't get a stacktrace, just android itself telling me it cannot play this movie. I thought mpeg-4 was generally working on android? I'm programming for api level 4. Does someone know why this format isn't accepted and which formats work?
MPEG4 is supported on Android when it is contained in the following container formats- .mp4, .3gp and .ts. I think you are trying to play a mpeg4 media content in .avi which is not supported.
Here is a list of all the media formats supported by Android.
This might or might not be your problem's solution but maybe it will help someone who lands here by search.
I couldn't get Android's VideoView from API example to play any file, but it was a mistake on my part.
- I've type path from the root, example /videoFileName.mp4 and I should have type it with sdcard in between like /sdcard/videoFileName.mp4
2. My Sony Ercisson Xperia Arc was connected as a usb mass device storage at the same time I was running my app through adb, so internal sd card was unmounted and file could not be found. I've discovered this when I tryed same code on Samsung Galaxy S which behaves differently when connected.
Maybe the bolded part is your problem?
精彩评论