mpeg-4 format not working in VideoView - android

I'm using a videoview to 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?

Related

HLS streaming on Galaxy S3

We are developing music streaming application for Android devices with adaptive bit rate support. We are using Wowza as streaming server which will stream songs using HLS. We have converted each song into four bitrates and have created smil files which are referred in HLS URLs. So basically final URL will look something like this.
http://streaming.server.name:1935/vod/smil:audiofile.smil/playlist.m3u8.
We have tested the app on multiple android devices ( Android version 4.0 or later ) including Galaxy S2, Galaxy Note I, Sony Experia, Google Nexus etc.. On all these devices the songs are getting streamed except on Galaxy S3. On Galaxy S3 the song starts and plays till 6 secs. After that the song goes in loop and plays again and again 6 sec part.
The same behavior is observed when the above URL is accessed through browser.
We have tried to check wowza logs but no errors were reported.
Has anyone tried such thing on S3 devices. Any guidance on how to debug this issue will be greatly appreciated.
The Android documentation states (not clearly enough though) that the TS container format only supports AAC audio. Your are trying to play HLS with TS segments containing MP3 audio data (which is supported by iOS).
I can share the observation that doing so works on most Android devices, but not on all.
The S-III is an example of that.
Please refer to the Android Supported Media Formats section in the documentation.

HD video streaming in gingerbread and ICS

i am really not getting anything on net related to this topic. I wanted to do HD video streaming on gingerbread and on ICS. I tried to play various HD video(mp4) locally on blaze ported with gingerbread, but not able to play. First of all i am not getting why it's not able to play video locally.
And the second thing i kept videos on server, but on pandaboard, i am able to hear sound only no picture.
I am wondering no body ever tried to do streaming of HD video. And do we always need to compress those videos to do streaming.
I am really helpless and i searched alot, but there is no solution for this.
Please help.
go through this link http://developer.android.com/guide/appendix/media-formats.html
part to check
Video Encoding Recommendations
Table 2. Examples of supported video encoding parameters.
SD (Low quality) SD (High quality) HD (Not available on all devices)
I guess the device your using is not supporting HD

Android video streaming not valid on some device

I use a VideoView to display on the device a mp4 video file. It work very well on all device but on other such as : galaxy next, LG P500 it display this message "the video is not valid for streaming on this device ?"
Why ?? Thanks
Wether an android device can show the video depends on which video-codecs the device manufacturer has compiled in.
You can ask the CamcorderProfile api if your device supports the requested video format.
The Android Supported Media Formats show you wich codecs should be supported .
Make sure your MP4 is encoded with the H.264 baseline profile. Make sure it is being served up with an HTTP 1.1 response. And also run it through MP4Box. We had numerous device-specific playback issues and doing all of the above has resolved them.
This post may also be helpful: Cannot play certain videos

Android 3.1 / Galaxy Tab / VideoView won't play

My app downloads a video file from a server and plays it using VideoView. I am using a H264 (AVC) encoded file in an .mp4 container.
On my Motorola Xoom with 3.0.1, it works perfectly.
On my Samsung Galaxy Tab 10.1 with 3.1, it does not work. I simply get an error message 'Sorry, the video cannot be played'. Trapping the error in code simply gives me 'MEDIA_ERROR_UNKNOWN'.
I suspect a codec problem (despite my codec being valid, according to http://developer.android.com/guide/appendix/media-formats.html). I take the same video file and manually copy it to the device - the device prompts me to convert the video. The resulting file plays fine in the Video app on the device. I take the file back off the device (inspected it in VLC tells me the video codec is now mp4v) and try to play it through my app - same result.
Is there something specific about 3.1, or the Galaxy Tab, that is causing this problem?
Double check the download/play location. Since it's a different device manufacture the path to the file might be slightly different
The issue is as described here:
Can a videoview play a video stored on internal storage?
My app stores the files on internal storage. The Xoom I was using to test was rooted, and therefore permissions were not a problem. However the Galaxy is not rooted, so videos would not play.

Android Video Streaming Problem

I am new to android and trying to streaming video from my server.
When i run the application it gives Error "sorry,this video is not valid for streaming to this Device.." than i download and push to sdcard of my device(samsung Galaxy 5)this time video is playing.... i convert this video by SOTHINK VIDEO CONVERTER..
Any Help??
Thanks..
We ran into exactly the same problem, and I found a solution at this link:
http://code.google.com/p/android/issues/detail?id=9044
In short, if you have access to a Mac, you can encode the videos using HandBrake. Be sure to check the "Web optimized" checkbox. I'm encoding as format:MP4 file, Video Codec: H.264. After I did this and uploaded I was able to view the videos (or at least listen to them) in a 2.1 simulator, which had been giving that exact warning message before. I have not been able to get a hold of an actual 2.1 device, but I suspect it will work. When I confirm that I'll check back in here to let you know.
It seems that you are talking about sothink video encoder engine. Actually this program only supports the apple devices in ios system, for example, iphone, ipad and ipod.
Here is the official product homepage of sothink video encoder engine, and hope it helps!
http://www.sothinkmedia.com/flash-video-encoder-command-line/
The only issue for error "sorry,this video is not valid for streaming to this Device.." is that there is some problem in video format. Just correct the format/codec of mp4 and then it would run gracfully.

Categories

Resources