0 Replies Latest reply on Jul 1, 2015 1:25 AM by altanai

    Invalid video codec for iPhone/iPod: SPARK in Wowza CupertinoPacketHandler


      Hello Adobe Flex Team ,


      I have to stream video + audio from my flex mobile app to wowza media server on HTTP live stream which I further need to pass to AWS cloudfront Edge.

      The setup works fine for Manifest.f4m format and plays across Chrome and Firefox browser on flash  , however I am facing problems in HLS .


      My flex app is supposed h264  but I see Spark codec in error logs as follows :


      "CupertinoPacketHandler.handleHolder[test/_definst_/xyzstream]: Invalid video codec for iPhone/iPod: SPARK"



      Following is my code on flex app,


        import flash.display.Sprite;

        import flash.display.Stage;

        import flash.display.StageAlign;

        import flash.display.StageScaleMode;

        import flash.events.MouseEvent;

        import flash.events.NetStatusEvent;

        import flash.media.Camera;

        import flash.media.CameraUI;

        import flash.media.H264Level;

        import flash.media.H264Profile;

        import flash.media.H264VideoStreamSettings;

        import flash.media.Video;

        import flash.net.NetConnection;

        import flash.net.NetStream;

        import flash.text.TextField;

        import flash.text.TextFormat;



        public class Publisher extends Sprite



        private var metaText:TextField = new TextField();

        private var vid_outDescription:TextField = new TextField();

        private var vid_inDescription:TextField = new TextField();

        private var metaTextTitle:TextField = new TextField();


        private var nc:NetConnection;

        private var ns_out:NetStream;

        private var cam:Camera = Camera.getCamera();

        private var vid_out:Video;


        public function Publisher()





        private function initConnection():void


        nc = new NetConnection();

        nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);



        vid_out = new Video();




        protected function onNetStatus(event:NetStatusEvent):void




        if(event.info.code == "NetConnection.Connect.Success")










        protected function publishCamera():void



        ns_out = new NetStream(nc);


        var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();


        //h264Settings.setProfileLevel( H264Profile.BASELINE, H264Level.LEVEL_3_1 )

        h264Settings.setProfileLevel( H264Profile.BASELINE, H264Level.LEVEL_2 );


        cam.setQuality( 90000, 90 );

        cam.setMode( 320, 240, 30, true );

        cam.setKeyFrameInterval( 15 );




        ns_out.videoStreamSettings = h264Settings;

        ns_out.publish( "xyzstream" , "live");


        var metaData:Object = new Object();

        metaData.codec = ns_out.videoStreamSettings.codec;

        metaData.profile =  h264Settings.profile;

        metaData.level = h264Settings.level;

        metaData.fps = cam.fps;

        metaData.bandwith = cam.bandwidth;

        metaData.height = cam.height;

        metaData.width = cam.width;

        metaData.keyFrameInterval = cam.keyFrameInterval;


        ns_out.send( "@setDataFrame", "onMetaData", metaData);




      Please suggest any changes , extra code or settings I may have to implement in order to get it working .


      Awaiting a speedy resolution . Thanks .