h264 videos not being played by android - android

We provide facility to upload and stream video lectures to different schools. I recommend H264 video codec to be uploaded. We are facing issue on android where H264 is supported by android 6.0.0 and afterwards. Which video format we should be using to stream videos both on android app and web app.

You are correct, the h.264 main profile is only supported in Android 6+
However, if you use h.264 baseline profile, you can go back to Android 3.
Source: Android Developers. You can also check out other formats that are supported there.

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

Playing .m3u8 HLS live stream in Android

I am trying to achieve HLS streaming in Android.
I have setup the HLS streaming server (apache2) in Ubuntu desktop and able to play the stream using the VLC player on Desktop.
But when i try to play the stream using VLC player in Android, I am not play the video, nor I am getting any error.
If anyone has tried similar streaming, please provide your inputs.
Thanks
Following some further investigation, I've found the following information that can hopefully help other people get HLS streaming on Android working.
Encoding - The video encoding, and the segmentation setup can have a large impact on the Android versions that the video supports. I ended up creating a video using HandBrake, with the following settings:
MP4 File
H.264; Baseline Profile; Level 3
AAC Audio; 44.1k; 128bit (Note: I found that JellyBean was a lot more picky about the audio than ICS/Honeycomb. Some audio bitrates would create videos that Jellybean would not play at all. In general Mono and low bitrate audio seemed to work better on Jellybean).
Segmentation - Using the Apple MediaFileSegmenter, I found adding the "-no-floating-point-duration" and "-z none" flags allowed me to create a video that worked across Android 3.0->4.2
Gingerbread - I was unable to get Android 2.3 to work with HLS out of the box, but I did find that using the Vitamio library worked pretty well (see this question for further info)

Live streaming issue from iOS to Android

We are working on an video streaming application in iOS and Android. We are using Wowza server. Application works fine from iOS to iOS and Android to Android. Means a video published from iOS device can be viewed on iOS device but not on Android device.
I know both Android and iOS support H.264 compression and we are publishing H.264 formatted stream. Here a bit confusion I thin H.264 is a compression technique and further defined by MP4, FLV etc please confirm.
What I think iOS publish stream something like .MOV defined H.264 stream which is not supported by Android that's why I think it doesn't work on Android. Please confirm.
Please suggest any way to play a video stream published through ios app to Android device.
There are two aspects to video files: The container and the encoding (or codec). H.264 is an encoding, and Android can deal with it, but Apple uses the QuickTime container format, which is similar to the MP4 container but apparently just different enough that Android can't handle it. Android can play MP4 files, and there are utilities to convert QuickTime to MP4, if that helps.

Play h264 encoded videos on android device from stream

I'm working on certain project that allows some video editing, uploading edited video to server (Amazon S3) and playing this video on device.
The iOS version is already completed. I'm using there GPUImage to edit and encode videos.
I'm using quicktime container and h264 codec.
Now I'm working on android version of this project and have encountered several problems.
While I'm able to download and play these videos (encoded on iPhone) on the android devices, I'm not able to play the stream of these videos on most of android devices.
I have done some research and one of advices was to add some code to iOS postencoding that converts to mp4 and fixes MooV http://fabiensanglard.net/mobile_progressive_playback/index.php, but it doesn't help.
The only thing that I have achieved after that "fix" is to hear audio track and not getting error message on Galaxy SII device, but on other devices there is the same story.
After that I have downloaded VLC player from play store and it plays these videos.
So my question is, what do I need to do to play h264 stream?
How can I implement my own video player or how can I use VLC source code to play these videos.

Play video on the android recorded from the iPhone

I am writing video based social app for iOS and android(WinPhone is under waiting).
I recorded video in mov format using AVFoundation framework on the iPhone and uploaded it to the server.
It can be downloaded and played on the iPhone client.
But on the android device, downloaded video can not be played since it's format is not supported on the android.
What is the best solution of the video record and play for supporting multiple mobile devices platforms?
Blog post #Why Apple Is Winning the Mobile Video Format War...For Now
Android uses the flash plugin, and apple uses HLS
Today’s wide usage of the HLS protocol is a result of iOS success. Apple designated the protocol as the one and only way to stream video to an iOSDevice. No Flash, no Silverlight, no RTP or RTSP.
Q&A post #Best format for Mobile Video states
MPEG-4 will play on all mobile phones (at least those capable)
it also plays while buffers vs .mov which requires the whole movie to download first before playing.
StackOverflow post #Video Format that Works on Mobile Phones
I haven't come a cross one single mobile that doesn't support the MPEG-4 container format, including blackberry.
We tested a variety of Android devices and all of the recent models (Android 2.2/2.3) do support MPEG 4/H.264, the same goes for iPhone and AFAIK the Windows Phone.
Software Product info #Choosing a movie format
If it needs to play back on mobile devices. Choose MPEG-4 format can be played back on iDevices and Android phones.
Alot more info can be found #Choosing a movie format
Acceleration of MPEG-4 applications #FZi Forshcungzentrum INformatik
The whole MPEG-4 encoding/decoding process is partitioned between the standard processor, which is controlling the system and executes control-intensive algorithms, and its XPP coprocessor, which executes the computational-intensive data-flow algorithms and sends the results back to the host processor.
From this information, I suggest you convert to the MPEG-4 format.
MPEG-4 - Wikipedia, the free encyclopedia
MPEG-4.net - The Streaming Media Technology Resource
Mac app-store free video converters:
Miro Video Converter (MVC)
Smart Converter
Any Video Converter Lite
WonTube Free Video Converter
ffmpeg -i infile.mov -vcodec copy outfile.mp4
This will repackage the mov file to mp4 without transcoding. It is very fast. The resulting file is compatible with both android and iphone. Of course the best solution would be to record mp4 on the iphone in the first place. Yes you can do that.

Categories

Resources