Play h264 encoded videos on android device from stream - android

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.

Related

Android media controller doesn't play sound for iOS recorded videos

I am currently developing a video streaming feature for one of my android apps. I am using android media framework for the purpose. Videos are streamed from an nginx server. Android recorded videos works fine but iOS recorded videos plays only the video not the sound.
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.
Some more information to understand the problem
Refer stackoverflow answer here
Hope This may help you to get the rid of your problem
Happy Coding!

Which video format and Codec in iOS, is supported in Android?

I am recodring video via UIImagePickerController. Then I upload my video to PHP server. But Android is not able to play video after downloading it from server.
UIImagePickerController returns video in .MOV format. I save this video in .mp4 format (just by changing file extension according to Second answer in this question) . To play it in android.
In iOS i am able to play video after downloading it from server but not in android. I think this is codec issue. Android does not support all iOS video codec. Someone please help :)
What should I do so that Video is compatible on iOS and android both.

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)

android play video of all extensions

after a long try and searching on the net i found no way to play video with all extensions programmatically. I tried videoView and other android normal tools that play just few video extension and tried to configure android vlc player but it failed to run.
can any body help me to play videos with all extensions or convert them to standard extension that android can play them such as MP4 (conversion can be server side and no programming language restriction exists)
I installed the following programs on my android device and so far it plays all video formats...
MX player pro
FLV video player
MOBO video player pro

Samsung Galaxy Tab doesn't play 3gp or mp4 with h.263, but plays mp4 with h.264/youtube

I'm trying to play some videos from web, using VideoView.setVideoPath()
This videos are .mp4's
Using MediaInfo, I found some important lines:
Codec (Human Name)................................MPEG-4 Visual
Codec Profile.....................................Simple#L1
Codec Settings (Matrix)...........................Default (H.263)
This videos don't play on Galaxy Tab, but play well on any HTC and other Samsung with Android.
I also tried to play a .3gp, but this also doesn't play on Galaxy Tab and plays on any other android smartphone.
The only video that I could make to play on Galaxy Tab are .mp4's from Youtube.
Can anyone recommend me how to make .mp4's with H.263 to play on Galaxy Tab without changing encoding?
And, maybe more important:
Does anyone knows any other possible Android devices on which this videos won't play?
Update: Maybe an important information: when I download the video and play it locally, with integrated browser, any of the above videos play well. The only problem is that GalaxyTab doesn't support even progressive video streaming of h.263/.3gp
Thanks in advance!
I transcode my videos to XviD which play nicely on my Galaxy Tab. They're just dvd rips for my kids to watch.
My understanding is that there's no H.263 codec available for the tab.

Categories

Resources