develop video player on android to support HLS - android

I am trying to develop own video player that supports HLS(http live streaming) from 2.1.
I have tried vitamio but it requires that we install vitamio plugin which is around 3.2 MB.So trying to develop own video player.
I have been searching android source code to check how m3u8 file format is being supported on 3.0 onwards but have been unsuccessful so far.
It would be helpful if someone points me in the right direction. What classes do I have to check?

VLC Supports HLS but just barely. There is a product called NexPlayer which supported HLS all the way down to 1.6, but its paid only.

It would be helpful if someone points me in the right direction. What
classes do I have to check?
I'm sure you have definitely found the HLS source code by now,
but this is also for others who will attend this page.
HLS source code on Android 4.4.2, written in C++.

Related

Android VLC Embed vs Android VideoView

=== BACKGROUND SUMMARY===
At this moment, we are using Android VideoView to perform video play black. Everything seems to be working great until we encounter Live Streaming.
VideoView tends to have 10-15 seconds delay from the live stream within a local network (LAN).
While attempting to solve this issue, we came across VLC Embed for Android. After searching on the Internet, it seems there isn't any article compare pros and cons of using Android VLC Embed vs. Android VideoView.
=== QUESTION ===
What's the advantage (pros) and disadvantage (cons) of using Android
VLC Embed vs. Android VideoView?
Is VLC Embed stable?
Anything I should be careful when switching existing VideoView to VLC?
Thank you all in advanced
My view may not be very professional but it's about what I've experienced so far.
First, Android VideoView is good since it comes with the Android SDK so it does not require external library. But this one has some limits. For example, as far as I know, it doesn't support MMS and MMSH protocols and some others I didn't quote. Which is not the case for Android VLC SDK. This library is complete and supports almost all media formats I know so far.
It just increases your apk on size, on my side that's the only disadvantage.
Is the Android VLC SDK stable? Yes it's stable and maintained by a huge community.
Anything I should be careful when switching existing VideoView to VLC?
You should keep your sources same and care about aspect ratio.
What's the advantage (pros) and disadvantage (cons) of using Android VLC Embed vs. Android VideoView?
Advantage:
More features. VLC supports almost all media formats, hardware decoding. audio tracks, subtitles, chapter are also supported.
More integrated, simpler logic. You can easily get media information and cache them. The playback engine will proactively notify state changes and events, just register player event listening.
Disadvantage:
APK file size increas. If both arm64-v8a and armeabi-v7a are supported, it will increase more than 30MB.
Multiple instances are not perfect. For example, playing 2 videos at the same time is a hassle.
Is VLC Embed stable?
Stable. Starting with VLC 2.0.x (now 3.0.x), I use the VLC library in my Android App. It runs steadily from Android 5.1 to Android 8.0. A small number of 4k h265 video playback is not normal, but can be resolved by displaying "Can not play".
Anything I should be careful when switching existing VideoView to VLC?
To use LibVLC on Android The Medialibrary(org.videolan.medialibrary) is also required. You also need to note the licenses.
VLC for Android is licensed under GPLv3
This may be a concern for you if your project uses a different license.

Library to support H.264 AVC .mp4 on Android 2.2, 2.3?

I am working on a video application and we are generating videos in H.264 AVC Codec. As per Android Media Formats this codec is supported in Android 3.0+ versions.
I wonder if there is any free library that help us to play this format on 2.2 or 2.3. I found a library but it is not free.
I want to support HTTP live streaming for our application and the issue is same.
I have used ServeStream in my project you can find the description from http://sourceforge.net/projects/servestream/files/
And you can also check faplayer-android.
Servestream is another opensource ffmpeg based media player.
It plays mms streams such as mms://streaming.radionz.co.nz/national-mbr.
It has a FFMpegMediaPlayer class that looks just like a regular MediaPlayer.
It plays videos too.
There's definitely no such library. If you're willing to accept software decoding, you can probably build something around ffmpeg/libav and NDK.
Suggest you these porting Libraries 。
ffmpeg ,vlc ,gstreamer
faplayer-android open source url :faplayer-android

Playing HLS without Android OS support for .ts files

I have developed an HLS player for Android 2.3. It works. However, I am finding that certain Android devices lack support for .ts files. On these phones my player does not work. So, my question is this: Is there a way that I can include support for these files within my app (perhaps a codec or a library of some sort)? After exhaustive searching, I'm really not sure where to go.
Thanks.
Try to port FFMPEG to Android with the NDK, I think that's the best solution for your playing issues. I'm now in that way, I could report you my advances .
You can take a look at vitamio. I think that your player will work if vitamio is installed on the the devices that don't already support the ts files.

HLS streaming on Android

The HLS is supported on Android since version 3.0. Until the Honeycomb the H.264 and AAC was supported, but there was only RTSP streaming protocol. The HLS and MPEG-2 TS not (see here) were not supported.
Porting the ffmpeg to the Android platform could be a solution for that (LGPL sources ara available). I am however looking for a ready made solution with SDK, customizable HLS player, etc. There is one here, but I would like to know if you do not know about other solutions.
Thanks
STEN
You may find the http://vov.io/vitamio/ libraries very useful. They allow you to use HLS feeds (I've tested and use the library in production apps).
One thing to note however, don't try testing on an Emulator device, as it will not work, you will need a real device for your testing.
Hope that helps.
Warm Regards,
Shabbir
-- EDIT --
Just editing this answer to let people know that the Vitamio url has changed - and also now you don't need to download a separate "helper app" from the PlayStore or the vov.io website - you can now just incorporate everything from the downloads/instructions they provide.
The new site is http://vitamio.org/
MPEG TS is there in the codebase since 2.3 ( Gingerbread ) but it is not advertised. Actually HLS is supported in the 2.3 release but you need a small fix to enable it. You need to prefix httplive to the streams and make a small fix in the code to accept it.
Vibgyor
Finally we have made our own player with use of the FFMPEG libraries and now we are integrating there also HW decoding with use of the stagefright (http://freepine.blogspot.cz/2010/01/overview-of-stagefrighter-player.html).
BR
STeN

Flash support in Android

I am planning to port a flash player to Android OS. Presently Android is not supporting the Flash. I have looked into GNash, an open source flash player but the problem with this is that it is not supporting the latest version flash files and we can't open the youtube with GNash.
Are there any open source light-weight flash players which can be ported to Android.
EDIT: I have also tried SwfDec but even this one is not playing the videos from youtube.
Any other open source players which can play youtube videos?
Of course this could be a fun project to hack; however, you'll soon face real competition from Adobe, who are porting their own player as we speak:
http://www.google.se/search?q=flash+android
Just in case you can afford to wait.
I have used ffmpeg to convert the flv to mp4.
According to Google/OHA member engineers the problem you will have is performance on current device hardware specifically G1s..
My impression is that you will not see flash until the Dalvik VM JIT is finished developmentally...probably not until SDK 3.5 probably..
GNash website states (and my own experience confirms) that GNash actually plays most youtube videos OK. See GNash wiki.
Now Android has flash support,
maybe this can help:
http://www.synesthesia.it/playing-flash-flv-videos-in-android-applications
playing FLV on Android using flash player inside a webview

Categories

Resources