[Android] High resolution videos cannot playback with some Samsung tablets
Problem Description
High resolution videos cannot playback with some Samsung Android tablets. It happens only with AIR applications for Android. Seems for such videos metadata encoded at the end of video file.
Tested with multiple AIR versions, even with latest AIR 51.2.2.5 with multiple different Samsung Android devices with different OS versions, different architectures (armv7/armv8) with different videos. Issue reproducible with any 1200x1920 MP4 H.264 video with devices:
- Samsung Galaxy Tab A7 Lite (Android 12)
- Samsung Galaxy Tab A9+ 5G (Android 15)
There is no such issues with devices:
- Samsung Galaxy S9 (SM-G960F) (Android 9)
- Samsung Galaxy Tab S9 (Android 15)
- Samsung Galaxy A40 (SM-405FM/DS) (Android 11)
- Samsung Galaxy A5 (Android 7.0)
- Sony Xperia 5 III (Android 13)
- and most of other Android devices which support videos with such resolution playback using system/default video player or ExoPlayer/media3
Same problem in all cases using Video.
Not tested with StageVideo or VideoTexture.
There is no such issues with other platforms.
Also it works fine with non-AIR applications.
Also there is no such issues with the same videos on the same devices using ExoPlayer/media3 https://github.com/androidx/media or other non-AIR video players.
There is no such issues with videos with resolution 1080x1920 or smaller.
Related issues: https://github.com/airsdk/Adobe-Runtime-Support/issues/2402 https://github.com/airsdk/Adobe-Runtime-Support/issues/3115 https://github.com/airsdk/Adobe-Runtime-Support/issues/3864 https://github.com/airsdk/Adobe-Runtime-Support/issues/3907 https://github.com/airsdk/Adobe-Runtime-Support/issues/141 https://github.com/airsdk/Adobe-Runtime-Support/issues/139
Steps to Reproduce
Launch application with code below with any "problem" Samsung device.
Application example with sources, example of video and LogCat log attached. android_samsung_some_videos_bug.zip
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.NetStatusEvent;
import flash.media.Video;
import flash.desktop.NativeApplication;
import flash.desktop.SystemIdleMode;
public class AndroidSamsungSomeVideosBug extends Sprite {
private var nc:NetConnection;
private var ns:NetStream;
private var video:Video = new Video(1280, 960);
public function AndroidSamsungSomeVideosBug() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
addChild(video);
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.connect(null);
}
private function netStatusHandler(event:NetStatusEvent):void {
trace(event.info.code);
switch (event.info.code){
case "NetConnection.Connect.Success":
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ns.client = {onMetaData:getMeta, onPlayStatus:onPlayStatus};
video.attachNetStream(ns);
ns.play("video.mp4");
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found");
break;
default:
break;
}
}
private function getMeta(mdata:Object):void {
trace("avc profile:", mdata["avcprofile"]);
}
//Seek video to begin after complete
private function onPlayStatus(infoObject:Object):void {
trace("onPlayStatus");
ns.seek(0);
}
}
}
Actual Result: No video playback. In traces you will see:
NetConnection.Connect.Success
NetStream.Play.Start
avc profile: 77
NetStream.Buffer.Full
NetStream.Buffer.Flush
NetStream.Play.Failed
NetStream.Play.Stop
Expected Result: Video playback without issues.
Known Workarounds
Write your own native extension for video playback.
The devices that you had success with what Android version where they running? Just wondering if you think this is a hardware related issue or an Android API version issue.
@marchbold, different versions from Android 7.0 to 15. Details updated in description and few other devices also tested. I don't think it's related to Android API version. Also it looks like it's not hardware related issue (cause the same videos works well with non-AIR applications by default video playback capabilities without ffmpeg/VLC and other "custom" video decoders). It looks like some devices firmwares have multiple video decoders and only some of them can playback videos with resolution more than FullHD or something like that. And AIR should check it and use another one or handle some capabilities of them....
Ah I meant just differences in device hardware vs software (api version) is causing the issue, not that it is a bug in the hardware.