Running a live stream from an XML playlist

I have just successfully installed Adobe FMS on my server.
I would now like to know how to program a script to run a continuous live stream, of MP4 videos, from an XML playlist.
Can anyone tell me how to do this? ...or provide me a good tutorial? (I am a complete newbie to ActionScript.)
Thanks in advance...

application.allowDebug = true;
application.onAppStart = function(){
this.userID =0;
this.playObj = new Object();
this.timObj = new Object();
this.passCli = new Object();
this.couObj = new Object();
this.couObj.count = 1;
application.so0 = SharedObject.get("so",false);
this.dates = new Object;
this.dates.dat0 = new Date().valueOf()+"a";
this.dates.dat1 = new Date().valueOf()+"b";
this.dates.dat2 = new Date().valueOf()+"c";
this.dates.dat3 = new Date().valueOf()+"d";
this.myStream = new Object;
this.myStream.st = Stream.get (this.dates.dat0.toString());
this.myStream.st1 = Stream.get (this.dates.dat1.toString());
this.myStream.st2 = Stream.get (this.dates.dat2.toString());
this.myStream.st3 = Stream.get (this.dates.dat3.toString());
this.int0
this.int1
this.int2
this.int3
this.int4
this.lock0=0;
this.lock1=0;
this.lock2=0;
this.lock3=0;
this.lock4=0;
listen();
function listen(){
clearInterval(application.int3);
application.int0 = setInterval(time,1000,application.myStream.st);
application.myStream.st.onStatus = function(info){
if(info.code == "NetStream.Play.Stop"&&application.lock0==0){
  trace("code0"+info.code);
  clearInterval(application.int0);
  application.timObj.tim = 0;
  application.int1 = setInterval(time,1000,application.myStream.st1);
  application.couObj.count = 2;
  playcurr(application.passCli.cli);
  switchStream(application.so0);
  listen1(application.myStream.st1);
  application.lock0=1;
  function listen1(mystreamst1){
  mystreamst1.onStatus = function(info){
if(info.code == "NetStream.Play.Stop"&&application.lock1==0){
  trace("code1"+info.code);
  mystreamst1 = null;
  clearInterval(application.int1);
  application.timObj.tim = 0;
  application.int2 = setInterval(time,1000,application.myStream.st2);
  application.couObj.count = 3;
  playcurr(application.passCli.cli);
  switchStream(application.so0);
  listen2(application.myStream.st2);
  application.lock1=1
  function listen2 (mystream2){
mystream2.onStatus = function(info){
trace("code2"+info.code);
if(info.code == "NetStream.Play.Stop"&&application.lock2==0){
  clearInterval(application.int2);
  application.mystream2 = null;
  application.timObj.tim = 0;
  //application.int3 = setInterval(time,1000,application.myStream.st3);
  application.couObj.count = 4;
  playcurr(application.passCli.cli);
  switchStream(application.so0);
     application.lock2=1;
  listen3(application.myStream.st3);
  function listen3(mystream3){
mystream3.onStatus = function(info){
trace("code3"+info.code);
if(info.code == "NetStream.Play.Stop"&&application.lock3==0){
  trace("yes yes yes yes yes yes");
  clearInterval(application.int3);
  application.couObj.count = 1;
  mystream3 = null;
  application.timObj.tim = 0;
  //application.int4 = setInterval(time,1000,application.myStream.st);
  playcurr(application.passCli.cli);
  switchStream(application.so0);
  application.lock0=0;
  application.lock1=0;
  application.lock2=0;
  application.lock3=0;
application.dates.dat0 = new Date().valueOf()+"e";
application.dates.dat1 = new Date().valueOf()+"f";
application.dates.dat2 = new Date().valueOf()+"g";
application.dates.dat3 = new Date().valueOf()+"h";
application.myStream.st = Stream.get (application.dates.dat0.toString());
application.myStream.st1 = Stream.get (application.dates.dat1.toString());
application.myStream.st2 = Stream.get (application.dates.dat2.toString());
application.myStream.st3 = Stream.get (application.dates.dat3.toString());
application.myStream.st.play(application.playObj.vid[0],0,-1,0);
application.myStream.st1.play(application.playObj.vid[1],0,-1,0);
application.myStream.st2.play(application.playObj.vid[2],0,-1,0);
application.myStream.st3.play(application.playObj.vid[3],0,-1,0);
listen();
///here next
application.onConnect = function(client){
application.acceptConnection(client);
application.passCli.cli = client;
client.call("setUserID",null,this.userID);
this.userID++;
if(application.clients.length == 1 ){
videoArray = new Array();
var playlist = new XML();
playlist.ignoreWhite = true;
//parse xml play list for individual elements
playlist.onLoad = function( success ) {
if(playlist.loaded == true) {
if (playlist.firstChild.hasChildNodes()) {
for (var aNode = playlist.firstChild.firstChild; aNode != null; aNode=aNode.nextSibling) {
if (aNode.nodeType == 1) {
//create array from parsed xml elements.
videoArray[aNode.attributes.id] = aNode.attributes.name ;
//pass array out of onload function
application.playObj.vid = videoArray;
application.myStream.st.play(application.playObj.vid[0],0,-1,0);
application.myStream.st1.play(application.playObj.vid[1],0,-1,0);
application.myStream.st2.play(application.playObj.vid[2],0,-1,0);
application.myStream.st3.play(application.playObj.vid[3],0,-1,0);
pass0(videoArray);
//play first video on playlist
playlist.load("http://www.privatechatnow.com/fmsuser/playlist.xml");
}//end onetime if statement
function pass0(videoArray){
  //receive array
  //play intial video
  if(application.clients.length == 1){
// application.playObj.vid=videoArray;
playcurr(application.passCli.cli);
for (var key in application.playObj){
trace(key + ": " + application.playObj[key]);
   //put currently playing videio into object
  //isolate playlist switching loop for each connected client
  //listen to currently playing stream with onStatus
  //change to next video in playlist
  //use onStatus and current duration and seek to scrub to cuurently playin video each time a user connects.
  //continue untill playlist is played then loop back to first video in playlist.
    //onConnect play currently playing video
if (application.clients.length >1){
playcurr(application.passCli.cli);
//message client with currently play flv
//message client when flv changes
//message client with metadata
application.onPublish = function(clientObject, streamObject){
trace("Stream name :: "+streamObject.name);
function switchStream(so0){
if(application.couObj.count == 1){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[0].length;
    nextlen = application.playObj.vid[1].length;
so0.send("playSecond",application.playObj.vid[0],clength,currlen,nextlen);
if(application.couObj.count == 2){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[1].length;
nextlen = application.playObj.vid[2].length;
    so0.send("playSecond",application.playObj.vid[1],clength,currlen,nextlen);
if(application.couObj.count == 3){
clength = application.timObj.tim-3;
currlen = application.playObj.vid[2].length;
  nextlen = application.playObj.vid[3].length;
    so0.send("playSecond",application.playObj.vid[2],clength,currlen,nextlen);
if(application.couObj.count == 4){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[3].length;
  nextlen = application.playObj.vid[0].length;
    so0.send("playSecond",application.playObj.vid[3],clength,currlen,nextlen);
function playcurr(client){
trace("count = "+application.couObj.count.toString());
if(application.couObj.count ==1){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[0].length;
  nextlen = application.playObj.vid[1].length;
    client.call("playZero",null,application.playObj.vid[0],clength,currlen,nextlen); 
if(application.couObj.count ==2){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[1].length;
  nextlen = application.playObj.vid[2].length;
    client.call("playZero",null,application.playObj.vid[1],clength,currlen,nextlen); 
if(application.couObj.count ==3){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[2].length;
  nextlen = application.playObj.vid[3].length;
    client.call("playZero",null,application.playObj.vid[2],clength,currlen,nextlen); 
if(application.couObj.count ==4){
    clength = application.timObj.tim-3;
currlen = application.playObj.vid[3].length;
  nextlen = application.playObj.vid[0].length;
    client.call("playZero",null,application.playObj.vid[3],clength,currlen,nextlen); 
application.onDisconnect = function(oldclient){
if(application.clients.length ==0){
this.userID--;
function time(myStream){
application.timObj.tim = myStream.time;

Similar Messages

  • Could you play a live stream from safari to apple tv without going through itunes?

    could you play a live stream from safari to apple tv without going through itunes?

    There is no way to stream Safari content, with or without iTunes, to your AppleTV.
    The only way would be to use a mirroring feature given that you have an AppleTV 2nd gen or newer and a 2011 or newer MBP running mountain lion.
    If not, some third party software like AirParrot can also gives you way to mirror your MBP display on the TV.

  • Live Streaming from Video File

    Hi everyone,,, im newbie in programming streaming video with flash....ater reading documentations i tried the instructions on doc, i got a question that i've not been solved. How to make a "live streaming" from "video file". It likes a live streaming from camera but it uses video file  as the source.... many thanks

    Do you mean you have video file but you want to publish it as live stream , am i right? If yes following is the solution, but before that let me clarify you will need server to do it , i mean there is no way Flash client (i.e. .swf file running in Flash Player) can publish file from local disk.
    Now let me tell you how to do it from server:
    Place your video file under "streams" folder of your application i.e. say "myVideo.flv" under  <FMS root>/applications/myApp/streams/_definst_
    Now write following code in your main.asc file (this file would be under <FMS root>/applications/myApp )
    var mystream;
    application.onAppStart = function(){
         mystream = Stream.get("livestream");
         mystream.play("myVideo",0,-1,true);
    This will publish "myVideo" file as live stream under name of "livestream". Client would have to subscriber using NetStream and
    use ns.play("livestream",-1,-1)
    You might have to write some extra code if you want to loop same file else once play of recorded file gets over , live publish will automatically stop.
    let me know if this solves your problem

  • Problem playing remote live stream from FMS

    Hello all,
    I'm having problems playing remote live streams from FMS (server-side) that I can play with any other player (client-side)
    Example of server-side application which plays a remote live stream:
    nc = new NetConnection();
    nc.connect("rtmp://remoteserver/live");
    stream = Stream.get("localStream");
    stream.play("remoteStream.flv", -1, -1, true, nc);
    This code works only sometimes.
    Most of the times, FMS is able to connect to remote string and the localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
    In this case, FMS is publishing the local stream but it is not playing the remoteStrem on it.
    The rest of the times, localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
       NetStream.Play.Start
       NetStream.Data.Start
    In this case FMS plays the remoteStream correctly.
    Any hint to solve this issue?
    Regards.

    Thanks, I tried your code and it works when playing a remote live stream on another FMS.
    But the remote live stream is not on a FMS but on a Wowza Server which re-streams an RTSP stream over RTMP.
    With this code:
    var nc;
    var myStream;
    application.onAppStart = function(){
         nc = new NetConnection();
         myStream = Stream.get("localstream");
         myStream.onStatus= function(info){
               trace(info.code);
         nc.onStatus = function(info){
               trace (info.code);
               if(info.code == "NetConnection.Connect.Success" ){
                    myStream.play("remoteLive.sdp", -1, -1, true, nc);
         nc.connect("rtmp://remoteServer/live");
    Every live stream player I tried was able to play the remote stream "remoteLive.sdp", but FMS play it only sometimes. This is the output log of the FMS application:
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset
    NetStream.Play.Start         <--------------------------------- Stream is playing just fine
    NetStream.Data.Start
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset       <--------------------------------- Stuck there, stream won't play
    Any idea? Why FMS won't play it everytime?
    Regards

  • How can I save to computer a live streaming from Ustream

    Hi
    That's the question.
    I want to save a live streaming from Ustream.
    any help?
    tnx.

    Install Livestramer (with all python dependencies)
    https://wiki.archlinux.org/index.php/Livestreamer
    livestreamer -p vlc https://www.ustream.tv/embed/9979779
    Found matching plugin ustreamtv for URL https://www.ustream.tv/embed/9979779
    Available streams: 240p, 240p_alt_akamai, 360p, 360p_alt_akamai, 480p, 480p_alt_akamai, 720p+ (best), 720p+_alt_akamai, mobile_240p (worst), mobile_360p, mobile_480p
    livestreamer -p vlc https://www.ustream.tv/embed/9979779 720p+
    same with mpv-Player

  • Problems with FMS2 streaming flv through xml playlist

    I've been testing for the first time FMS2 and has been quite
    a pain to make it work, I've been able to stream a single flv file
    but now that I've tried to stream multiple flv using a xml playlist
    (using the same example provided in
    http://www.adobe.com/devnet/flash/articles/video_player.html)
    and it wont work.
    I have IIS and FMS2 in the same computer.
    In the example provided by Adobe was an error in
    VideoSource.as in line originally was:
    my_FLVPlybk.contentPath = nav.attributes.url + "/_definst_/"
    + stream.attributes.name+".flv";
    And had to change "/_definst_/" to "_definst_/" to make it
    work, since path are:
    rtmp://localhost/videsource/_definst_/fish.flv for example
    and not:
    rtmp://localhost/videsource//_definst_/fish.flv
    Once that was solved and tested it works locally (in the same
    machine where the server is installed) but when testing from
    another computer it doesn't stream any videos.
    All the files are place the way it supposed to be in:
    \applications\videosource\streams\_definst_ (here are the
    videos)
    \applications\videosource (here is the main.asc)
    Then in IIS:
    \Inetpub\wwwroot\playlist (playlist-demo-1.xml,
    VideoThumb.as, VideoSource.as, VideoSource2.html, VideoSource2.swf,
    SteelExternalAll.swf).
    When tested local with
    http://localhost/playlist/VideoSource2.html
    or
    http://localhost/playlist/VideoSource2.swf
    works, but
    when trying from another computer in the same network or
    outside with
    http://my_server/playlist/VideoSource2.html
    wont stream like I said before.
    In the single flv stream (without xml playlist) I seem to be
    able to stream, just made a .fla with a FLVPlayback component
    pointing to: rtmp://localhost/test/_definst_/test.flv
    And trying
    http://my_server/test.html
    works fine.
    I've done the following:
    1. Added a MIME type to IIS for .flv and .swf
    2. Vhost.xml is open for all networks
    (<Allow>All</Allow>)
    3. Change the Global Security Settings for the Flash Player
    to access the .flv on the IIS server.
    4. No firewalls activated (for testing purposes).
    And it works with the single .flv stream but not with the
    xml playlist and I've run out of ideas or what to do, so I'm in
    need of anyone who can help me out and give me some insight.
    Thanks in advance.

    Sounds like a Flash Player security issue because you are
    running from a desktop. One of the items that can be different
    between Test Movie and a published test is security and any
    internet protocol. Flash Security errors fail silently.
    Look at
    NetConnection.connect
    method for the security warnings and references.
    If you plan to deploy from a web server, test there and it
    will likely work.

  • I cannot watch live stream from NBC live extra using Safari

    Hi, I have a macbook pro with mountain lion, safari v6.0 and google chrome v21.0.1180.57.
    I cannot watch live stream on nbc live extra in safari, it gave me a black screen, however, I copy the same link and paste in chrome I could watch the live stream with no problem. I checked several threads but still didn't work out.
    Can some one tell me why and how to make it work?
    Thanks,
    Tianyi

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this exercise is to determine whether the problem is localized to your user account. Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box. Don't use the Safari-only "Guest User" login created by "Find My Mac."
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in OS X 10.7 or later, then you can’t enable the Guest account. The "Guest User" login created by "Find My Mac" is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.

  • About Flash P2P live streaming from non-webcam sources

    Hello, I am a university student. Our lab is attempting to work on a p2p live streaming using flash p2p features. The media source is not from a webcam but a file from a certain server, which is not directly supported by any of the 4 methods flash player offers(posting, direct routing , object replication,and multicast.) As some of the forum threads mentioned, our method is to use NetStream.publish() a stream and use send("callbackname", data)  to all subscribers that have joined in a NetGroup. So we can use p2p transmission. Now here are our questions:
    1. We know from MAX 2009 that flash p2p camera video multicasting implements pull-push mechanism inside which makes full use of p2p features like buffer map exchange. If we use NetStream.send() API to send non-webcam source data, will it also make use of this pull-push mechanism to spread data among all peers(subscribers) with proper data exchange?
    or more detailedly,
    I saw the P2P Gaming Libs at flashrealtime.com. It uses DIRECT_CONNECTIONS when creating publish-used NetStream in order to send data with lowest latency. My question is if I do not use DIRECT_CONNECTIONS, than when the NetGroup grow large (1000), will those peers that are not direct neighbors to the publisher in the same group relay data to each other using pull-push via buffer map?
    2. I have written a sample app and use send() to deliver data only (NetStream.bufferTime = 0) without camera video and audio. When the publisher sends the data  in a "for()" stantence for 20 times, the subscribers can only receive about 8 of them. But when I set a timer and periodically send them(e.g., 500ms), the subscribers can receive them correctly. My questions are: Is the packet loss caused by UDP unreliability? Can this be solved by setting the NetStream.dataReliable = ture? Can this totally be solved by setting a timer? How to set the delaytime property in timer? Are all data sent are orderedly received?
    I'm very appreciated if you can answer my questions? thanks.

    1. NetStream.send() data is delivered in the order it was sent, whether in client-server, DIRECT_CONNECTIONS, or multicast mode.
    2. the lowest latency will be achieved with DIRECT_CONNECTIONS.  however, that isn't scalable to large numbers of recipients.  the P2P multicast system trades low latency for scalability.
    3. there are no plans to support a natural NetStream streaming source that's not a camera/microphone.  Flash Media Server can perform that function.
    4. you should never need to implement "bitmap exchange"; the object replication system handles all the communication needed to accomplish its function. typically you will divide a file into segments, giving each one an index number. object replication uses ranges internally, so the index numbers should be contiguous.  nodes that have indices use NetGroup.addHaveObjects().  nodes that want indices they don't have use NetGroup.addWantObjects().  nodes that have objects will send them to nodes that want the objects.  when a node receives an object, it's automatically removed from its "want" set; once the node decides the object is acceptable, it adds it to its "have" set, at which point it can answer requests from other nodes who still "want" it.  eventually every node will have all the pieces and not want any.  for an example, please see Tom Krcha's articles on using object replication:
       http://www.flashrealtime.com/file-share-object-replication-flash-p2p/
       http://www.flashrealtime.com/video-on-demand-over-p2p-in-flash-player-101-with-object-repl ication/
    5. please see Tom Krcha's articles.  for VOD you will probably want to use the "LOWEST_FIRST" replication strategy, as that may allow you to start playing earlier.  for general file replication you'll get better sharing if you use RAREST_FIRST.

  • Send live stream from local PC to global server

    hello,
    I'd like to capture audio/video from my local PC, and transmit it to a global server, which will send my content to some audiences.
    Since the local PC has no unique IP, the server can't call RTPManager.addTarget(...) to receive live stream.
    Someone recommends me transfer the stream using servlet. But I have no idea.
    Is it possible using JMF RTP, and how?
    Thanks a lot,
    Derek

    Hi Derek,
    I am working on the same thing. I am not able to improve a bit on how to transmit audio captured from my mic. Can u please help me in doing. It will be of much help for me. I would like to transmit sound to computers in the intranet. My email id is [email protected] I would really appreciate if u can help me on this .
    Regards,
    Firmin Dani.

  • Live Streaming from Panasonic SDR-H80

    Hello all.
    I'm writing to ask if there is any way to connect a Panasonic SDR-H80 Cam to my MacBook Pro for a "live stream" (no need to stream it over the internet, only on my screen); the problem is that this kind of Cam doesn't have a Firewire Port, so I'm stuck with the USB cable or A/V one (if there's some kind of adapter for Mac). Can anyone help me?
    Second question:
    Is there a way (software? Free possibly) to have this "stream" time-lapsed for something like 15-20 seconds?

    Thank you for your thoughts and Gongrats. It prompted me to read further and I decided to reinstall iMovie 9.0.4 from time machine. It worked and I now have the footage with sound. Turned out not to be Pain a sonic (humble apologies) but pain from unripe fruit. iMovie 9.0.6 not ripe for consumption and released prematurely.
    So, moral of the story: if you haven't upgraded to Movie 9.0.6, don't. Wait at least for 9.0.7.
    Cheers, Paul

  • Live Streaming from static video file

    Hi everybody,
    I'm using Amazon Cloud & Flash MMedia Server 4.5.
    I would like to take one of my exits videos (a static file), and turn it into a live stream. People can view this video (synchronous). I'm using Flash Media Live Encoder 3.2, but it only capture video from devices as camera...
    How I can do it?
    Cheers.

    Hi Huy,
    Please find the zip attached where I have written the scripts for you to deploy on your local FMS server, in context of option 2:
    You may like to follow these steps:
    1. unzip the folder.
    2. deploy FLVpublishonLoad (in case your recorded file is a FLV use case) on your lcoal server
    3. deploy toPublish on your remote aws server
    4. make sure to correct the path for aws in FLVPublishonLoad application @ line#19:
    // Please mention your aws instance hostname instead of localhost , and application name ....
    nc.connect("rtmp://localhost/toPublish");
    5. go to admin console of your local development server and load the instance of FLVPublishonLoad as shown in the howtoLoadfromAdminConsole.png image attached for refrence purpose.
    6. it will automatically connect to the "toPublish" app on your remote server and start publishing your local vod file as a live stream to your aws instance
    7. start your subscriber app and subscribe to the stream you have used in FLVPublishonLoad app for Stream.get() method, see line#29 and the subscriberScreenExample.png file attached for the illustration purpose.
    few points to note here:
    1. I have removed the sample.flv and "sample1_1500kbps.f4v" for keeping the zip size lower.
    2. You need to put your stream name at line#55 where you call mystream.play()
    3. The stream name that you specify in Stream.get() will be used by subscribers.
    4. if your use case is mp4, then please use "MP4PublishonLoad" instead of "FLVPublishonLoad" application.
    =============
    As I am unable to attach the files here therefore copy-pasting the code for you and others to be re-used:
    =======
    main.asc code for FLVPublishonLoad:
    var nc;
    var ns;
    application.onAppStart = function()
        trace("hello client: ");
        publishIt();
    function publishIt()
        trace("publishing");
        nc = new NetConnection();
        // Please mention your aws instance hostname instead of localhost , and application name ....
        nc.connect("rtmp://localhost/toPublish");
        nc.onStatus = function(info)
            trace(info.code);
        ns = new NetStream(nc);
        // Exact stream name available for subscribers .....
        mystream = Stream.get("myvodfile");
        mystream.onStatus = function(sinfo)
            trace("mystream.onStatus: "+sinfo.code);
            if(sinfo.code == "NetStream.Publish.Start")
                attach_retVal = ns.attach(mystream);
                if(attach_retVal==true)
                        trace("stream attach was successful ...");
                        startPublish();
                else
                    trace("The attempt to attach stream source to NetStream failed");
        // Please put the stream name here inside double-quotes that you want to publish and is available there in streams/_definst_ folder ......
        mystream.play("sample",0,-1,true);
    function startPublish()
        ns.publish(mystream.name,"live");
    main.asc code for MP4PublishonLoad:
    var nc;
    var ns;
    application.onAppStart = function()
        trace("hello client ");
        publishIt();
    function publishIt()
        trace("publishing");
        nc = new NetConnection();
        // Please mention your aws instance hostname instead of localhost , and application name ....
        nc.connect("rtmp://localhost/toPublish");
        nc.onStatus = function(info)
            trace(info.code);
        ns = new NetStream(nc);
        // Exact stream name available for subscribers .....
        mystream = Stream.get("mp4:myvodfile.f4v");
        mystream.onStatus = function(sinfo)
            trace("mystream.onStatus: "+sinfo.code);
            if(sinfo.code == "NetStream.Publish.Start")
                attach_retVal = ns.attach(mystream);
                if(attach_retVal==true)
                        trace("stream attach was successful ...");
                        startPublish();
                else
                    trace("The attempt to attach stream source to NetStream failed");
        // Please put the stream name that you want to publish and is available there in streams/_definst_ folder ......
        mystream.play("mp4:sample1_1500kbps.f4v",0,-1,true);
    function startPublish()
        trace("#### " + mystream.name);
        ns.publish("mp4:" + mystream.name,"live");
    main.asc code for "toPublish" app
    =====================
    application.onPublish = function(clientObj, streamObj)
        trace("published: " + streamObj.name);
    =====================
    Please revert back to me in case of further query.
    Regards,
    Shiraz Anwar

  • Live streaming from FMS3

    Hi,
    I am newbie to flash media server,i want to know how to
    stream the live content as below,
    A->Server,B->System where i am getting the live
    feed,C->System where user wants to see the live feed,
    System is getting the live feed from the camera..it will
    encode that and give out the live feed to FMS i.e. system A in the
    from of a .sdp(session description protocol)(encoded content is in
    264(video) and aac(audio))..so in FMS server i have sdp file..when
    i open it in FMS Server(system A) in VLC player it starts
    playing.Now i want FMS to use this and stream the content that it
    is getting from system B..to system C..(n number of clients)....any
    one knows whether i can directly use sdp for streaming in
    FMS.

    Haven't understand your situation completely. But FMS3 takes
    live input only in form of RTMP family (RTMP,RTMPE, RTMPTE, RTMP
    etc) of protocols.
    I hope it helps.

  • Live Stream from FMS

    I have install the Flash Media Server and Flash Media Live Encoder. Everything run perfectly when I test the Live Stream through localhost, but if I try to embed to another machine, it is failed. Anybody have an idea how to fix it?

    Have you made sure your firewall allows incoming traffic on 1935 - i think it would be firewall issue.

  • Sending Live Stream from one FMS to another FMS

    Hey,
    Here's what I would like to do:
    1. The Flash Media Encoder sends a live stream to FMS 1
    2. On FMS 1, a connection to FMS 2 is set up and the live
    stream is sent to FMS 2.
    3. Every second, a message with metadata is sent to FMS 2
    using Stream.send()
    4. A Client connecting to FMS 2 receives the stream and the
    metadata that was sent along with it.
    I know this sounds pretty confusing, but the main problem is,
    that I don't have access to the FMS 2, so I can't call
    Stream.send() there. First I thought the solution would be using
    Stream.play() with a remote connection, but when I call the
    Stream.send() method nothing happens on the client side.
    Then I thought I could do the whole thing by using a client
    side application that connects to FMS 1, receives the stream,
    embeds the metadata and publishes it to FMS 2. Here's the code I
    used:
    // Connect to FMS 1 to get stream
    client_nc.connect("rtmp://localhost/encoder_stream/room_01",
    "Client");
    // Create input stream
    in_ns = new NetStream(client_nc);
    // Connect to FMS 2
    akamai_nc.connect("rtmp://localhost/akamai/room_01",
    "Client");
    // Create new stream, feed with in_ns and send to FMS2
    out_ns = new NetStream(akamai_nc);
    out_ns.publish("stream");
    out_ns.attachVideo(in_ns);
    Unfortunately the attachVideo method only accepts a camera
    and not a netstream object.
    So this is where I'm standing now... anyone any ideas?
    thanks

    Hello,
    i've asked our Akamai contact and they say it's not possible
    to install any scripts on their servers. I think the only way is to
    push the stream from FMS1 to FMS2, but since FMS doesn't support a
    push method, there i have to find another way *sigh*
    I've heard about FMS version 3 coming up soon, and I'd really
    like to play around with the alpha version. Any idea where you can
    get it from? On Steve Wolkoffs blog it says the new FMS is going to
    support a push method:
    http://blogs.adobe.com/dreaming/2006/10/fmsnext_feature_open_thread.html
    I've also played around with the Red5 server, but I couldn't
    find anything there to achieve a server side push method. Does
    anyone have any experience with Red5 and live streaming?
    Cheers!

  • Live streaming from tsn.ca iphone app to Apple TV

    With my iphone4 (iOS4.2) I can stream youtube videos to my 2nd gen Apple tv. But, when I use the tsn.ca iphone app to watch live streaming hockey games, I can't get the video to show up on the Apple tv. The apple tv seems to sync and displays an image with the label something like "unknown artist" and "unknown title", but no video.
    Not sure if this info will help, but it appears that the tsn.ca app is launching Safari and that the quicktime signal is being displayed via Safari on my iphone.
    My ultimate goal is to watch a live streaming hockey game being delivered by the tsn.ca website. I would have prefered if the Apple TV would have let me display that live feed directly, but the darn box is so locked down that all I can choose from are the tsn.ca pre-recorded podcasts.
    Apple, if you are listening, please allow us customers to watch streaming video content of our choosing via the Apple TV's we bought. I'd love to be able to type in a URL to a quicktime stream and just enjoy. (If this is already possible, I'd love to know how...)

    Video via airplay is currently only supported via the iPod and Youtube app. Apple doesn't read posts on this forum.
    Even when apple releases the tools for developers it will be up to each individual in terms of airplay support.

Maybe you are looking for

  • Audigy 2 ZS Platinum PRO meltdown All fixed

    <SPAN>Hi all. <SPAN>Normally I tend to help, but this time the tables have turned and I am looking for help. :smileysurprised: <SPAN>My lovely Audigy 2 ZS Platinum PRO sound card was working lovley, no hickups or problems until I upgraded my monitor

  • Adobe Photoshop Elements 10 & Premiere Elements 10 for Windows 7 64 bit install

    I have Adobe Photoshop Elements 10 & Premiere Elements 10 for Windows & Mac - Full Bundle Version.  It comes with 5 disk, to install on win 7 64 bit you use disk 2, what is disk #4 used for?   No instuctions found with software and Adobe chat does no

  • EDI for Bill Of Lading

    Hi experts. I would be implementing EDI for BOL and BOL Acknowledgement. What would be the Idoc type and Message type that I should use for these documents? Is this something do-able?

  • A certain file not opening

    I have a fairly old laptop. It has Windows XP Home Edition. Sometimes, the screen will kind of go beserk and slide all over the place, so I have to turn my computer off and then back on. After that, my active desktop needs restored. I was running Ado

  • SAP Fax : Integration of MS Outlook and Genifax

    Hello SDN Users, For our R3 System (SAP_BASIS  620 0067), we have a third party connector named "Genifax" for sending/receiving faxes from SAP. Cuurently we have a requirement to check the possibilty for return receipt message , for every failed fax