How to determine if an Android phone can capture video? - android

Android 1.6 supports video capture, however, not all phones will support video capture. Is there a way I can tell if the phone I am running on supports video capture or not?

Well, I couldn't find an official way to do this. The only way I know is to assume that all Android phones will support video capture, so if the phone is running 1.5 (3) or greater, it will support video capture.
android.os.Build.VERSION.SDK_INT

Related

Can't Play video in android uploaded from iphone

I have upload and play videos on both Android and iPhone devices but video uploaded from iPhone is not working on Android.it's not play in android video player. It's give me error message
"sorry this video can not be played"
video is in mp4 format.
Yes, That's right.
It happens because the android support limited codecs in-built like mp3,mp4,mpeg.
While iphone support most of codecs.
What is the way to resolve this?
MP4 for video and MP3 for audio are widely accepted and work on both platforms.
So you need do some stuff at the server. Implement the ffmpeg library that will convert all the videos to MP4 and audio to MP3.
We are doing same mechanism to resolve this issue.
Find FFMPEG implementation for PHP Here and
Command to convert all videos to MP4 Here
Hope this helps you.
Thanks.
If it is mp4, then you need to check what codecs are used. iPhone usually encodes everything in h264, however, there are different profiles of h264 and high profiles might not be supported on Android, because they are more complex for decoding.
Even apple says in their documentation:
H.264 Baseline Level 3.0, Baseline Level 3.1, Main Level 3.1, and High Profile Level 4.1.
iPad, iPhone 3G, and iPod touch (2nd generation and later) support
H.264 Baseline 3.1. If your app runs on older versions of iPhone or
iPod touch, however, you should use H.264 Baseline 3.0 for
compatibility. If your content is intended solely for iPad, Apple TV,
iPhone 4 and later, and Mac OS X computers, you should use Main Level
3.1.
Baseline profile should be played everywhere.
See the list here - http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
So if you have control over encoding (if the video is recorded from your iOS application), then you can do it programmatically. I just googled and found a piece of code where the profile is set: http://forums.macrumors.com/archive/index.php/t-1512924.html

HTML5 Video Tag currentTime not working in android

I am working with html5 video tag, i am using .m3u8 file for source. I can not able to seek video by using currentTime property in android 4+ whereas if i using .mp4 file i can able to seek.
In ipad its working properly but not working in android. Please guide me to rectify this issue.
Thanks,
Thavaprakash. S.
HLS and Android are not the best of friends.
Some problems I know of are:
No adaptive bitrate switching: the first quality is picked, no switching will occur.
When pausing, the video restarts from the beginning (for example with VOD).
When going fullscreen, the video restarts from the beginning.
When offering a livestream with DVR, the stream starts at the beginning of the DVR instead of at the "live" moment.
You cannot seek. <-- this is the one for you
Aspect ratio's are not detected properly. (tho this should be fixed in 4.1)
On top of these problems, there is no support for HLS in pre 2.3 Android and in 3.0 it actually makes your tablet crash.
Basically: only use HLS on Android for live video without DVR and set the correct aspect ratio. Oh, and try to pick a "suitable" quality, cause it won't switch.

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 Video Streaming - Device supported?

Ok. So there are a bagillion different Android devices. I have a video streaming service, works wonderfully for iOS. My app has a live video feature and a saved video clip playback feature (which streams to the device too). I've run some tests on different Android devices and get a whole bunch of different playback results. I am using a 640x480 h.264 base profile video. Streaming that video works only on some devices. For other devices, that same video stream can be made to stream at low resolution and that works on some devices, but still not others. The high profile streaming goes through http://www.wowzamedia.com/ (rtsp) and doesn't work on any Android device (but works on iPhone). The lowest and worst option is Motion JPEG, which works on all tested devices so far.
So my question is, how can I figure out (without having to test every device out on the market) if the device will play: 640x480 h.264 base profile - if that wont work then play the low resolution video - if that doesn't work, default to Motion JPEG.
Also, any idea why my rtsp transcoded through wowza works on the iPhone but not on any Android device (not even the Motorola Atrix)?
Streaming on android is an absolute mess. Most devices don't support anything higher than Baseline 3.0. If you encode for iPhone 3, it should generally work via RTSP. Newer versions of android support HLS, but it's hit or miss and largely dependent on specific devices.
I resolved this problem. Check RTP-realization in your streaming service and x264 profile. My RTSP-server works fine on 90% devices.
p.s
Some video frameworks in different Android versions can implement RTP and RTSP protocols with some differences.
These are some of the links/issues which I have come across, while trying to make streaming work in varied devices.
MediaPlayer seekTo doesn't work for streams
MediaPlayer resets position to 0 when started after seek to a different position
MediaPlayer seekTo inconsistently plays songs from beginning
Basic streaming audio works in 2.1 but not in 2.2
MediaPlayer.seekTo() does not work for unbuffered position
Streaming video when seek back buffering start again in videoView/Mediaplayer
Even the big shots in stackoverflow are wondering about this
If you want just streaming without seeking (which is lame), this can be achieved. But then if you receive a call while you are watching, you will end up from the start.

Android screen video recording

How I should go about recording a video screen capture of an OpenGL application?
So far my plan of attack is to take individual screenshots then run it through a video encoder.
Does anyone here know of any sample code I can look at or has any suggestions of things I can look at?
I'm looking for the OpenGL app to capture in game footage and save it as video content.
As of Android 4.4, there is a screen recording feature accessible via adb.
http://developer.android.com/tools/help/adb.html#screenrecord
The screenrecord command is a shell utility for recording the display of devices running Android 4.4 (API level 19) and higher. The utility records screen activity to an MPEG-4 file, which you can then download and use as part of a video presentation. This utility is useful for developers who want to create promotional or training videos without using a separate recording device.

Categories

Resources