Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Some devices doesn't show MP4 (H.264) videos with renderMode=direct but sound playback #93

Open
itlancer opened this issue Aug 29, 2019 · 3 comments

Comments

@itlancer
Copy link

Problem Description

Some Android devices doesn't show MP4 (H.264) videos with renderMode=direct but sound playback.
Tested with several Bluebird CK100 and Bluebird CK100_JDI Android price checkers devices with multiple MP4 (H.264) videos.
It has been tested with many different AIR versions even with latests AIR 32.0.0.144 beta and AIR 33.0.1.228.
The same problem in all such cases.

It works fine with renderMode=auto or renderMode=gpu in application manifest.
Also it works fine with FLV (H.263) videos.
Also it works fine with other Android devices.
In Scout nothing suspicious. All NetStream events and Scout logs the same with different renderModes.
Other video players (not AIR) doesn't have such problems and smoothly playback the same videos on the same devices.

Changing containsVideo in application manifest doesn't help.
NetStream::useHardwareDecoder = true doesn't help.
<disableMediaCodec>true</disableMediaCodec> doesn't help.

Steps to Reproduce

Launch code below with MP4 (H.264) video with Bluebird CK100 or Bluebird CK100_JDI device.
Application example with sources and example of video attached.
video_rendermode_bug.zip

package  {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.NetConnection;
	import flash.net.NetStream;
	import flash.media.Video;
	import flash.events.NetStatusEvent;
	
	public class VideoRenderModeBug extends Sprite {
		private var nc:NetConnection;
		private var ns:NetStream;
		private var video:Video = new Video(640, 480);
		
		public function VideoRenderModeBug() {
			addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			addChild(video);
			
			nc = new NetConnection();
			nc.addEventListener(NetStatusEvent.NET_STATUS, ncHandler);
			nc.connect(null);
		}
		
		private function ncHandler(e:NetStatusEvent):void {
			if (e.info.code == "NetConnection.Connect.Success"){
				ns = new NetStream(nc);
				ns.client = {onMetaData:getMeta};
				ns.addEventListener(NetStatusEvent.NET_STATUS, nsHandler);
				video.attachNetStream(ns);
				ns.play("video.mp4");
			}
		}

		private function nsHandler(e:NetStatusEvent):void {
			trace(e.info.code);
			if (e.info.code == "NetStream.Play.Stop"){
				e.target.removeEventListener(NetStatusEvent.NET_STATUS, nsHandler);
				
				ns = new NetStream(nc);
				ns.client = {onMetaData:getMeta};
				ns.addEventListener(NetStatusEvent.NET_STATUS, nsHandler);
				video.attachNetStream(ns);
				ns.play("video.mp4");
			}
		}

		private function getMeta(mdata:Object):void { }
	}
}

Actual Result:
Black or white rectangle instead of video playback. But you can hear video sound.

Expected Result:
Smooth video playback, video displays.

Devices hardware info:
OS: Android 6.0.1
CPU: Rockchip RK3288 1.8GHz Quad Core
CPU arch: armv7
RAM: 2 GB
ROM: 8 GB
Display: 1920*1200 with Capacitive 10 point touch screen
GPU: Mali-T760

Known Workarounds

none

  • Use renderMode=auto or renderMode=gpu but it's not acceptable for most of applications.
@itlancer
Copy link
Author

I found that if you enable in Android Developer options -> Force 4x MSAA then video will play correctly. But this option cause some other DisplayList rendering issues and artifacts in AIR applications.

@itlancer
Copy link
Author

The same problem with another industrial Android device with armv7 and armv8 builds.
Devices hardware info:
OS: Android TV 8.0.0
CPU: MStar M7221 Quad Core
CPU arch: arm64-v8a (aarch64)
RAM: 1.5 GB
ROM: 4.5 GB
Display: 3840*600
GPU: Mali-G51, OpenGL ES GLSL ES3.20

Tested with latest AIR SDK 33.0.2.246

@itlancer
Copy link
Author

Issue still exists with latest AIR 33.1.1.190.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant