Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
MP4 H.264 videos with High 10 Profile (Hi10P, 110) or High 4:4:4 Predictive Profile (Hi444PP, 244) doesn't play properly
Problem Description
MP4 H.264 videos with High 10 Profile (Hi10P, 110) or High 4:4:4 Predictive Profile (Hi444PP, 244) doesn't play properly (or doesn't at all) with AIR.
https://en.wikipedia.org/wiki/Advanced_Video_Coding#Profiles
Tested with multiple devices across many OSes and its versions and firmwares: Windows, macOS, Android, iOS.
It has been tested with multiple AIR SDK versions to latests AIR 32.0.0.144 beta and AIR 33.0.2.288. Tried with simple Video
object, StageVideo
and VideoTexture
.
Same problem in all cases with any H.264 (MP4) videos with specified profiles. May be same problems exists with other High profiles too.
Many others video players and some browsers correct playback these videos on the same devices.
Changing renderMode
doesn't help.
NetStream::useHardwareDecoder = true
doesn't help.
Changing disableMediaCodec
doesn't help - with Android it cause black screen instead of video with audio wheezing at start.
Changing hardwareAccelerated
in Android application manifest doesn't help.
Changing containsVideo
in application manifest doesn't help.
Related issues (not the same): https://github.com/Gamua/Adobe-Runtime-Support/issues/89 https://github.com/Gamua/Adobe-Runtime-Support/issues/80 https://github.com/Gamua/Adobe-Runtime-Support/issues/88
Steps to Reproduce
Launch code below with any MP4 H.264 video with High 10 Profile (Hi10P, 110) or High 4:4:4 Predictive Profile (Hi444PP, 244). Application example with sources and example of video with High 10 Profile (Hi10P, 110) attached. video_high_profile_bug.zip
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.StageVideo;
import flash.geom.Rectangle;
import flash.events.NetStatusEvent;
import flash.media.Video;
public class VideoHighProfileBug extends Sprite {
private var nc:NetConnection;
private var ns:NetStream;
public function VideoHighProfileBug() {
addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
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};
var sv:StageVideo = stage.stageVideos[0];
sv.viewPort = new Rectangle(0, 0, 1280, 800);
sv.attachNetStream(ns);
ns.play("high10Profile.mp4");
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found");
break;
}
}
private function getMeta(mdata:Object):void {
trace("avc profile:", mdata["avcprofile"]);//Trace MP4 H.264 video AVC profile
//MP4 H.264 videos with High 10 Profile (Hi10P, 110) or High 4:4:4 Predictive Profile (Hi444PP, 244) doesn't play correctly
if (mdata["avcprofile"] == 110 || mdata["avcprofile"] == 244) trace("!!! incorrect video playback !!!");
}
//Seek video to begin after complete
private function onPlayStatus(infoObject:Object):void {
ns.seek(0);
}
}
}
Actual Result: Video doesn't play at all or play as white/black screen or play in green colors. Android: AIR 32.0.0.89 - video playback failed AIR 32.0.0.144 - video playback failed AIR 33.0.2.288 - video playback failed
Windows: AIR 32.0.0.89 and earlier - video playback in green colors AIR 32.0.0.109 - video playback failed https://github.com/Gamua/Adobe-Runtime-Support/issues/80 AIR 32.0.0.144 - no video playback (white screen) https://github.com/Gamua/Adobe-Runtime-Support/issues/80 AIR 33.0.2.288 - no video playback (white screen) https://github.com/Gamua/Adobe-Runtime-Support/issues/80
iOS: AIR 32.0.0.89 - video playback failed AIR 32.0.0.144 - video playback failed AIR 33.0.2.288 - video playback failed
macOS: AIR 30.0.0.107 - video playback in green colors AIR 32.0.0.129 - no video playback (white screen) AIR 33.0.2.288 - no video playback (white screen)
Expected Result: Correct video playback.
Known Workarounds
none