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

[Windows][macOS] 8K video playback low performance #2162

Open
itlancer opened this issue Sep 21, 2022 · 1 comment
Open

[Windows][macOS] 8K video playback low performance #2162

itlancer opened this issue Sep 21, 2022 · 1 comment

Comments

@itlancer
Copy link

Problem Description

8K video playback extremely laggy with low performance with Windows/macOS devices.

It has been tested with multiple AIR versions, even with latest AIR 50.0.0.1 with multiple Windows/macOS devices with different AIR applications with different videos. Tried with with Video, StageVideo and VideoTexture.
Same problem in all cases with all devices (even high-end).
Some devices:

  • Windows 10 Pro 64-bit, AMD Ryzen 5 3600 6-Core Processor (12 CPUs), ~3.6GHz, 32 GB RAM, AMD Radeon RX 580
  • Windows 10 64-bit, Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (8 cores), 64 GB RAM, AMD Radeon Pro 5500M
  • macOS Big Sur 11.6.8, Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (8 cores), 64 GB RAM, AMD Radeon Pro 5500M
  • macOS Big Sur 11.6, Apple M1, 8 GB RAM

The same videos with different (non-AIR) video players or applications playback without lags. Even with system default video players.

Adding

<windows>
	<maxD3D>9</maxD3D>
</windows>

to application manifest didn't help.

With Linux video playback doesn't work at all: #1984

Related issues (not the same):
#2159
#646
#196
#85

Steps to Reproduce

Launch code below. It start video playback in a loop.
Note: tested with 64-bit version.
Application example with sources and example of video attached.
video_8k_performance.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 Video8KPerformance extends Sprite {
		private var nc:NetConnection;
		private var ns:NetStream;
		private var video:Video = new Video(640, 480);
		
		public function Video8KPerformance() {
			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("8K.mp4");
			}
		}

		private function nsHandler(e:NetStatusEvent):void {
			trace(e.info.code);
			if (e.info.code == "NetStream.Play.Stop"){
				ns.play("8K.mp4");
			}
		}

		private function getMeta(mdata:Object):void {
			trace("meta", mdata.width);
			trace("height", mdata.height);
			trace("avcprofile", mdata.avcprofile);
			trace("videocodecid", mdata.videocodecid);
		}
	}
}

Actual Result:
Video playback extremely laggy with low performance.

Expected Result:
Video playback without performance issues.

Known Workarounds

none
*write your own native extension to playback video

@itlancer
Copy link
Author

@ajwfrost
Just for info. Such MP4 H.264 files (7560*3840 resolution or bigger) doesn't play at all using new multimedia APIs (FileSource and Pipeline): #2503 (comment)
Tested with AIR 51.0.0.2 using 64-bit builds and Windows 10 x64.

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

No branches or pull requests

2 participants