I have one issue while using android ExoPlayer for streaming url.
Here I have attached sample URL:
http://epicmediaservice.streaming.mediaservices.windows.net/0bd4f655-00f9-4e36-a638-f8e90d9432c9/Nursery%20Rhymes%20Sample%20Clip.ism
It is working in some device, but not not working for Android version 4.2.1 (Micromax canvas 116)
It shows buffering video, but not playing.
If I select video option as OFF then it plays, but only audio comes no pictures visible.
new Sample("Super speed (PlayReady)",
"http://epicmediaservice.streaming.mediaservices.windows.net/0bd4f655-00f9-4e36-a638-f8e90d9432c9/Nursery%20Rhymes%20Sample%20Clip.ism",
DemoUtil.TYPE_SS),
Looks like you are trying to play DRM-protected content (PlayReady) which probably won't work since Exoplayer doesn't support DRM until Android 4.3 and upwards, also check on your device's documentation that it really supports PlayReady.
Check section Digital Rights Management on ExoPlayer's developer guide.
Related
=== 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.
I've made an app to view vine videos on Android devices. These are basically .mp4 videos being loaded into a VideoView. From the following documentation (http://developer.android.com/guide/appendix/media-formats.html), mp4 video playback is supported on Android version 3+ devices.
I've already added a android:minSdkVersion="11" to the manifest file to filter out older android versions from downloading the app, but I'm still getting feedback from users running newer versions of Android (eg. 4.1, 4.2) that complain about getting a "Video cannot be played" error message.
Since there's no way (that I know of, please correct me if I'm wrong) to test video playback using the emulator, I can't really know what's going on.
Is there any way to check for a device's ability to do video playback or at least get the emulator to play videos, so I can correctly fix this issue?
pd. for those interested, here's a link to my app in Google Play. As you can see, I'm being crushed by negative reviews: https://play.google.com/store/apps/details?id=com.thirtymatches.vineflow
If you look at the Google compatibility matrix closely, you'll see that support for MP4/H264 encoding started with the Android 3.0 release. Playback of MP4/H.264 has been supported by all Android devices back to Android 1.0, so there's no need for you to limit availability to newer releases of Android (unless you have other API compatibility needs).
Via VideoView, the video playback on all these devices is done using the hardware decoder provided by the phone's chipset. So to guarantee compatibility, the video has to be encoded to lowest-common denominator. Google provides "Video Encoding Recommendations" at the bottom of the page you linked; I also wrote an answer describing how we transcoded to a form of MP4/H264 that plays across all Android devices.
Not knowing what Vine is doing with their video clips, it might be that the videos aren't all encoded with uniform encoder parameters. They might be taking the videos straight off handsets and streaming them without any additional server-side processing to ensure wide compatibility; I don't know. If that's the case, you might find it challenging to develop an Android app that can show the content without a) implementing your own software codec (as apps like RockPlayer, MX Player or VLC do) or b) transcoding the videos on a server (which probably will run afoul of Vine's terms of service).
When i run my application on the tablet(android) and hit the pause button it pauses the screen of the video but the video will jump a head how ever many seconds the pause when i un-pause the video. So if i start the video and then click pause and walk away i can come back and un-pause the video and it well jump right to the end.
The code i am using is ns.togglePause(); This same code works on the desktop and works with .flv and .f4v but will not work when i am using a mp4 on the tablet.
Has anyone seen this before or know why it would do something like this?
i am using flashdevelop to debug the application.
I found out that my problem is caused by encoding. This helped me solve my problem.I found this on adobes forms.
Video encoding is very important.
For example, use baseline profile level 3.1 for H264 for mobile
(and not High profile level 4.1 recommended for desktop).
For more information, see the MAX session of Fabio Sonnati:
"Encoding for Performance on Multiple Devices"
And if you have an Android phone/tablet, there is my AIR application
to watch Adobe MAX 2011 videos :
https://market.android.com/details?id=air.fr.inway.maxVideos2011
Search "Sonnati" for this session's video.
(For info, i use a video player based on OSMF 1.6)
The pdf presentation is available on Sonmati's blog:
http://sonnati.wordpress.com/
I need to make video player on Android that is able to play in slow motion and with different playback speeds. I still cannot find a native API or some code to do this. Does Android 2.2 - 2.3 support to video slow-motion and can we control the video playback speed?
Yes, from API 23 android has PlaybackParams class .It supports adjustment of playback speed of video briefly given here .
You can try exploring libVLC for this. VLC player for Android is almost due. Check their website.
Check this thread that discusses how you do it.. http://forum.videolan.org/viewtopic.php?f=14&t=89296
libVLC developer documentation here with normal playback sample. You need to modify this sample to play the video frame by frame or slow down the frame rate.
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