Can Android v2.3 Play MP4 files? - android

I have an MP4 file that I play with the MediaPlayer example in API demos on the emulator. Only the sound is played. No video. Why would this be and how do i get it to play?
BTW: .3gp files to play both audio and video in the same example.
Thanks!

The supported media formats are listed here: http://developer.android.com/guide/appendix/media-formats.html . Make sure your mp4 file uses the right format (H.264 AVC or H.263).

Related

How to stream mp4 vedio in android

How to stream .mp4 video in android, video is from backed server. By implementing all the solution showing a message can't play this video
My suggestion is to use Exoplayer which is google's video default player.
here is a very basic, working example of exoplayer 2.8.4 to play livestream or .mp4 files.
https://github.com/ayalus/ExoPlayer-2-Example

Android Streaming video MOV with ACC (mp4a) audio and H264 video

I would like to show some video in my android application.
Video are like: http://myserver.com/video/myvideo.mov All the video are in .mov and some in .flv.
.mov have H264 - MPEG-4 AVC (avc1) video channel, and MPEG ACC Audio (mp4a) audio channel.
.flv have Flash Video (flv1) video channel, and MPEG Audio layer 1/2/3 (mpga) audio channel.
If I play the .mov with the default android player I can see the video image, but I can't hear anithing.
With the .flv I can see and hear the file in the default android player.
Is there a way to play correctly the .mov with the MPEG ACC Audio (mp4a) audio channel?
Anyone know if there is a custom library to play this .mov files? Thank you in advance!
As stated here MOV container even with H264/AAC inside is not supported in Android. The underlying reason is that MOV (aka quicktime file format) is a proprietary container from Apple (it is a close one from MP4 but still not the same) - most of the time it works 100% only on Apple device and/or quicktime player.
FLV container from Adobe is also not supported in Android (FLV can be packed with H263 or H264 video inside).
It can work on some device but as you experienced it, it can be clunky and surely inconsistent across devices.
Your best bet is to package/transcode your file in a format where you know you will have cross-Android compatibility.
If you want it badly you could think about building your own video player/decoder to play back mov/flv files (like with ffmpeg) but it is an advanced project in itself and providing code for that would be outside of the scope of stackoverflow - maybe have a look here.

Windows Media Player cannot play MPEG-TS file created in Android.

I tested the StageFright record sample (frameworks/base/cmds/stagefright/record) to create a mpeg2 TS file. While it can be played on Android default Media player, it cannot be played in Windows Media Player or MPlayer. Any suggestions?
Note that I modified the original record sample source to create MPEG-TS file instead of MP4 file.
Which codec you used to create the mpeg2 TS file. May be difference in the codec used is the problem.

Android 2.2.1 default video player can't play H.264 file

I found that the default video player on Android 2.2.1 can't play the format of H.264(640*320) video file, instead it can play the format of H.263(353*288) video file.
However, the quality of H.263 video is very bad, anyone can suggest how to make the Android 2.2.1 default player can play H.264 video?
Other solution is welcome.
Thanks
According to this, Android supports h.264 Baseline Profile playback. So your h.264 video is not Baseline Profile or possibly it contains an unsupported audio.
You should note that there are many h.64 flavors, so you should check your video file: http://www.niallkennedy.com/blog/2010/07/h264-video.html

Android Mediaplayer for voice playback

Is there any possible that we can playback our recorded voice in android through media player with the format of wav or mp3 instead of 3gp or mp4.
if it is possible please give me a source code or URL.
Thanks in advance.
I've already seen this kind of question. All yours...
https://stackoverflow.com/questions/5165295/android-voice-recording
Android audio and voice processing
Android Audio record
https://stackoverflow.com/questions/5234017/android-voice-recording-in-wav-format
Please be more specific describing your problem. I think the first step would be, to show us, what you've got until now. As this is a place to solve specific problems, I would recommend you to take a look into the "What kind of questions can I ask here?" section in the https://stackoverflow.com/faq.
3GP and MP4 are video formats. MP3/WAV are audio formats. The MediaPlayer class definitely supports both MP3 and WAV, as well as MP4 and 3GP. View this link for a list of all supported media formats on Android.
Here is the MediaPlayer Audio sample part of the API Demos application. You could try using this code to play your audio.

Categories

Resources