My Code::
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView vi
I have the same problem , I just figured out that it cames from the video format and encoding. But I didn't really fing the combination thet works on all devices.
thanks for give the answer if you find it!
To expand further on my comment, I had fought a lot with different encodings/formats/etc until I got the one that worked on all android devices (at least all that I tested). Using ffmpeg, here's what finally worked:
/usr/bin/ffmpeg -i inputfile.ext -y -s 320x240 -vcodec libx264 -vpre medium -vpre baseline -acodec libfaac output.mp4
i had d same issue and i resolved by adding a delay of 250ms. actually the error occurs when we try to capture and play immediately. At that time, the engine is not yet ready to play (coz it hasnt reached End of streami.e. hasnt read the video completely)
I'd recommend you have a look at Android's overview of supported media formats. This site covers everything from the first versions of Android to the latest:
Android Supported Media Formats
I'm guessing you're trying to include a video in your application, and that it needs to work on all devices, so I'd suggest you go ahead and try to encode a video with a profile similar to the SD (High quality)
listed on the above mentioned site.
There are plenty of free video converters available that you can use for encoding the video - one of them could be Freemake Video Converter.