Cant play live stream from hls-live recorded using livepkgr.


i new fms have been doing lot of reading recently, still cant crack problem though.

 

i use swf take users webcam input , publish fms 4.5. publish using below code:

 

package

{

          import flash.display.sprite;

          import flash.events.netstatusevent;

          import flash.net.netconnection;

          import flash.net.netstream;

          import flash.media.camera;

          import flash.media.microphone;

          import flash.media.video;

          import flash.media.h264level;

          import flash.media.h264profile;

          import flash.media.h264videostreamsettings;

 

          public class modelv2 extends sprite

          {

                    private var nc:netconnection;

                    private var good:boolean;

                    private var rtmpnow:string;

                    private var nsin:netstream;

                    private var nsout:netstream;

                    private var cam:camera;

                    private var mic:microphone;

                    private var vidlocal:video;

                    private var vidstream:video;

 

                    public function modelv2()

                    {

                              rtmpnow = "rtmp://<myserver>/livepkgr/";

                              nc=new netconnection();

                              nc.connect(rtmpnow);

                              nc.addeventlistener(netstatusevent.net_status,checkcon);

                              setcam();

                              setmic();

                              setvideo();

                    }

 

                    private function checkcon(e:netstatusevent):void

                    {

                              good = e.info.code == "netconnection.connect.success";

                              if (good)

                              {

                                        nsout = new netstream(nc);

                                        nsout.attachaudio(mic);

                                        nsout.attachcamera(cam);

                                        var h264settings:h264videostreamsettings = new h264videostreamsettings();

                                        h264settings.setprofilelevel(h264profile.baseline, h264level.level_3_1);

                                        nsout.videostreamsettings = h264settings;

                                        nsout.publish("sonia?adbe-live-event=nll");

                              }

                    }

 

                    private function setcam()

                    {

                              cam = camera.getcamera();

                              cam.setkeyframeinterval(9);

                              cam.setquality(90000, 90);

                              cam.setmode(640, 480, 30, true);

                    }

 

                    private function setmic()

                    {

                              mic = microphone.getmicrophone();

                              mic.gain = 85;

                              mic.rate = 11;

                              mic.setsilencelevel(15,2000);

                    }

 

                    private function setvideo()

                    {

                              vidlocal = new video(cam.width,cam.height);

                              addchild(vidlocal);

                              vidlocal.x = 0;

                              vidlocal.y = 0;

                              vidlocal.attachcamera(cam);

                    }

          }

}

 

from understand supposed automatically create f4f file inside streams>_definst_>event folder , create .f4m & .m3u8 files on fly when requested, can see it's doing this. see stream being created while i'm publishing it.

 

i want display video using js video control / html5 video element depending upon browser serving it. have successfuly managed stream play using url http://<myserver>:8134/hds-live/livepkgr/_definst_/nll/sonia.f4m in flowplayer great. when come try loading stream in html5 video element have problem... wont load. url use http://<myserver>:8134/hls-live/livepkgr/_definst_/nll/sonia.m3u8. can view source of video element , when click on link video src inside browser downloads .m3u8 file, have looked inside file , expect playlist of .ts files. content of .m3u8 file below...

 

#extm3u

#ext-x-media-sequence:138

#ext-x-allow-cache:no

#ext-x-version:2

#ext-x-targetduration:8

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum138.ts

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum139.ts

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum140.ts

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum141.ts

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum142.ts

#extinf:8,

../../../../hls-live/streams/livepkgr/events/_definst_/nll/sonianum143.ts

 

i stuck wthis , strugling in attempts fixed. @ first thought may apache not setup (which why point directly @ 8134 port without using proxying) thinking either codecs i'm using publish stream or .ts files not .m3u8 file says are??

 

any on fantastic. away weekend on monday follow if can shed light @ all.

 

many thanks.

 

mike.

hi mike,

 

flash player publish supports speex , nelly moser audio, both of not supported on ios devices. problem playback.

 

thanks,

apurva



More discussions in Adobe Media Server


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support