A loop of Live Stream - onPublish?

Hi all

I'm an extreme newbie and I finally have my videos in loop, but I want that they stop a loop and cut to a stream live whenever we live with our show. Can someone go into detail concerning the code that I need to go videos looping for the live stream? I'm sure that it's done with onPublish, but again, I'm a newbie so I need all the help I can get.

Here's my main.asc. Thanks in advance!

application.onAppStart = function() {}
this.clientStream = Stream.get ("clientPlayStream");

this.clientStream.play ("myfile", 0, -1);

application.onStatus = {function (info)}
{if(info.code=="NetStream.Play.Stop")}
make a code here to restart the flow of data
this.clientStream.play ("myfile", 0, -1);
}
}
}

Yes, you can use application.onPublish and application.onUnpublish to deal with.

application.onPublish = {function (client, stream)

If (stream.name == "therightlivestream") {}

this.clientStream.play ("therightlivestream",-1, -1);

}

application.onUnpublish = {function (client, stream)

If (stream.name == "therightlivestream") {}

this.clientStream.play ("myfile", 0, -1);

}

Tags: Adobe Media Server

Similar Questions

  • Live Streaming of video static files

    Hello world

    I use Amazon Cloud & Flash MMedia Server 4.5.
    I would like to take one of my videos of outputs (a static file) and turn it into a live stream. People can view this video (synchronous). I use Flash Media Live Encoder 3.2, but it only capture video from devices like the camera...

    How can I do?

    See you soon.

    Hi Huy,

    Please find the attached zip file where I wrote scripts for you to deploy to your local FMS server, in the context of option 2:

    You may want to follow these steps:

    1. unzip the file.

    2 deploy FLVpublishonLoad (in which case your saved file is a case of use FLV) on your server for businesses

    3 deploy toPublish on your server remote aws

    4. make sure that correct the path for the AWS in application FLVPublishonLoad @ No. 19 line:

    Please mention your aws instead of localhost instance host name and the application name.
    NC. Connect ("rtmp://localhost/toPublish");

    5. go in the administration of your local development server console and load the instance of FLVPublishonLoad, as shown in the image of howtoLoadfromAdminConsole.png attached to effect refrence.

    6. it will automatically connect to the application of the "toPublish' on your remote server and start publishing your file local vod as a live stream on your aws instance

    7 start your subscriber application and subscribe to the feed you used in FLVPublishonLoad app for Stream.get () method, see line #29 and the file subscriberScreenExample.png to illustration.

    some things to note here:

    1. I removed the sample.flv and the 'sample1_1500kbps.f4v' to keep the zip size down.

    2. you need to put your data online #55 stream name where you call mystream.play)

    3. the name of the stream you specify in Stream.get () will be used by the subscribers.

    4. If your use case is mp4, please use "MP4PublishonLoad" instead of the "FLVPublishonLoad" application

    =============

    As I can't attach files here, then copy - paste the code for you and others to be reused:

    =======

    hand. CSA code for FLVPublishonLoad:

    --------------------------------------

    var nc;

    var ns;

    application.onAppStart = function()

    {

    trace ("client hello :");

    publishIt();

    }

    function publishIt()

    {

    trace ("Publishing");

    NC = new NetConnection();

    Please mention your aws instead of localhost instance host name and the application name.

    NC. Connect ("rtmp://localhost/toPublish");

    nc.onStatus = function (info)

    {

    trace (info.code);

    }

    NS = new NetStream (nc);

    Exact name of feed available to subscribers...

    myStream = Stream.get ("myvodfile");

    mystream.onStatus = function (Sinfonia)

    {

    trace ("mystream.onStatus:" + sinfo.code);

    If (sinfo.code is "NetStream.Publish.Start")

    {

    attach_retVal = ns.attach (mystream);

    if(attach_retVal==true)

    {

    trace ("stream attach succeeded...");

    startPublish();

    }

    on the other

    {

    trace ("the source of flow to NetStream connection attempt failed");

    }

    }

    }

    Please put here the name of the stream inside quotation marks you want to publish, and is it available in the streams/_definst_ folder...

    myStream.Play("sample",0,-1,true);

    }

    function startPublish()

    {

    NS. Publish (myStream.Name, "Live");

    }

    --------------------------------------

    hand. CSA code for MP4PublishonLoad:

    --------------------------------------

    var nc;

    var ns;

    application.onAppStart = function()

    {

    trace ("client hello");

    publishIt();

    }

    function publishIt()

    {

    trace ("Publishing");

    NC = new NetConnection();

    Please mention your aws instead of localhost instance host name and the application name.

    NC. Connect ("rtmp://localhost/toPublish");

    nc.onStatus = function (info)

    {

    trace (info.code);

    }

    NS = new NetStream (nc);

    Exact name of feed available to subscribers...

    myStream = Stream.get ("mp4:myvodfile.f4v");

    mystream.onStatus = function (Sinfonia)

    {

    trace ("mystream.onStatus:" + sinfo.code);

    If (sinfo.code is "NetStream.Publish.Start")

    {

    attach_retVal = ns.attach (mystream);

    if(attach_retVal==true)

    {

    trace ("stream attach succeeded...");

    startPublish();

    }

    on the other

    {

    trace ("the source of flow to NetStream connection attempt failed");

    }

    }

    }

    If please put the name of the workflow that you want to publish and is available in the streams/_definst_ folder...

    myStream.Play("MP4:sample1_1500kbps.) (F4V", 0, -1, true);

    }

    function startPublish()

    {

    trace ("#" + mystream.name);

    NS. Publish ("mp4:" + mystream.name, "live");

    }

    --------------------------------------

    hand. CSA code to app "toPublish.

    =====================

    application.onPublish = function (clientObj, streamObj)

    {

    trace ("published:" + streamObj.name);

    }

    =====================

    Please get back to me if additional query.

    Kind regards

    Shiraz Anwar

  • Live streaming with DVR on linux 64-bit platform

    Hello, everyone. I have deployed enterprise edition 4.0 FMS on my 64-bit linux platform. in the FMS applications folder, I create a subfolder "dvr" and at the same time to create a dvr.asc. the code is as follows:

    application.onAppStart = function()

    {

    trace ("app fme started!");

    };

    application.onConnect = function (p_c)

    {

    p_c.disconnectClient = function() {}

    trace ("-disconnectClient" + application.clients.length + "-");

    application. Disconnect (p_c);

    }

    this.acceptConnection (p_c);

    };

    application.onPublish = function (p_c, p_stream)

    {

    trace ("onPublish streams:" + p_stream.name);

    p_stream.record ();

    };

    application.onUnpublish = function (p_c, p_stream)

    {

    trace ("stream of onUnpublish:" + p_stream.name);

    p_stream.record (false);

    };

    I'm waiting for the live stream will be recorded on the FMS server, but unfortunately nothing has happened.

    But if I use my pc (xp 32 - bit windows platform), everything works fine. When I connect to my pc win_xp

    the fms server automatically created a file streams\_definst_\myVideo.flv under the folder of dvr.

    then the fms on linux 64-bit server cannot create the mavideo file. FLV?

    everything here can give me some advice?

    Thank you for your response. I am a new learner of linux, so I have a lot to learn linux technologies. your answer was referring to 'permissions', then I connect the linux server and use the command 'chmod' to make the directory writable for the video editor dvr.

  • Adobe 13.0.0.182 flash drive to stop all live stream on youtube channels. other videos here are ok.

    after update to adobe flash player for 13.0.0.182 version any live stream on youtube channels suddenly stopped working. other youtube videos play fine. I tried to uninstall and reinstalled flash drive 3 times of any new version in the cache of the flash drive previous and back, reset, mozilla reset to the default values. still does not work.
    I know that there is a problem with mac users but my operating system is Win 7

    today I downloaded the latest version of flash player 13.0.0.206 and everything works again... so problem was in adobe only... problem solved

  • Live streaming video issues

    I look after a small PC of old ladies in Australia, of the Canada.  She used to watch live webcams to the Canada video looking at snow & ice but now with a new HP PC it can not display the stream live... or to be more precise that she can see, but the site does not load properly and displays a still image.

    If the browser is refreshed the image updates, but is a still image.

    We can see the time, so we know there is a preview of the taken video, but it will not be updated with the live stream.

    I read the other posts about similar problems, but can't seem to find an answer.

    I updated its Windows media player, which is uninstalled then reinstalled both Shockwave & Flash to the latest versions, but still the video will not play correctly.

    She can watch other videos for streaming live, but it just seems to be a problem with this one in particular.

    I tried the same webcam feed other computers to the Canada and the United Kingdom with no problems.

    She has a HP610-1010 has Touchsmart with installed ATI Radeo HD5570 graphics card.

    Can anyone suggest anything else I can be on...?

    Thank you

    Malcolm

    Hi - Thanks for your help. I think I found the solution. I checked again in the United Kingdom and found that does not now by streaming video and just displaying still images. There must be an intellectual property sensor on the site of blocking live outside of North America. Bad luck!

  • Live streaming and own HDMI output on camcorder SONY consumer (HDR-PJ650VE in my case)

    Hi all

    I'm trying to figure out how I can live streams, using my Camcorder HDR-PJ650VE. I managed to connect the camcorder to my TV by HDMI out and get the live stream, but the problem is that it also displays the superimposed onscreen. It would be a very useful feature, since it this way, you are able to capture the stream by a jury of consumers capture and share it on Youtube for example.

    I cannot find anything on the manual release of the stream HDMI output and get rid of overlapping info. Is there a key combination or a hidden menu to achieve?

    In addition, it seems very strange SONY would not offer such feature, as for example the PANASONIC offers this good enough consumption walked on models like HC-V520

    Please, let me know if it would be possilb esolving this annoying limitation

    Best regards

    Matteo

    I want to share my discovery because it seems to be valid for all SONY camcorders: to have a clean HDMI out, turn off on HDMI CTR.

    I'm very happy now and I'll start live broadcast!

  • How do you use the Sony NEX 5R as a webcam for live streaming?

    My computer does not recognize my camera as a source for Google Hangouts.

    Digital cameras from Sony, including the Sony NEX - 5R, are not compatible for use as a Webcam. If you are interested in a camera that can live streaming, then the HD camera live Bloggie MHS-TS55 is a good option. You can check it out by clicking on the link below:

    http://store.Sony.com/...ductId=8198552921666415574

    If my post answered your question, please mark it as an "accepted Solution".

  • Download live streaming video

    I want to download live streaming video on my computer (my daughter-in-law live sonogram) if my husband can view them later.  Any suggestions?

    This question is kind of vague, but I'll give you some suggestions. Just in case any of these help can provide you more information, such as this site is meant to be heard in the video and is there all programs used to display the video said.

    Method 1 - http://www.downloadhelper.net/install.php; It is an extension of the addon for firefox that works very well to video capture. If you're not using firefox, it can be easily downloaded Mozilla.

    Method 2 - http://www.fiddler2.com/fiddler2/; This is perhaps an exaggeration, but it has a ton of ability when it comes to download content on the web.

  • Live stream on Media player keep encountering the problem.

    I'm watching a live stream with Windows Media player and he continues to show the media connection, then error comes Windows Media Player encountered a problem while playing the file.  For assistance, click Web help.  When I clicked that show multpile things to try.  One is the windows media player C00D11B1 error message. I have Windows Vista Service pack 2. Any help or information?

    Hello

    I suggest you to refer to this link and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows7/C00D11B1

    It will be useful.

  • HTTP Live Streaming Audio MP3 in the Simulator 10.1

    Hello

    I'm working on an online radio application and I am very disappointed to see that the BB 10.1
    Simulator (10.1.0.1483) does not support the HTTP live streaming of multimedia files (MP3) M3U.

    I get the following message in the log of the device:

    MediaPlayer: prepare::Error attach the input source. URL: ""http://abc.xyzxyz.com:9156 / stream ', "
    error = UnsupportedMediaType

    and also when you try to navigate to the URL in the browser of the Simulator:

    The media file is from and not supported type or could not be loaded. It can not be played.

    I would like to know if the BB 10.2 Simulator supports HTTP live streaming of MP3 files, or do I have to buy a real device?

    Best regards

    burakk

    Hi @burakk,

    My apologies for the late reply. Unfortunately, for the OS versions on the market to date, support for media playback on the Simulator is very limited. This is mainly due to problems of codecs required license. There is a support very limited no playback video and audio (uncompressed audio files in the WAV only). In later versions of OS Simulator, we might have the software decoding - if that happens, your use case would be satisfied then.

    For a complete list of the formats supported on devices: https://developer.blackberry.com/devzone/develop/supported_media/bb10_media_support.html

    See you soon,.
    Rashid

    Applications development consultant | Relationships with developers

    BlackBerry @surashid

  • Is there a way to do a live stream in windows now?

    I know that windows has Bill but I have not found a way to make this work...

    CH does not support live streaming on Windows yet, but it's on the list of future features.

    Would be something like work of beak for your needs?

  • M3u8 sample Live Streaming HTTP plays don't not - stand-alone JavaFX 2.2.7 for java 1.6.0.32

    Hi all
    I searched high and low on the here and the wild wild web, but cannot find any support for my problem.

    I was testing my code of JavaFX2.2.7 Media Player based in a common Java 6 application when I discovered that HTTP Live Streaming does not seem to work.  I can play a local file of the format supported (Sintel trailor mp4 h264), but when I try and use a stream of Live HTTP instead, nothing plays. (for example http://download.oracle.com/otndocs/products/javafx/JavaRap/prog_index.m3u8 ).  I find myself with an empty drive and no exceptions or errors.

    private final static String MEDIA_URL = " " http://download.Oracle.com/otndocs/products/JavaFX/JavaRap/prog_index.m3u8 "; "

    Media = new Media (MEDIA_URL);

    MediaException ex = media.getError ();

    If (ex! = null) {}

    System.out.println ("Media error" + ex.getMessage ());

    } else {}

    System.out.println ("no media error");

    }

    Program the output to the console: "No. Media Error.

    I thought it was something wrong with my Player code, as a last resort, I went to JavaFX 2 - together and copied from the source and put it directly in my application and it ran... Unfortunately occurs the same result. The player runs, but simply shows a video window empty.  Controls are available, but the video plays.

    Based on the release notes for Java 2.2.7 that I was under the impression that HLS has been supported.  Am I incorrect?

    I can't upgrade to Java 7 because I'm firmly stuck with Java 1.6.0.32 for lack of project.

    Can anyone provide any assistance would be greatly appreciated.

    Post edited by: 2b18d6de-8200-4adc-a82a-88fc0451f448 I've updated for JavaFX 2.2.21 and this has not fixed the problem.  The result is exactly the same.  No exceptions, no error and no video...

    My Conclusion: Http Live Streaming does not seem to work with JavaFX 2.2.7 or 2.2.21.

    I've proved since the problem lies with 2.2.7 JavaFX and JavaFX 2.2.21, and that by using the new JavaFX comes with Jre7 solves the problem.

    I created a completely new and added that the JavaFX jars comes with 7 project JRE on my road to build.  I copied the code from http://download.oracle.com/otndocs/products/javafx/2/samples/Ensemble/index.html#SAMPLES/Media/Streaming%20Media%20Player and it works.

    So, I made a few changes on my original Java Eclipse project.

    Removed the build path:

    -C:\Program Files (x 86) \Oracle\JavaFX 2.2 Runtime\lib\jfxrt.jar

    -C:\Program Files (x 86) \Oracle\JavaFX 2.2 Runtime\lib\javaws.jar

    -C:\Program Files (x 86) \Oracle\JavaFX 2.2 Runtime\lib\plugin.jar

    -C:\Program Files (x 86) \Oracle\JavaFX 2.2 Runtime\lib\deploy.jar

    Added to build the path:

    -C:\Program Files (x86)\Java\jre7\lib\jfxrt.jar

    -C:\Program Files (x86)\Java\jre7\lib\javaws.jar

    -C:\Program Files (x86)\Java\jre7\lib\plugin.jar

    -C:\Program Files (x86)\Java\jre7\lib\deploy.jar

    Always using the 1.6.0_32 Java runtime, I ran my application and everything worked.

    Of course, this will be like a giant hack. I am disappointed by the release notes for JavaFX 2.2.7.

    NOTE: To export my request as an executable Jar, I also had to pull the related JavaFX ".dll" JRE 7 libraries and add them to the java.library.path (using script commands) before running the jar.

  • Can I really work on videos with first Pro CC and export to Flash Media Live Encoder for live stream?

    I'm looking for a great coder with features like titling. Adobe first Pro CC has great features, but I can work with it and export my files for Adobe Flash Media Live Encoder for live streaming.

    You can not.

  • Character animator require a live stream of the camera?

    I have some video blogs that I would turn into animations of CA. However, I don't want to have to re-register the. Then I take the archived videos and use it to create an animation of CA, rather than using a live stream of a webcam?

    You can use pre-recorded images with a reader who Ch acknowledges. I use ManyCam and it works very well for video and audio.

  • Multitrack editing live streams: pitch shift causes huge delay

    All,

    For a live stream, I use a multi-to change a number of effects. Everything works very well. However, as soon as I add (even if it's the only effect) a Pitch Shift effect in the basket of the effect, there is a delay of 3 seconds between entry and exit. Is there a way to "fix" this return to the small delay of a few tenths of milliseconds, as happens when you use other effects? 3 seconds streaming live pretty much done behind impossible. Thank you.

    Help to the CC.

    All real-time effects will present certain amount of latency, which is offset by the playback engine by a certain amount of flow of pre-treatment.  But changes to these effects with latencies more will take more time before the changes are audible if modified during playback.  You can take a listen to some free VSTs that can have an impact on the ground and can run more quickly to changes.   VST 4 FREE-Pitch Plug-ins is a good starting point.

Maybe you are looking for

  • To access Advanced Options in BIOS on Satellite U500-12J

    Hello on my Satellite U500-12J my BIOS menu is quite simple. Hardly more than 20 options altogether... :-( In order to get my work of virtualization, I need to check / IO 'APIC' and "PAE/NX", which seems far beyond the scope of what Thoshiba allows m

  • Satellite L30-10 X - drive WinRE does not work

    I have another HARD disc drive on my computer, but it's a Windows recovery disk. I just tried to use it, but if I click on it to start it will just start Windows Vista and does not give me the options to recover my computer.The saids manual instructi

  • Drivers for p - 164 ca

    Hey,. I can't find driver for my Pavilion 15 p - 164 ca downloads. I just did a clean install of the operating system (Windows 8.1), and there are several missing drivers. I found a list of them three days ago, but I can't find it anywhere now.

  • PICT ring to get rid of the framework

    LabVIEW 2011 Professional Dev (WinXP) trying to Pict ring control transparent framework, like Simon. Background ring pict is now transparent, the inc/dec is hidden, as well as the label. It looked like a right click and choose transparent (T). What M

  • Strange marks on the screen

    Hello First of all thanks for this great forum find information on my new pre. I'm having a problem with 2 white spots my screen that I can't seem to come off. The strange thing is that I can see them only when certain colors are on the mainly blue s