NetStream publish and play synchronize buffers

NetStream publish and play synchronize buffers

I haven't tried to run your code, but something obvious is
the server-side code. It doesn't do anything.
When you publish a stream, you need to tell other client to
connect to it... manually. There are three thing to account for. A
client connecting needs to subscribe to all existing streams. A
client connecting needs to inform all existings clients that it has
published its stream and give them the stream name so they can
subscribe. The client needs to receive stream names of any new
(future) connecting clients so it can subscribe to their stream.
First you need to publish your stream... lets say this is
client A and publishes a stream named stream_A.
1. Then you need to send the stream name (stream_A) to all
other existing clients, so they can subscribe to it.
2. Then you need to receive the names of existing clients
streams, so the client can subscribe to them.
The logic in step 1, will handle any new clients connecting
in the future.
If anyone sees any errors in this or has a better method..
please feel free to add to it....

Similar Messages

  • Using variable name for Netstream Publish() (actionscript)

    Relatively new to Actionscript.  In the netstream publish() or play() methods, can I pass variable names to the methods instead of hard-coding the stream name?
    Example:
    private function publishLiveStream():void
                ns = new NetStream(nc);
                ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                ns.client = this;
              // blah blah other stuff...
               ns.publish("thefilename", "record");
    I want to replace "thefilename" with a value passed from an input box or use dynamic naming (i.e. current date & time).

    you can use in procedure using sunopisis technology
    OdiExportMaster "-TODIR=/temp/" "-ZIPFILE_NAME=export.zip" "-XML_CHARSET=ISO-8859-1" "-JAVA_CHARSET=ISO8859_1" "-EXPORT_VERSIONS=YES"
    or you can use (unix System)
    OdiExportMaster "-TODIR=/#v_FileName" "-ZIPFILE_NAME=export.zip" "-XML_CHARSET=ISO-8859-1" "-JAVA_CHARSET=ISO8859_1" "-EXPORT_VERSIONS=YES"
    Hope it will work
    Thanks

  • Netstream publish problem

    Hi,
    I am facing a problem to publish and play a live stream from
    FMS3. I am using flex3 (Action script 3 and FMS 3).
    I have coded a demo application with server side script. You
    can download this application and server side from this URL:
    Demo app:
    http://bang-dev.isprime.com/idma-test/FlashAngels/Amitabh/FMS_Issue/TestAppFMS.zip
    Server side:
    http://bang-dev.isprime.com/idma-test/FlashAngels/Amitabh/FMS_Issue/FMSTest.asc
    Please find the issue and let me know, how to fix it.
    To change the FMS server string: Go to Src >> Classes
    >> InitApp.as >> line no 38 and replace your string.
    Add a name at left side text field to publish the video.
    Add a name at right side text field to play the video.
    For the server side, just create a folder inside application
    folder of FMS with name of “FMSTest” and put the server
    side “FMSTest.asc “file there.
    Let me know incase you face any issue while deploying it.
    Thanks

    The Clinet side code is a zip file, The code is really
    simple, and there is only two files, one mxml ( you don't need to
    see this, just needed to run the project.), and one class file
    (InitApp.as).
    You can easily find, code related to play, publish or
    connect.
    and Server side file is just text file, with just
    acceptConnection method and few events with trace. Nothing else.
    You can try on your local FMS 3.
    Is there no one skilled, who can help me.
    Let me know incase I could help you to make it easier and to
    avoid confusions.

  • I have an ipad 2 and it constantly buffers on I players such as itv and 4od. I have an iPhone 5 and on the same wifi it's perfectly fine yet my ipad won't play. Any ideas??

    I have an ipad 2 and it constantly buffers on I players such as itv and 4od. I have an iPhone 5 and on the same wifi it's perfectly fine yet my ipad won't play. Any ideas??

    Hi,
    Have you tried a reset?
    This solves a lot of these problems, and I'm not sure if this will work in your case, but give it a try. You hold down the sleep and home buttons at the same time. A slider will appear. Ignore it and keep holding both buttons down. After about 15 seconds the Apple logo will appear. See if that helps.
    You will not lose anything on your ipad when you do a reset. (A restore is a whole other issue!)
    The following link addresses your issue and offers some other possible solutions.
    http://everydaylife.globalpost.com/fix-slow-streaming-ipad-27814.html
    Hope this helps.

  • How to publish AIR app on iTune Store and Play Store?

    Hi Friends,
    My Flash AIR app is almost completed but I don't have idea for publish.
    I heart play store is easy to publish and for iOS is very difficult.
    so please give me reply ASAP.
    thank you

    Contact Apple via their web page for iTunes Marketing. You'll probably want to read their FAQ first.
    They’ve reportedly been swamped with requests, so don’t be surprised if you don’t hear back from them soon or indeed ever. If you don't hear from them, you might want to consider signing up with an indie label or marketing service that already has a relationship. In another post, an Apple employee said that there are 600 already, including PurePlay Music - Apple signed a deal with them back in September, CD Baby and IODA. A new service that seems promising if true is TuneCore. There may be similar services that are specific to Germany.
    Good luck.

  • What is Best Practice for Publishing and Subscribing to Multicast Video P2P

    Please, could someone help with an issue I am having in developing a peer to peer video chatting application?  My application uses  multicast to publish and subscribe to video streams of NetGroup members.  I'm listening for the  NetGroup.Neighbor.Connect event, and I'm calling the following function: 
    protected function onPeerConnect(event:NetStatusEvent):void{
                    var peerID:String = event.info.peerID;
                    // create user vo here
                    // user Value Object for incoming stream
                    userVO = new User();
                    userVO.peerID = peerID;
                    netGroup.addNeighbor(peerID);
                    receiveStream(userVO);
    protected function receiveStream(userVO:User):void{
                    // init netstream
                    var stream:NetStream = new NetStream(nc,groupspec.groupspecWithAuthorizations());
                    stream.receiveVideo(true);
                    stream.addEventListener(NetStatusEvent.NET_STATUS,netStatus);
                    // init panel
                    // alter to use custom component instead
                    var panel:Panel = new Panel();
                    panel.id = "panel" + panel_seq;
                    panel.title = "Panel" + panel_seq;
                    panel.width=322;
                    panel.height=281;
                    panel.x = 50 * panel_seq + 200;
                    panel.y = 25 * panel_seq + 200;
                    var cpanelContent:Array = new Array();
                    panel.controlBarContent=cpanelContent;
                    panel.controlBarVisible=true;
                    // init video
                    var video:Video = new Video();
                    video.width=320;
                    video.height=240;
                    video.attachNetStream(stream);
                    stream.play("media");
                    // init videoWrapper
                    var videoWrapper:UIComponent = new UIComponent();
                    videoWrapper.id = "wrapper" + panel_seq;
                    videoWrapper.addChild(video);
                    // add to display list
                    addElement(panel);
                    panel.addElement(videoWrapper);
                    // drag and drop panel
                    panel.addEventListener(MouseEvent.MOUSE_DOWN,function(event:MouseEvent):void{
                        panel.startDrag();
                        addElement(panel);
                    panel.addEventListener(MouseEvent.MOUSE_UP,function(event:MouseEvent):void{
                        panel.stopDrag();
                    panel_seq++;// used for unique panel id
                    userVO.panel = panel;// reference to the panel
                    userVO.stream = stream;
                    userVO.video = video;
                    peers.addItem(userVO);
    I am confused on this:
    var stream:NetStream = new NetStream(nc,groupspec.groupspecWithAuthorizations());
    What  should I pass as the second parameter to establish an incoming  NetStream with the publishing peer?  I've seen people put in the farID  but I haven't figured out how to access it.  What is the difference  between event.info.peerID and event.info.neighbor?  And since I'm  multicasting to the group do I need to pass in the groupspec or the  farID?  I would love some clarification on this.
    What is happening is this:
    When  I join the group, and there are two members in the group already, I'll  get three panels with videos.  However, duplicate video streams are  being attached.  When I inspect the peerStreams array I'm seeing a  length of 0, so does that mean that no one is subscribing to my  published netstream?  If so, how do I specifically subscribe to each  published stream in the group?  Sometimes if I step through in debug  mode, I get three separate camera feeds in their prospective panels, but  if I run it will have duplicates.  I thought at first that this was a  referencing error because all of the NetGroup.Neighbor.Connect events  where happening all at the same time and perhaps that is the reason for  the duplicates?
    My only other thought is that maybe I'm  multicasting one guys stream to the whole group, but I'm getting varying  results so I want to know what is the correct way to grab, in sequence,  a NetGroup members' published netstream and be sure that all other  members are subscribing to my NetStream as well?
    Also, I  am using Value Objects to keep track of who my group members are, is  that data shared with the group or is it not accessible to all members?   or should I use another method of keeping track of my group members?
    Please help!  Thank you in advance!

    it appears you posted an identical message in two threads.  i've responded in the other thread:
      http://forums.adobe.com/message/3701380#3701380

  • Publishing and receiving a webcam broadcast

    I have Flash Media Server 2 installed, and would like to
    write an application whereby two people can chat one on one.
    Now, I don't want to use simpleconnect, as I'd like to
    integrate this into an existing website with it's own
    authentication methods.
    I've been attempting to get it working, but although I can
    get the local webcam displaying fine, and can even tweak the
    quality etc., I can't for the life of me get it published remotely.
    If anyone has any pointers, that'd be great.
    So far with regard to the video publishing part of it, I've
    come up with:
    quote:
    localCam = Camera.get();
    localVideo.attachVideo(localCam);
    sConn = new NetConnection();
    sConn.connect("rtmp://localhost/1", "test");
    lStream = new NetStream(rConn);
    lStream.publish(localCam);
    Also, am I right in thinking that to retrieve a webcam stream
    from the rtmp source, I would have to use
    http://host/appinstance/clientid
    Or would this not be the way?

    Have you checked out the samples on devnet? You should find
    everything you need there.
    Why are you using rConn instead of sConn to establish your
    netstream?
    sConn = new NetConnection();
    sConn.connect("rtmp://localhost/1", "test");
    lStream = new NetStream(
    rConn);
    I think this was just a typo.
    When you publish, give it a name:
    Instead of using: lStream.publish(localCam);
    do lStream.publish(username); // where username is a string
    Check out the flashmediaserver_cs_asd.pdf, page 102.
    Also, currently you don't care whether or not the connection
    has been established. Make sure you wait before you create your
    Netstream on top of the connection. There is a great article on how
    to build such an application on Adobe Devnet:
    http://www.adobe.com/devnet/flashcom/articles/broadcast_receiver.html
    To build a 2-way chat you would also have to put both users
    in the same "room". The easiest way to achieve this is to create
    new application instances for each new user pair, then connect to
    with rtmp://host/application/new_instance _name and play the video
    of the other user.
    There's some information in article
    http://www.adobe.com/devnet/central/articles/vchat_04.html
    This article is about how to build a 2-way video chat w/
    central, but you can possibly strip out that code.
    Instead, I recommend having a look at the docs, i.e.
    flashmediaserver_cs_asd.pdf to be found in your documentation
    directory.

  • Error message when publishing and problems opening output file

    I have 5 projects linked together. When I publish one, I get a message that the files listed below are linked to the open project, and one or more of these projects may require exporting. I have tried to open these files and choose File | Export | Project to | but the options in the list (Flash 8 and Flash CS3) are both grayed out--on every one of these files. I'm publishing to Flash 9.
    I didn't think much about this message until a few reviewers said they can't open the project, or when they do, they don't see my playbar on the skin.
    One more thing--when an IT person was trying to help one reviewer open the output file, the IT person said "Oh, there's a problem with the code in line 25." I guess that's the html code? I'm not a programmer, but I can look at html code. What should I be seeing there in line 25?
    Is their problem opening the output file(s) related to my message about possibly needing to export files? Why might they be having problems getting the output file to open?
    Thanks for any insights you can provide!
    SAM

    Hi Sam
    It depends on a number of things. Are you certain you uploaded all the files involved? If not, there will be problems.
    The message about the linked files is quite simply advising you that you have links from that particular movie that will expect to find the files being linked to.
    If a person isn't seeing playback controls and you have included them, it's likely you haven't provided the correct link for them to open and play the file. Typically you provide a link to the HTML page Captivate creates. As long as all the output files are in the same place on the server, you should be good to go.
    Cheers... Rick
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Can't save or publish and other issues

    Aaaahhh.... I need help. I love iweb because of how easily you can just fill in the blanks and drag and drop things, but it is constantly going crazy on me.
    Here is my latest issue:
    1. When I try to save I get this message "Save Failed Too many open files in system" - What system? What files?
    2. Why are the "Publish" and "Visit" buttons greyed out now?
    3. Why can I see the "Comment" option when I am constructing my blog but not when others are viewing it and would leave a comment.- This was working fine before. Here's my blog if it helps: http://web.mac.com/ashleybrockinton/iWeb/ashleybrockintonblog/Blog/Blog.html

    Do you have .Mac set to synchronize mailboxes? I don't know whether this could be part of the problem but if you use .Mac it's worth checking.
    Do you keep mail messages on the server? This could be another reason. When you create a new account it might be downloading all old mail. I have my advanced settings to retain mail for only 1 week, then delete it from the server. I keep messages on my computer for preference.
    I've just checked in Mail Help and for IMAP accounts the mail is kept on the server even though an account is deleted. For POP accounts it can be kept on the server too unless you have specified for it to be removed after a certain time.
    Connection Doctor seems to remember all previous accounts that have been used but should indicate that deleted accounts can't be connected. I don't know which file contains this information but it will probably be in the user Library somewhere.
    Neville

  • Using Premier Elements - no sound in video after "Share & Publish" and exporting to my computer

    I'm using Premiere Elements 13 on a PC (bought the disc and it's installed and registered.)  I created a music video using many video clips and 3 different audio tracks.  All audio was unlinked from the video.  Some of the audio is from video AVIMovie and some is MP3 format.  It plays just fine while I am editing it and after I save and then open to continue editing.  I used the Publish and Share to export it to my computer.  After it finished I tried playing it - in Windows Media Player - and there is no audio.  What am I doing wrong?

    I assume you already did this? https://wiki.archlinux.org/index.php/Pu … #GStreamer

  • Swf does not publish properly, plays fine in preview browser.

    I have scoured the internet looking for a solution, and I work with a team of professional Flash developers... Nobody can figure this out.
    I have a SWF I've been trying to publish to the web. It's inside an AP div tag. The swf plays fine in Preview mode. When I publish, however, the swf does not play in Safari at all, and will only play in Firefox upon hitting "refresh." After this, the swf will load and play just fine, UNLESS YOU CLEAR YOUR HISTORY, at which point the same problem appears: you see nothing but a black, blank box.
    "Yeah, I've heard that before, it's probably your javascript, blah blah blah..." Well, wait, just wait. The swf DOES load in both browsers. It just doesn't play. In order to get it to play, you have to right-click and select Play. I cannot, for the life of me, get it to just go ahead and play automatically when publishing.
    But the REAL riddle of all this is that the swfs USED to play just fine until a few days ago. I've done nothing different in my publishing. I have rebuilt the page from scratch to no avail. And I haven't found anything on the internet that addresses this question directly. I've had a couple of developers try and mess with the code for me, and THEY can't get it to work, either. I am pretty much begging for any possible help on this, so thanks in advance.
    I am a design-oriented user; I understand code only conceptually. If a code solution is the only solution, please be specific with where and how to implement the advice.
    The actual page in question is here:
    http://www.thecolodinproject.com/Media/Trailers/Trailer%2002_Lure/Trailer_Volume_02_Lure.h tml
    I will be checking back at this page often to look for replies; I hope someone can help. Thanks.

    Nope... As I said, the swf USED to run just fine, and still does in certain browsers. I haven't messed with the SWF at all since that time, so there isn't any logical reason it should be different now.

  • Problem with connection ( NetStream.Publish.BadName)

    Fri Sep 11 2009 08:52:10 : Session Started
    Fri Sep 11 2009 08:52:11 : Audio Encoding Started
    Fri Sep 11 2009 08:52:11 : Video Encoding Started
    Fri Sep 11 2009 09:13:59 : Primary - Network Status: NetConnection.Connect.Closed status
    Fri Sep 11 2009 09:14:04 : Primary - Disconnected
    Fri Sep 11 2009 09:14:04 : Primary - Re-establishing connection, attempt 1
    Fri Sep 11 2009 09:14:05 : Primary - Reconnected to FMS/3,0,1,123
    Fri Sep 11 2009 09:14:05 : Primary - Network Command: onBWDone
    Fri Sep 11 2009 09:14:05 : Primary - Stream[onetv] Status: Success
    Fri Sep 11 2009 09:14:05 : Primary - Network Command: onFCPublish
    Fri Sep 11 2009 09:14:07 : Primary - Stream[onetv] Status: NetStream.Publish.Start
    Fri Sep 11 2009 09:14:58 : Primary - Network Status: NetConnection.Connect.Closed status
    Fri Sep 11 2009 09:15:04 : Primary - Disconnected
    Fri Sep 11 2009 09:15:05 : Primary - Re-establishing connection, attempt 1
    Fri Sep 11 2009 09:15:05 : Primary - Reconnected to FMS/3,0,1,123
    Fri Sep 11 2009 09:15:05 : Primary - Stream[onetv] Status: Success
    Fri Sep 11 2009 09:15:05 : Primary - Network Command: onFCPublish
    Fri Sep 11 2009 09:15:07 : Primary - Stream[onetv] Status: NetStream.Publish.BadName
    Fri Sep 11 2009 09:27:20 : Audio Encoding Stopped
    Fri Sep 11 2009 09:27:20 : Video Encoding Stopped
    Fri Sep 11 2009 09:27:20 : Session Stopped
    Fri Sep 11 2009 09:27:23 : Primary - Network Status: NetConnection.Connect.Closed status
    Fri Sep 11 2009 09:27:23 : Primary - Disconnected
    Fri Sep 11 2009 09:27:24 : Primary - Connected to FMS/3,0,1,123
    Fri Sep 11 2009 09:27:24 : Primary - Network Command: onBWDone
    Fri Sep 11 2009 09:27:28 : Primary - Network Command: onFCPublish
    Fri Sep 11 2009 09:27:28 : Primary - Stream[onetv] Status: Success
    Fri Sep 11 2009 09:27:28 : Primary - Stream[onetv] Status: NetStream.Publish.Start
    Fri Sep 11 2009 09:27:28 : Session Started
    Fri Sep 11 2009 09:27:29 : Video Encoding Started
    Fri Sep 11 2009 09:27:29 : Audio Encoding Started
    Fri Sep 11 2009 12:23:03 : Primary - Network Status: NetConnection.Connect.Closed status
    Fri Sep 11 2009 12:23:09 : Primary - Disconnected
    Fri Sep 11 2009 12:23:09 : Primary - Re-establishing connection, attempt 1
    Fri Sep 11 2009 12:23:09 : Primary - Reconnected to FMS/3,0,1,123
    Fri Sep 11 2009 12:23:09 : Primary - Stream[onetv] Status: Success
    Fri Sep 11 2009 12:23:09 : Primary - Network Command: onFCPublish
    Fri Sep 11 2009 12:23:11 : Primary - Stream[onetv] Status: NetStream.Publish.BadName
    Fri Sep 11 2009 12:26:26 : Audio Encoding Stopped
    Fri Sep 11 2009 12:26:26 : Video Encoding Stopped
    Fri Sep 11 2009 12:26:26 : Session Stopped
    Fri Sep 11 2009 12:26:32 : Primary - Network Status: NetConnection.Connect.Closed status
    Fri Sep 11 2009 12:26:32 : Primary - Disconnected
    Fri Sep 11 2009 12:26:37 : Primary - Connected to FMS/3,0,1,123
    Fri Sep 11 2009 12:26:49 : Primary - Network Command: onFCPublish
    Fri Sep 11 2009 12:26:49 : Primary - Stream[onetv] Status: Success
    Fri Sep 11 2009 12:26:49 : Primary - Stream[onetv] Status: NetStream.Publish.Start
    Fri Sep 11 2009 12:26:49 : Session Started
    Fri Sep 11 2009 12:26:50 : Audio Encoding Started
    Fri Sep 11 2009 12:26:50 : Video Encoding Started
    Hy, this is from my log.
    I connect the flash media encoder to flash media server, and after a short time it disconnect from server and try to reconect automatically, that is good, but IT DON'T CONNECT!!!
    Stream[onetv] Status: NetStream.Publish.BadName
    Fri Sep 11 2009 12:26:26 : Audio Encoding Stopped
    Fri Sep 11 2009 12:26:26 : Video Encoding Stopped
    Fri Sep 11 2009 12:26:26 : Session Stopped
    Where is the problem??? What i can do to resolve this problem?????
    I'm waiting for your answers!
    Thanks

    The NetStream.Publish.BadName status means an attempt was made to publish to a stream that is already being published by someone else. Is another client using the same stream name?
    About the connections being closed, there a lots of conditions that could cause the connection to be lost. It may not be an FMS or FMLE error, it could be poor conditions on the local network, or between the local network and the server.

  • Is it possible to record and play at same time in swift, is there a option to record without storing the file

    I am making a microphone, is it possible to record and play at same time in swift, is there a option to record without storing the file

    Its pretty simple with FMS. You just need to do following things:
    Publish using FMLE with following settings: (just telling which are needed , rest you configure based on your needs)
    Video codec: H.264
    Audio Codec: <of your choice>
    Server ip: rtmp://<server-uri>/<app-name>
    Stream Name: mp4:<stream-name>.f4v
    Application : Server-side code
    application.onPublish = function(myclient,mystream){
         mystream.record();
    application.onUnpublish = function(myclient,mystream){
         mystream.record(false);
    Have a client , which subscribes in following live mode:-
    ns.play("mp4:<stream-name>.f4v",-1,0,true);   // this is subscribing in live mode
    In this way even if file is recorded, your clients are subscribing in live mode so all will be in sync.
    Now if you want to disallow any clients who will try to subscribe to "recorded" file when live event is going on, you can achieve using auth adaptor. (let me know if you want to enforce such requirement)
    But i think above solution solves your primary problem. Also please let me know if there are any issues in getting it work , i have given bare minimum which is required.

  • Pause and Play Toggling Button

    I have created a Pause and Play button that toggles between states.  It controls a Timeline with synced Sound.  When I use it the sound and animation go out of sync.  Can anyone help me with this or perhaps have better code I could swap out to make this work?
    Below is what I am currently using:
    On the first frame of an Action Script layer put this AS:
    playBtn.onRelease = function() {
    ns.pause(false);
    playBtn._visible = false;
    pauseBtn._visible = true;
    pauseBtn.onRelease = function() {
    ns.pause(true);
    playBtn._visible = true;
    pauseBtn._visible = false;
    Lable a Pause button Graphic "pauseBtn"
    put this AS on the button:
    on (release) {
                gotoAndPlay(_currentframe+1);
    Lable a Play button Graphic "playBtn"
    put this AS on the button:
    on (release) {
                stop();
    Put the Pause and Play buttons directly over each other on 2 layers for the duration of the timeline.
    Pause Button on top. (unless you have a STOP on the first line then maybe the Play button will start it (I didn't Try this)

    you have, what appears to be, conflicting code.  and you appear to be using a netstream instance.  so:
    1.  remove all code attached to objects.  copy and paste the only code you have affecting your pause/play button.
    2.  what is ns?

  • NetStream.Publish.Failed

    I'm trying to connect 2 swfs over Stratus and the second client is getting NetStream.Publish.Failed when I try to publish a stream. They both have connected to Stratus via the NetConnection and one can publish a stream but the second can not. I've made sue that each swf is using a different name to publish. I can't find this error listed anywhere in the documentation it only listed NetStream.Publish.BadName. I'm using the AIR 2 RC1 beta sdk from adobe labs set to publish for 10.1.
    Are there any other reasons why i would be getting NetStream.Publish.Failed?

    I found out why it was failing. I was entering the peerID I wanted to allow connection from instead of allowing any direction connection.
    so I had:
    stream = new NetStream(connection, farID);
    stream.publish( channel );
    where is should be:
    stream = new NetStream(connection, NetStream.DIRECT_CONNECTIONS);
    stream.publish( channel );
    then the other client needs to use both my farID and name of my stream in order to connect

Maybe you are looking for