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

Doesn't play videos with resolution more than 4K #89

Closed
itlancer opened this issue Aug 25, 2019 · 4 comments
Closed

Doesn't play videos with resolution more than 4K #89

itlancer opened this issue Aug 25, 2019 · 4 comments

Comments

@itlancer
Copy link

Problem Description

AIR doesn't play videos with resolution by any side more than 4096 pixels.
Tested with multiple devices across many OSes: Windows 8.1/10, macOS 10.14.3, Android, iOS 11/12.
It has been tested with multiple AIR SDK versions to latests AIR 32.0.0.144 beta and AIR 33.0.1.228. Tried with simple Video object, StageVideo and VideoTexture.
Same problem in all cases with any H.264 (MP4) videos with resolution more than 4K.
Google Chrome and many others video players correct playback these videos on the same devices.
Changing renderMode doesn't help.
NetStream::useHardwareDecoder = true doesn't help.

Steps to Reproduce

Launch code below with any MP4 H.264 video with resolution by any some more than 4096. Application example with sources and example of video attached.
video_5k_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 Video5KBug extends Sprite {
		private var nc:NetConnection;
		private var ns:NetStream;
		private var video:Video = new Video(640, 480);
		
		public function Video5KBug() {
			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"){
				ns.play("video.mp4");
			}
		}

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

Actual Result:
Green or white rectangle instead of video.

Expected Result:
Correct video playback.

Known Workarounds

none

@itlancer
Copy link
Author

itlancer commented Oct 3, 2020

With latests AIR 33.1 version with this sample video just show first frame and nothing more.
When trying to test the same with video without audio it display only white color instead of video. Seems to be related #80
Checked with latest AIR 33.1.1.259.

@itlancer
Copy link
Author

itlancer commented Oct 4, 2020

The same behavior described above you can see using StageVideo.
Using Stage3D VideoTexture to playback such videos cause NetStream event
NetStream.Play.Failed
and you cannot playback big videos at all.
Seems to be related: #196

@itlancer
Copy link
Author

itlancer commented Oct 9, 2020

Different tests with latest AIR 33.1.1.259 with MP4 H.264 videos without audio (cause it doesn't work by #80).

Windows:
Using Video - display only white color instead of video.
Using StageVideo - display only white color instead of video.
Using Stage3D VideoTexture - NetStream.Play.Failed event.
Standart system video player plays 5120 * 2160 video correctly. 11520 * 4320 video can be played correctly via ffplay.

macOS:
Using Video, StageVideo or Stage3D VideoTexture (same results)
5120 * 2160 video seems to play x2 faster than it should.
11520 * 4320 video plays with unacceptable strange lags.
Standart system video player plays both videos correctly.

Android:
Using Video, StageVideo or Stage3D VideoTexture (same results) cause NetStream.Play.Failed event.
Standart system video player cannot play these videos correctly but VLC for Android plays 5120 * 2160 video correctly (not 11520 * 4320).

Video file samples attached:
5120 * 2160 5K.zip
and 11520 * 4320 11K.zip

@itlancer
Copy link
Author

With latest AIR 33.1.1.929 and 50.0.0.1 videos with resolution more than 4K could be played. So I will close this issue.
But there are a lot of other issues still exists around high-resolution videos playback:
#2163
#2162
#2159
#646
#196
#524
#85

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