Hi there,
I have a simple question: does Unity 5.6 video player support streaming video from local path in API levels prior to 21? I could not find a minimum system requirements for the video player and thus, I am asking it here.
When I try to play a video from a local path in a newer Android device, it works almost perfectly (loop stops working after a while). When tested on Galaxy S3 API 18, I get the following output in logcat and video does not play:
W/Unity (12443): AndroidMediaNDK could not load symbol AMediaFormat_new, will stop loaing NDK.
W/Unity (12443):
W/Unity (12443): (Filename: Line: 47)
W/Unity (12443):
W/Unity (12443): AndroidMediaNDK: libmediandk.so not loaded. NDK-based video playback disabled.
W/Unity (12443):
W/Unity (12443): (Filename: Line: 24)
W/Unity (12443):
W/Unity (12443): Android media NDK not available in API level 18. Level 21 or more needed. Will use JNI instead.
W/Unity (12443):
W/Unity (12443): (Filename: Line: 33)
W/Unity (12443):
W/Unity (12443): AndroidMediaJNI got error: java.lang.NoSuchFieldError: no static field with name='KEY_LANGUAGE' signature='Ljava/lang/String;' in class Landroid/media/MediaFormat;
W/Unity (12443):
W/Unity (12443): (Filename: Line: 21)
Thanks 
The draft documentation states that Android is not supported at this stage, so you’re lucky to get as far as you did!
Windows, OSX, iOS and WebGL are supported for now, with Android and Tizen appearing in the next phases of this release.
Found the answer on 5.6 changelog:
Hi yasirkula,
The VideoPlayer is indeed supported from API level 16. But there are many bugs present in Android’s implementation of the movie decoding in 4.1-4.3 (16-18) for which we are implementing workarounds at the moment. This is why you see the note about 4.4+ in the release notes, although I do have a Galaxy S3 API 18 that plays 1080P properly. We’ll include these workarounds in the 5.6 patch releases as they become available.
The behaviour depends on many things, including the codec (VP8 or H.264), the specific codec parameters (resolution, H.264 profile/level being the main ones) as well as presence/absence of audio tracks.
About the specific messages you are seeing in your logcat, they can be ignored:
- The NDK message is just saying that, out of the 2 ways Unity can use the Android movie decoding libraries, the most efficient one (NDK) is not available and we thus revert to the other one (JNI). Maybe I should reformulate so it appears less scary…
- The KEY_LANGUAGE message is saying that we tried to obtain the audio track language (so your code can, say, select the wanted language in case there are alternatives) but it wasn’t specified in the track. Again, this may be unneeded verbosity that I can rework.
There may be further error/warnings that explain why this specific video is not working. You can post them here if you can spot them: they should all start with the string “AndroidVideoMedia”.
If possible, please share the non-working video with us through a bug report. This way we can make sure we nail the cause of the problem (or explain how come this video may not be played on the device). The looping problem is also worth logging (with a video that exposes the issue).
Keep in mind there are recommendations on how a movie should be encoded in order to play well on Android devices: Supported media formats | Android media | Android Developers
Individual vendors are of course free to go above these recommendations, but this will be on a per-vender/device basis.
Hope this helps, and thanks for letting us know!
Dominique
A/V developer at Unity
1 Like
Hi Dominique,
Thank you for the detailed answer; that was very enlightening. I’ll keep you updated when I submit a bug report or find anything new on my side.
U are the best! 
@yasirkula When you report a bug, please mention the exact model number of the Samsung Galaxy S3
1 Like