What formats of video will play in emulator? - android

What formats of video file are supported in the Android emulator?
I understand that it probably won't play in real time, but what ones will play at all?

The secret is that the emulator will play the MP4 baseline profile, while real devices will also play better MP4 profiles.
In order to get a video file that plays properly in the emulator, try these settings:
ffmpeg -i inputvideo.wmv -vcodec libx264 -vprofile baseline outputvideo.mp4

It supports H.263 encoding and decoding, H.264 AVC and MPEG-4 SP both only decoding.
On an emulator the playback quality in terms of speed or lags might be a bit cumbersome.
Checkout the chart of all supported media formats for more information.

Related

MP4 video does not play on mobile

https://ymcasports.org/index.cfm/action/ynational_highlights/content_action/ynational_highlights/league/3636/album/4314#15083
The videos on this page play fine on Android but do not play on chrome for android and only audio for firefox for android.
Your Video has 4:2:2 colorspace but most hardware decoders only support 4:2:0 profile currently (in a few years future, this might change).
Anyway, i see the video was created using ffmpeg already. All you need to do is to add -pix_fmt yuv420p to the ffmpeg command.
[EDIT] for video format related questions, in future, please post a mediainfo report as well: https://mediaarea.net/MediaInfoOnline

Record Video that can be play in almost all android device powerd by API 8+

I have application for sharing videos. I found an issues in HTC Wild fire device, Video is not showing the content which taken by Nexus 7, But i can hear the voice in that video.
I guess it happen because streams encoded with unsupported codecs or unsupported video size. My question Which encoding format supported by all the android devices powered by android API 8+
Please refer to the list of supported media formats as captured by Google at http://developer.android.com/guide/appendix/media-formats.html
Any device vendor can choose to not support a specific encoding format. If you can connect to your device, please pull /etc/media_codecs.xml which provides the list of encoders and decoders supported by the device.
H.264, H.263 & MPEG4 are pretty well known formats and almost all android devices support the playback of the same, whereas VP8 is relatively newer format and hence, from your reported problem, I suspect that your device may not be supporting the playback of the same.
According to Supported Media Formats this formats support built into the Android platform (and supported in almost all devices even on Android 2.2 or older):
Video:
1. H.264 AVC (Baseline profile) inside MPEG-4 (mp4) or 3GPP container
H.263 inside MPEG-4 or 3GPP container
MPEG-4 SP inside 3GPP container (3gp)
Audio: AAC LC,AAC HE, mp3.
But you have to be patient with bitrates and video resolution. Some devices cannot handle resolution more than 720p (like H.264 with CABAC on Tegra 2). Most of devices support FPS up to 30. Some devices (old Sony Xperia) has issues with decoding surround sound audio in some formats which will cause silence.

slow avcodec_decode_video2, ffmpeg on android

I am developing a player on android using ffmpeg. However, I found out that avcodec_decode_video2 very slow. Sometimes, it takes about 0.1, even 0.2 second to decode a frame from a video with 1920 × 1080 resolution.
How can I improve the speed of avcodec_decode_video2() ?
If your device has necessary hardware+firmware capabilities, you could use ffmpeg with libstagefright support.
Update: here is the easy procedure to decide whether it is worth while to switch to libstagefright on your device for a given class of videos: use ffmpeg on your PC to convert the representative video stream into mp4:
ffmpeg -i your_video -an -vcodec copy test.mp4
and try to open the resulting file with the stock video player on your device. If the video does play with reasonable quality, you can use libstagefright with ffmpeg to improve your player app. If you see "Cannot Play Video", your device hw+fw does not support the video.
That sounds about rite. HD video takes a lot of CPU. Some codecs may support multithread decode if you device has multiple cores. But the will consume massive amounts a battery, and heat the device. This is why most mobile devices use specialized hardware decoders instead of CPU. In Android using the MediaCodec API instead of libavcodec should invoke the hardware decoder.

Is there a way to play .mxf video on Android?

According to developer.android.com, the Android supports the playing of video using the H.263, H.264 AVC, MPEG4 SP and VP8 codecs. However, I want to play a video encoded in the .mxf format (Material eXchange Format, http://en.wikipedia.org/wiki/MXF) in my app. How do I go about it?
MXF generally contains MPEG-2 / AVC video with profile/levels not supported by the decoders in the android devices. Specifically IMX is 422 profile at main level and HD MPEG-2 MXF is generally 422 profile at high level.
The rule of the thumb says that you must use the most common and less resource intensive codec. Bad video playback is a deal breaker. Maybe you know the huge difference that format makes but the user won't.

android 2.2 can't play AAC Mono and 128x98 Video?

our engineer test video and audio player using streaming aac mono contents and 128x98 video content.
aac and mp4 decoder can't decoding content. and return error.
android not support low level contents?
It really depends on the platform itself more than the android framework. What phone / processor / system configuration you are using.
Also mp4 is only the container. If inside is actually MPEG4-AVC video, then there are a lot of different profiles, bitrates that can affect whether your android will be able to decode correctly.

Categories

Resources