In my app I need to play videos from sdcard. Now it works fine on Galaxy S,Galaxy Tab2, But on some chinese tab Like "Giada" It is not working at all.
I have 4 different activities to play videos like. First activity plays a menu video which has navigation link to other activity. Problems I am facing.
Video Extension: MP4 Resolution : 1024x600 Playing From : SDCard.
Target Tab Specification.
Resolution : 1024x600 Android :4.1
Tried with Video View and SurfaceView.
Help me out any help will be regreted.
Reason 1: The media player you are using is not compatible with the format. Reason 2: There could be a codec issue. Reason 3: The MP4 file that you have downloaded could be broken. These are the most common reasons why you may end up looking for how to fix corrupt video files MP4 solutions.
Do you have an MP4 video file on your Android that won't play? Android phones and tablets will open most MP4 files in their default player app. However, if you have an MP4 file or attachment that won't open, you'll need to use a third-party app. Luckily, you can easily install and use VLC in a few simple steps.
MP4 is the most widely used format. It can be played on a variety of devices, including PC, Mac, TV, iPhone, Android, Xbox, PS5, and more.
The answer to this question will never be consistent across all devices or across all videos.
Whether a given video file will play in a given player depends on three things:
The codec and player/device support for it is almost certainly the cause of the inconsistent results you've seen. (A codec, if you didn't know, is basically a repeatable mathematical formula that tells your system how to turn bits and bytes packed into a file into moving pictures(and back again, for that matter))
There are a large variety of video codecs in the video files floating around out there. Support for these codecs is wildly inconsistent just due to the history of video distribution. Many devices won't support streams encoded with certain codecs. There are a variety of reasons for this, but the most common are obscurity or licensing costs.
For example, up until a few years ago, almost everything was encoded in an .FLV container with an On2 VP6/VP7/VP8 codec. This is causing headaches today because while On2 owned these codecs, they kept a tight rein on the licenses. That didn't relax until .FLV had already begun to lose relevance, and so there is not a whole lot of (legitimate) software out there that can work with On2-encoded content.
What all of this means is that there is no silver bullet. All video will never run on all devices, at least not without the aid of video players that install and use their own codecs to decode the streams.
Needless to say, this does not include the libraries provided to you and your end users by the factory-installed Android libraries.
So, what do you do? Well, short of producing a video player that carries its own codecs, you can most effectively address the problem with a two-step approach:
Today, the widest support is available with an MP4 container and a video stream encoded with the H.264 (AVC) codec. As I said, there is no silver bullet, and H.264 support is not universal by any means, but this one format will be playable more potential users than any other single choice you could make, due to its popularity and wide support in modern desktop and mobile environments.
Some tools you may find helpful:
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With