Streaming  prerecorded files

hi,
i want to stream like a tv channel a list of files.
in this case i have 6 files:
s1.flv - s2.flv - s3.flv - s4.flv - s5.flv - s6.flv
this videos are 1366 * 768 pixeles.
this videos are about 15 seconds every one, they are short videos.every video are about 700 kb
in the server inside the application file i have an app name: test nd inside test i have streams/_definst_
/test
/test/streams
/test/streams/_definst_ (here there are the videos)
my main.asc source is:
application.onAppStart = function(){
    this.clientStream = Stream.get("clientPlayStream");
    this.clientStream.play("s1", 0, -1);
    this.clientStream.play("s2", 0, -1, false);
    this.clientStream.play("s3", 0, -1, false);
    this.clientStream.play("s4", 0, -1, false);
    this.clientStream.play("s5", 0, -1, false);
    this.clientStream.play("s6", 0, -1, false);
    application.onStatus = function(info){
        if(info.code=="NetStream.Play.Stop") {
           this.clientStream.play("p1", 0, -1);
            this.clientStream.play("p2", 0, -1, false);
            this.clientStream.play("p3", 0, -1, false);
            this.clientStream.play("p4", 0, -1, false);
            this.clientStream.play("p5", 0, -1, false);
            this.clientStream.play("p6", 0, -1, false);
what im trying to do is to stream this 6 files and then loop.
and i have a class in my fla file:
package {
    import flash.display.Sprite;
    import flash.net.NetConnection;
    import flash.events.NetStatusEvent;
    import flash.events.AsyncErrorEvent;
    import flash.net.NetStream;
    import flash.media.Video;
    public class MUAC extends Sprite {
        var nc:NetConnection;
        var ns:NetStream;
        var video:Video;
        var videoURL:String="clientPlayStream";
        public function MUAC() {
            nc = new NetConnection();
            nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            nc.connect("rtmp://localhost/test/");
        private function netStatusHandler(event:NetStatusEvent):void {
            trace("event.info.level: " + event.info.level + "\n", "event.info.code: " + event.info.code);
            switch (event.info.code) {
                case "NetConnection.Connect.Success" :
                    // Call doPlaylist() or doVideo() here.
                    doVideo(nc);
                    break;
                case "NetConnection.Connect.Failed" :
                    // Handle this case here.
                    break;
                case "NetConnection.Connect.Rejected" :
                    // Handle this case here.
                    break;
                case "NetStream.Play.Stop" :
                    // Handle this case here.
                    break;
                case "NetStream.Play.StreamNotFound" :
                    // Handle this case here.
                    break;
                case "NetStream.Publish.BadName" :
                    trace("The stream name is already used");
                    // Handle this case here.
                    break;
        // play a recorded stream on the server
        private function doVideo(nc:NetConnection):void {
            ns=new NetStream(nc);
            ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
            ns.client = new CustomClient();
            video = new Video();
            video.attachNetStream(ns);
            ns.play(videoURL);
            addChild(video);
            video.width = 1366
            video.height = 768;
class CustomClient {
    public function onMetaData(info:Object):void {
        trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);
    public function onPlayStatus(info:Object):void {
        trace("handling playstatus here");
this looks fine, but when i try i run the app, i run the flash file the videos are too slow.
i dont know whats going on. can someone help me to fine whats going on ???
thanks.

I think there is typo in your server-side code , probabaly you might have typed it wrong here because there are not p1.flv,p2.flv ..
I really dont know why they should play slow for you. But i can suggest you try with this code and see if things fine - I am just giving more correct code but dont know whether it will solve slow play which you are seeing ( i.e. flash file video is too slow)
Server-side:
application.onAppStart = function(){
    this.clientStream = Stream.get("clientPlayStream");
     this.clientStream.onStatus = function(info){
        if(info.code=="NetStream.Play.Stop") {
           this.clientStream.play("s1", 0, -1,false);
            this.clientStream.play("s2", 0, -1, false);
            this.clientStream.play("s3", 0, -1, false);
            this.clientStream.play("s4", 0, -1, false);
            this.clientStream.play("s5", 0, -1, false);
            this.clientStream.play("s6", 0, -1, false);
    this.clientStream.play("s1", 0, -1);
    this.clientStream.play("s2", 0, -1, false);
    this.clientStream.play("s3", 0, -1, false);
    this.clientStream.play("s4", 0, -1, false);
    this.clientStream.play("s5", 0, -1, false);
    this.clientStream.play("s6", 0, -1, false);
Client-end:
ns.setBufferTime(2);
ns.play(videoURL,"live");
See if this works fine for you.

Similar Messages

  • How can i stream some files via my macbook pro

    how can i stream some files via my macbook pro and my WD TV LIVE

    Which email client are you using & which version?   Your emails are not appearing in the email trashcan? 

  • Unable to stream SMIL files unless the html page, swf file and the smil ffile are on the FMS server.

    When I place the .swf, smil and http files on the FMS server the SMIL stream test sample works fine
    But When I move the files to my web server I get Connection error.
    This is the same issue discussed in http://forums.adobe.com/thread/554107
    I added a ‘base’ variable but it did not work for me.
    The SMIL file has the correct path to the sample files and FMS server
         <meta base="rtmp://200.200.200.23/vod/" />
    I am able to stream files from my html file on my webserver not the FMS server by pointing to the FMS server at rtmp://200.200.200.23/vod/mp4:sample1_1500kbps.f4v
    Is this a domain security setting? If so, where do I change it?
    If not How do I get FMS to stream SMIL files without installing a webserver with FMS?
    Thanks,

    Hi,
    I think there is bug with that videoPlayer.swf which is used by index.html of webroot folder of FMS to play media files, its not able to parse smil file correctly. I used some other player and used the smil file and kept it on http server other than fms server so it was able to dynamically stream videos. So I would suggest you to create your own player which uses smil file. You can take help from the below link to create player:
    http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt1_05.html
    Regards,
    Amit

  • Streaming of files (doc/pdf/xls)

    hi,
              i try to stream a file like this:
              FileInputStream fileIn = new FileInputStream("d:\\test.doc");
              int length = fileIn.available();
              byte[] b = new byte[length];
              fileIn.read(b, 0, length);
              ServletOutputStream op = response.getOutputStream();
              response.setContentType("application/msword");
              op.write(b, 0, length);
              when I do this in WLS 5.1 SP5 ....MS-Word do open...BUT...
              there are lots of weird characters in the document....!!!
              (the same problem for pdf:s)
              Browser used is IE5.0
              (the code above works fine in another appserver i've tested)
              I'm I missing some HTTP-headers ???
              thanks for any suggestions!
              regards,
              /goran knutas
              

    thanks for your comment,
              but the code-snippet works fine in Orion Webapp server...
              but NOT in WLS 5.1 sp5...that is a bit strange....
              I dont think it has something to do with MS-Word as such...
              though i have noticed that WLS starts every processed page with a lot of
              empty rows..wich is sent to the cliennt...that could be interpreted
              by the Application/Word to be something else...??? or ???
              /goran
              Joe Trung <[email protected]> skrev i
              diskussionsgruppsmeddelandet:[email protected]...
              >
              > Hi Goran,
              >
              > Your codes look great but they won't work due to the internal processing
              of word processors (Adobe or MS winword). The browser depends on
              informations to invoke or to execute the content. Why so complicated? If you
              save a MS doc as a webpage you may see complicated things you couldn't
              imagine. Try the simple way what I did:
              >
              > ejb-2_0-pd2-spec
              >
              > workshop
              >
              > You get on the browser 2 underlined sentences: ejb-2_0-pd2-spec and
              workshop. If you click one of them you get what you expected.
              >
              > Joe
              >
              > "Goran Knutas" <[email protected]> wrote:
              > >hi,
              > >
              > >i try to stream a file like this:
              > >
              > > FileInputStream fileIn = new FileInputStream("d:\\test.doc");
              > > int length = fileIn.available();
              > > byte[] b = new byte[length];
              > > fileIn.read(b, 0, length);
              > > ServletOutputStream op = response.getOutputStream();
              > > response.setContentType("application/msword");
              > > op.write(b, 0, length);
              > >
              > >when I do this in WLS 5.1 SP5 ....MS-Word do open...BUT...
              > >there are lots of weird characters in the document....!!!
              > >(the same problem for pdf:s)
              > >Browser used is IE5.0
              > >
              > >(the code above works fine in another appserver i've tested)
              > >
              > >I'm I missing some HTTP-headers ???
              > >thanks for any suggestions!
              > >
              > >regards,
              > >/goran knutas
              > >
              > >
              >
              

  • How to insert a streaming audio file/link into a basic HTML page?

    I am a novice webmaster managing the website for our arts organization.  I am trying to build a simple table on a page of our site that will have about 30 streaming MP3 audio clips for our members to review.  I'm using Amazon CloudFront and Amazon S3 to host and stream these files (using an embedded JW Player?).  Can someone explain to me how to insert these media files into my Dreamweaver page in the most simple way? 
    Up until now, I've been just inserting downloadable MP3 files as quicktime plugins (also hosted at Amazon S3) but with 30 files that gets pretty cumbersome because they all begin to progressive download at the same time. 
    Thank you.

    I simply want a basic playlist for  MP3 files.  What is the type of playlist I want in that case? 
    XML would work.
    http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-embedding/5768/how- to-embed-jw-player-with-an-xml-mp3-playlist
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Streaming audio file over the network w JMF. How to know when the file end

    Hi
    I am streaming audio file over the network using JMF. I want to be able to know when a file end so I can close the streaming session.
    Can some one please help
    Thanks

    If you put a ControllerListener on the Processor that's associated with generating the RTP stream, it'll generate an "EndOfMedia" event when the end of the file is reached.

  • Can QT Player play streaming .asx files from the Web?

    All:
    I'm trying to play some of the flash video files from this site:
    http://www.adultswim.com/williams/bump_music/index.html
    I'm certain the links work because those movies play fine on a PC. Yet on my Macs (a Mac Pro and a Macbook), when I click on any of them, I get a blank screen.
    I have the latest Flip4Mac WMV components installed and I pretty much have everything enabled in the Quicktime MIME settings as well, but I have no luck playing these files.
    Is there something else I'm missing here?
    Can QT player handle streaming .asx files or do I need a different codec for that? If I do need a specific codec, where would I get it?
    Or do I have get Flip4Mac WMV Pro or QT Pro to get this to work?
    According to the website, the WM components I installed should be able to play .asx files (http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx). FWIW, plain .wmv files play just fine locally or via streaming.
    Can any of you try it and see if it works for you?
    Thanks,
    Ken

    Doesn't work here either, even with the latest Flip4Mac beta. There are some WMV formats that just won't work on a Mac, and this may be one of them. But you can try contacting Flip4Mac's tech support and asking if they have any information on the issue.

  • Stream from File - Workflow Inquiry

    Greetings all,
    In short I am trying to stream from file. By this I mean a solution where the user views the streaming video as something like "http://stream.somesite.com" and not "http://stream.somesite.com/vod/vmp4:video1(and then video2, and then video3)"
    The goal is to seamlessly update the playlist of files (remove/re-order/append) that is being streamed in the background so to the end-user it's just one continuous live stream. You could equate it to watching TV, actually.
    The reason I am asking is that software like Flash media Encoder can only play from live sources like capture cards, screen capture software, or webcameras, and then software like Flash Media Streaming Server 4.0 can only play from specific files directly. While you can stream from an XML playlist, I want all the viewers to be watching from the same point and not be able to prematurely change the video.
    This setup is best seen in popular site like Justin.tv and livestream. The key differences I am looking for is to stream from pre-encoded files (MP4(H264/AAC)) in an effort to keep the quality as high as possible.
    Can someone help me out?
    My Current Setup:
    A Box running Windows server 2008 R2 with IIS7.0 installed and configured for H264 HTTP-Pseudo streaming. See:http://h264.code-shop.com/tracListening on Port 8080
    Same box running Flash Media Streaming Server 4.0 with "httpproxy" set to the IIS7.0 server.Listening on Port 80 and 1392(?)(the rtmp one...)

    I like the looks of the play2 command and thus the adobe extended dynamic streaming class from here: http://www.adobe.com/products/flashmediaserver/tool_downloads/
    The main goals are to give the end user seamless viewing of the playlist, to obfusicate the files themselves for security, and to control the playlist on the backend when needed. My original idea did all this by controlling everything on the server side and only letting the user see the end continuous stream.
    I am looking into actionscript now, but am curious as to how it works. It's not something you can just place in the an hmtl file, like javascript or php, right?
    It seems you compile actionscript into .swfs using Flash CS4 Pro, and then call them using javascript and such? Confused. :/
    What methods are available for file security on the flash server? I have read an article from the JW player people here http://www.longtailvideo.com/support/jw-player/48/securing-content-protect-your-video#Serv er_Side and it seems you need to implement the security on the bundled Apache 2.2. server rather than the flash server itself. The current method I am focusing on is the temporary URL generation. Something like "http://server.com/as9d86a/video1.mp4" instead of "http://server.com/path/to/real/file/video1.mp4" where the temp URL will timeout when the file finishes playing. That way only 1 file is available for the user to stream from at any one time. Then when the current video ends a new url is generated for the next video and delivered to the flash player.
    In that reguard I currently have my eye on implementing mod_auth_token seen here: http://code.google.com/p/mod-auth-token/
    What are people opinion on this?
    Thanks for your help.

  • Save stream to file

    hi
    would someone be kind to help me
    i need to know how to to save stream to file
    10x

    use this code, could be helpful for understanding.
         final File resultFile = new File(resultFilePath) ;
         final FileOutputStream out = new FileOutputStream(resultFile) ;
         final PrintWriter writer = new PrintWriter(out) ;
         writer.write(resultBuffer.toString()) ;
         writer.close() ;
    out.close() ;     
    make sure of IO Exceptions ... this is just a code snippet, refactor it ...
    Regards
    Abhi

  • How to stream WMv files

    hallo i just switch from PC and i can not stream WMV files from web sites?any ideas Please!!!

    http://www.macupdate.com/app/mac/17787/flip4mac-wmv-player
    The above link will get you flip4mac. That's a free browser plugin, see if that solves your problem.

  • Purpose of creating smaller segmented stream f4f files?

    What the purpose behind creating smaller individual segmented stream f4f files instead of just creating a single large f4f file?
    If I removed the SegmentDuration and DiskManagementDuration parameters from the event.xml file so I can create a single f4f file, would there be any issues with streaming or performance? 
    <Event>
      <EventID>cfhs</EventID>
      <Recording>
        <SegmentDuration>400000</SegmentDuration>
        <DiskManagementDuration>3</DiskManagementDuration>
      </Recording>
    </Event>
    TO
    <Event>
      <EventID>cfhs</EventID>
      <Recording>
              <FragmentDuration>4000</FragmentDuration>
      </Recording>
    </Event>

    There should not be any issue with streaming or performance if you choose to create single f4f file. The concept of smaller segment files is for DiskManagment to work so that anyone can manage thier disk space better.

  • Streaming m3u files using iTunes and not QuickTime plug-in

    Hi,
    I am listening to mp3 files using a webserver and streaming m3u files. When I click on the url I get the QuickTime plug-in. I don’t like the QuickTime plug-in very much so I would like to have iTunes starting instead of QuickTime.
    I have chosen to use iTunes for m3u files but it do not work. If I save the m3u file to my disc and double click iTunes is starting as I want but not when clicking on the link in Safari.
    Is there any solution to get iTunes starting when clicking on a link instead of QuickTime plug-in?
    The link looks like this: http://www.samplelink.info/custom.m3u?ltype=SEARCHRESULTS
    Thanks in advance.
    Jarle

    Hi
    I'm generally ignorant in the way of those computer thingies, but seeing as no one else has responded, I'll venture my poorly informed opinion.
    It seems to me that what you're asking for can't be done (as yet). What you would need is an "iTunes plug-in" effectively, which I don't think exists.
    The only way you could set iTunes as the default for playing m3u is to leave the web/browser context (i.e. by downloading the m3u file) and then opening it with iTunes, which you already know how to do.

  • Darwin Streaming Server Files Help

    I purchased a Lynux server to stream movies of well, lots of stuff, and I downloaded the darwin Streaming Server Files. I did a mass upload FTTP and well seems relayconfig.xml is a sample??? What all do I have to change in this, and do I need one for every movie? do i change the title of the file for each movie? like relayconfig1.xml, relayconfig2.exm ect?
    ANY help yould be greatly appreciated

    The mount point is supposed to be the location on the hard disk where the movie file resides; the sdp extension indicates that the file is a stream. To create a SDP file, try using the information linked to from this page.
    (14906)

  • Streaming .wmv files not working

    When I go to stream .wmv file from the website I use to access school lectures, I get an error message from what looks like Flip4mac saying "QuickTime Player must be installed to run this application". In an attempt to resolve this I reinstalled Flip4mac 2.2.3.7. This still did not work. Does anyone have any ideas?

    Here is what I read from Flip-4-Mac web site. You need to install Quicktime 7 from your install disc for this to work. Then reinstall Flip-4-Mac again.
    Repair Permissions and restart your computer.
    JeffSp8, going to the finder and getting info...then choosing Quicktime won't force the browser to play the video. This only work for videos playing locally from the hard drive.

  • Streaming .wma files throug binary gateway

    A customer of mine is asking about any issues that they might run into or any best practices around streaming .wma files through the portal and thus the gateway. They are looking to stream traffic cams from an outside source to their intranet.

Maybe you are looking for

  • Apple store returns my MBP17 with a new logicboard but broken dvd & battery

    i posted here before http://discussions.apple.com/thread.jspa?threadID=2383997&tstart=0 this is regards to MBP17 2006 NVDIA defected card return policy as prior thread title states, the computer fell under the coverage once the video card died, apple

  • Missing table comments

    Hi, During the definition of metadata i usually find table and column comments very usefull in an Oracle schema. However, my experience is that deploying a table definition does not add comments on the table even if a COMMENTS DDL script is produced

  • Layer 3 3750g inter vlan route to internet interface

    How do you route the inner vlan to the internet? Say you have 3 vlan on switch and one port on switch that is set to no switch port with an IP address that connects to a Rogers modem, what besides the default route of 0.0.0.0 0.0.0.0 IP address do u

  • Getting error while starting DB services.

    Hello, I made a mistake while starting DB Services. Instead of starting DB services with ORACLE user I tried to start it with ROOT user and got Insufficient Privileges error. Now when I am trying to start it with ORACLE user I am getting Listener err

  • Inserting special spaces in Illustrator CS3

    How do you insert special spaces in type in illustrator CS3 (m space, n space, etc) and what are the shortcuts for them? Thank you. Louis Note: I'm on Leopard