Cannot stream file using video object

I am trying to get my video files to broadcast my local version of flash media server on my instance of a flex application. I am able to connect to the server and I get the NetConnection.Connect.Success code from the server. When I debug the application, I find that I'm NetStatusEvent objects with the codes: NetStream.Play.Reset and NetStream.Play.Start. And details property of the info object is "sample.flv' which is the video file that I sat in my folder of the application"FMSTesting ". To make my video in my application to: 'rtmp://localhost/FMSTesting/sample.flv' and my Flex application to the root Web of the flash media server outputs "http://localhost/FMSTesting/bin-debug/FMSTesting.html"" "

So I don't know if my installation is fake or not, but I think it's ok because I can connect to the server fine. I can't get my stream to play on the video object. Here is my code, please help if you can. I've also attached the code

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML layout "="absolute"creationComplete ="init (); » >
< mx:Script >
<! [CDATA]
Import mx.core.UIComponent;
Import mx.rpc.events.ResultEvent;
import flash.net.NetConnection;
import flash.net.navigateToURL;
import flash.events.NetStatusEvent;
import flash.events.StatusEvent;
import flash.text.TextField;
to import flash.net.NetStream;
import flash.media.Video;

public var wrap: UIComponent;
public var nc:NetConnection;
public var ns:NetStream;
public var myVid:Video;
public void init (): void {}
NC = new NetConnection();
nc.addEventListener (NetStatusEvent.NET_STATUS, onConnect);
NC. Connect ("rtmp://localhost/FMSTesting", "bonnetbe");
Wrap = new UIComponent();
Wrap.x = 10;
Wrap.y = 10;
Wrap.Width = 210;
Wrap.Height = 200;

}

public service (onSayHello)

public void onConnect(event:NetStatusEvent):void {}

myText.text = "the connection is" + nc.connected + event.info.code;

Switch (event.info.code)
{
case "NetConnection.Connect.Success":
myText.text += ("Congratulations!" logged"+"\n");
makeVideos();
break;
case "NetConnection.Connect.Rejected":
myText.text += ("" Oops! "") the connection was rejected"+"\n");
break;
case "NetConnection.Connect.Closed":
myText.text += ("" thank you! "") the connection has been closed"+"\n");
break;
}

}
public function makeVideos (): void {}
NS = new NetStream (nc);
ns.addEventListener (NetStatusEvent.NET_STATUS, netStatusHandler);
NS.client = this;
NS. Play ("sample.flv");

myVid = new Video (200,180);
myVid.attachNetStream (ns);
myVid.opaqueBackground = true;
myVid.smoothing = true;
myVid.width = 200;
myVid.height = 180;
wrap.addChild (myVid);

myCanvas.addChild (wrap);

}
public void callClient(event:Event):void {}
NC. Call ("magic", new Responder (myResponder, statusResponder), "World");
NC. Call ("moreFunc", new Responder (myResponder2, statusResponder2), "benjamin");
myText.text += "always connected:" + nc.connected;
}
public void netStatusHandler(event:NetStatusEvent):void {}
trace (Event);
trace (myVid.videoHeight + ":" + myVid.videoWidth);
}
public void myResponder(result:Object):void {}
myText.text = "result:" + result;
}
public void statusResponder(status:Object):void {}
myText.text = "status:" + status.code;
}

public void myResponder2(result:Object):void {}
myText.text = "result2:" + result;
}

public void statusResponder2(status:Object):void {}
myText.text = "2 status:" + status.code;
}

public void updateFunc(event:Event):void {}
changeText.text = "test:" + nc.connected;
NC. Close();
}

[]] >

< / mx:Script >
< mx:TextArea id = "myText" text = "Hello Ben" width = "271" height = "155" x = "311" y = "138" / >


< mx:Text x = "10" y = "192" text = 'Text' width = "144" height = "67" id = "changeText" / >
< mx:Button x = "27" y = "378" label = "Button" id = "funcCall" click = "updateFunc (event); "/ >
< mx:Button x = "135" y = "378" label = "callFunc" id = "callFunc" click = "callClient (event); "/ >
< mx:Canvas "311" = x y = "10" width = "200" height = "120" id = "myCanvas" / >
< mx:VideoDisplay '759' = x y = "62" width = "300" height = "250" id = "vidObj" / >

< / mx:Application >

Hello

Your code is perfectly fine with the exception of a single statement.

(NS). Play

( "sample.flv") ;

Since you want to play VOD, give the name of the stream without extension as -

(NS). Play

( "sample") ;

But why do you NetStream.Play.Reset and NetStream.Play.Start events? This is because you have not mentioned the values 'start' and 'length' in your ns.play () method. Who takes the default value to 'start' as -2, which means that Flash Player first attempts to play the live stream specified in nom_flux. If a stream live by that name is not found, Flash Player plays the recorded stream specified in nom_flux. If a live or a recorded stream is found, Flash Player opens a stream live named nom_flux, although nobody publishes on the subject. When someone starts to publish on this stream, Flash Player begins to play.  As you mentioned the name of the stream with extension, FMS believes that it is in a stream which is not in the server and began to wait for a live stream with the name "sample.flv.

Best practices is always give the 'start' and the 'length' of the data stream when you call the NetStream.play() method.

Kind regards

Janaki L

Tags: Adobe Media Server

Similar Questions

  • Cannot read AVI file using video app

    Hi team, support

    I can't read the AVI file using video app (version 9.2.A.0.6) error message: "cannot play video".

    Whereas, in the file AVI can play with VLC app (third-party application).

    I bought Xperia Z1 because I thought that it can play AVI video files (see:http://www.sonymobile.com/global-en/products/phones/xperia-z1/specifications/ ), please please do not ask me to use another third-party application.

    Info: model: c6902, Lollipop: 5.0.2 Build number: 14.5.A.0.270

    Thank you.

    As I've mentioned before, AVI is a container format when it comes to videos. The information you find in the paper is also also the decoder MPEG-4 format. I just tried an AVI file with MPEG-4 codec here, and it works very well. But if you try to play an AVI file with another codec such as: JPEG, RGB or Cinepak, they probably won't work because they aren't supported codecs.

    You can always download a program on your computer that can check the information of your AVI file container. MediaInfo is an example of this program.

  • Satellite L850-b409 - cannot listen files mp4 video

    I have proplem in audio list in files mp4 video

    I have used all the video player - multimedia player - klite Player cannot play audio files mp4 vedio
    Help, please

    My laptop is Toshiba Satellite L850-b409
    part no: pskg8v

    I have 8 64-bit windows

    Please
    heelllllllllllllllllpppppppppppppppp

    Maybe you don t have installed audio codec supporting the mp4 file format.

    You have two options:
    (1) you would be to convert mp4 files into other formats like mp3
    (2) you must install an audio codec supporting mp4.

    By the way: the * VLC player * is a freeware player that supports mp4.
    So, you should try this player too.

  • Cannot restore files using Vista Business

    I made regular backups of my drives C and D for each week of March so far on an external drive.  K disk.  I did a clean install of the operating system by using a backup image provided by Dell, since I was unable to access the full backup of Windows.  Analysis of my drives would not find the file and tell that I needed a DVD system, given that readers would be reformatted.  I even tried to move the backup file to a new logical drive on the PC that was not not in the backup.  Anyway after that do a full restore the backup program will not otherwise the files on drive K only backup I just created which the program forced me to do before I could restore all the files?  K disk is now G disk, which is the problem?  I can't believe that the program will not restore any backup file created successfully. It's very frustrating.  Makes me wish "Driveimage" or "Norton Ghost".  I have 98 gigs of backups that can not be restored.

    Monicole

    See if there is any help in these.

    A "Windows complete PC Restore" always fails.
    http://social.technet.Microsoft.com/forums/fr-FR/itprovistasetup/thread/18c33a73-5719-499a-866C-af124c05e671

    To access the Windows Vista with Virtual PC or Virtual Server backups
    http://searchenterprisedesktop.TechTarget.com/Tip/0, 289483, sid192_gci1294231, 00.html#.

    How to: Install CompletePC backup VHD file
    http://www.PROnetworks.org/forums/how-to-mount-CompletePC-backup-vhd-file-t84349.html

  • Cannot delete files using dreamweaver

    I've just updated a site to the latest version of PHP and MySql. I find that while I can download new files on the site, I can not delete existing files or new, using Dreamweaver CS6.

    Does anyone else have this problem?

    Howard Walker

    Have you tried with another FTP client?

    This sounds like a problem with permissions and ownership LINUX. Update PHP would not change the permissions and ownership, unless something happened during the process, such as the files have been moved to a different location.

    The way PHP is running affects permissions/ownership (DSO, CGI, suPHP etc), but even if this has changed, I don't think it would affect the permissions set on the files in your site.

  • Cannot print files using Vista. Works well under XP. No error message

    Have installed an EPSOM Stylus CX6500 on Compaq Presario CQ60. Does not print the files. Tried to delete and to rerun, files in the queue ok, but wont print. It works OK on my PC under XP.

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    http://www.Epson.com.au/products/multifunctional/cx6500_specs.asp

    Read the above in general: operating systems. He doesn't have a Vista.

    http://www.Epson.com/cgi-bin/store/support/SupportIndex.jsp?BV_UseBVCookie=Yes&OID=-16521&infoType=overview

    Above is Drivers Epson page.

    See if the Vista drivers are available for this purpose.

    You may need to contact Epson directly about this.

    See you soon.

    Mick Murphy - Microsoft partner

  • Error: cannot read file, Protocol not supported while watching a video

    Original title: can't access a video

    I try to watch a video and I get a message, can't read file, Protocol not supported, this is something new? never seen this happen until today.   I'm not good with computer, so I have no idea what to do now? I hope someone can help me

    Hello

    You can read the following article and check if it helps:

    Error message when you try to use Windows Media Player to stream audio or video from Windows Media Services: «the specified protocol is not supported»

    http://support.Microsoft.com/kb/940029

    Also check out the following link and check if it helps:

    http://social.answers.Microsoft.com/forums/en-us/xppictures/thread/02a93593-F483-4B50-836C-391acfbe8b83

    Hope this information is useful.

    Jeremy K

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • FMS4.5 live stream with multiple video files as a single source?

    I use Flash Media server 4.5 and I read the tutorial if I want to play the live stream, I may need to use the Live Media Encoder.

    But what I found in media encode is I manually set up everything and it only supported cameras.

    But in my case, I have several video files keep the receipt of another program and place it on the filesystem (server).

    My goal is use the Flash Media server to perform a live boardcasting with these video files one by one.

    This means when customer watch a live streaming, they won't notice the server plays mov1, then mov2, then mov3, then mov4... and so on.

    You can imagine I try boardcast say a sequences live during 60 s,.

    the video file will be not recorded entirely after 60 seconds, but not for every 10 seconds, I will deliver a video file,

    so that when watching the live of HLS customer (for example http://xxxx.com/live123( )

    When time reach 10 seconds, a video file available mov1 and FMS should boardcast this video on live123.

    When the time achieve 20 seconds, a video file available mov2 and FMS must immediately follow the boardcast mov1 on live123.

    and so on...

    FMS can dynamically create a new session of streaming (call by code),

    so that when the customer a download of some video files to the server, the FMS log new stream streaming only cilent video files?

    boardcasting as configuring the size of the screen, bitrate, etc. must be predefined on the server.

    (e.g. customer boardcast on http://xxxx.com/live123, CustomerB boardcast on http://xxxx.com/live124...)

    so the fact that possible to use FMS perform these ideas? or y at - it approaches?

    I am very new to FMS, if I have any misconcept FMS or media encoder (live), please do not hesitate to correct me.

    Thank you!

    Hello

    To have OUT load videos from sources of files, to be released at this stage, you need third party software like ManyCam.

    Otherwise, FMS can use source files and a playlist-like, side Publisher.

    Thus, you must request script on the server, server to play files and publish (publish side Server) to be subscribed by customers. Essentially, we ask the server to replace GFFE/encode streams published by sources to have the publishing server-read the file stream.

    http://help.Adobe.com/en_US/flashmediaserver/ssaslr/index.html should give more information on how to do it.

    Thank you!

  • How can we support WAV file stream by using the window media services

    How can we support WAV file stream by using the window media services in Windows Server 2008 R2

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • Cannot open files or programs, error: Windows needs to know what program to use.

    Original title: I can't open any programs.

    Today, I tried to free up space for some games, I tried to download. In the Remove Programs process I must have learned something really important. Now, all of the icons on the desktop are white and I can't open anything. None of the programs, folders, files, photos. The pop up according to open this file, windows needs to know what program to use. It does give me an option to choose a program and I can't open my internet browser unless I have to go through some point average round through my control panel. If there is a way to solve this problem, it would be really useful. I think that the computer uses Windows Xp.Thank you

    Hello

    Method 1
    Follow the steps in the article to fix your .exe file.

    Cannot open files with extensions such as.exe, .com, and.lnk on a Windows XP-based computer
    http://support.Microsoft.com/kb/923077

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article: http://support.microsoft.com/kb/322756

    Method 2
    I suggest you run virus scan online by using the Microsoft safety scanner.

    Microsoft safety scanner
    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: when you do an antivirus online, you will lose data that are affected by the virus. Microsoft is not responsible for the loss of this data.

    Method 3
    I suggest you try the steps from the following link:

    How to change or choose the program that starts when you double-click a file in Windows XP

    http://support.Microsoft.com/kb/307859

    Method 3
    If you still have problems, check in a new user account

    How to copy data from a corrupted to a new profile in Windows XP user profile
    http://support.Microsoft.com/kb/811151

  • Cannot copy files from HD to CD by using wizard.

    Original title: not accessible - incorrect function.

    Cannot copy files from HD to CD by using wizard. Have been able to do for a long time. Without warning is no longer possible.

    Hello

    The format of the files you want to copy basically described what kind of files they are. Word documents, of .mpg, jpeg, etc.
    However, it seems that the problem is with the drive itself, not individual files.

    You happen to have any installed Roxio program? Specifically, Roxio Easy CD Creator?
    If so, you should remove this program, restart the computer and try again.
    I hope this helps!
  • users cannot save .pdf, .doc files using "Save target as" in google search results. Can someone help me, I couldn't have known that the same works very well on some computers.

    I am the Director of technical support for more than 1000 computers. Recently in some computers (windows based) users cannot save .pdf, .doc files using "Save target as" in google search results. Can someone help me, I couldn't have known that the same works very well on some computers.

    Hi MASPAdministrator,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows XP forum.

    http://social.technet.Microsoft.com/forums/en-us/itproxpsp/threads

  • Cannot open files stored in "my documents". Pop - up says I should use powerpoint.

    original title: file associations

    Cannot open files stored in "my documents".  Pop - up says I should use powerpoint.  I had problems with file association recently and still have not solved it.

    Hi johnwatkins,

    ·         The question is limited to PowerPoint files?

    ·         How have you tried to solve the problem?

    Check if you have followed the suggestions in this article.

    How to change or choose the program that starts when you double-click a file in Windows XP

  • Cannot our Association of video files in my files, it says windows Explorer has stopped working.

    Original title:

    Video files

    Cannot our Association of video files in my files, it says windows Explorer has stopped working and then restarts itself back to the home page. they do not yet show in media player.

    It could be Aproblematique with the codecs trying to preview the files. Go to the Control Panel, reports on problems and Solutions, click on "View problem history" on the left pane, scroll down to Windows Explorer, under click twice on the problem that correspond to the date and time that you have encountered the problem. Note the name of the file next to the heading ' fault module name: ', google for the file to see what program it is. Uninstall, update or reinstall the program.

  • I use IE9 and cannot download files on Web sites. Is there a solution?

    I use IE9 and cannot download files on Web sites.  It allows me to locate the file, and then he says your file is downloaded, but just keeps spinning.

    This happens on several sites and when I call their tech support, I said that there is a problem with IE9. If I use another laptop with IE8, there is no problem.

    Open a browser window,

    Press the F12 key, then click browser mode,

    Click on ie8.

Maybe you are looking for

  • I hear a crackling noise when I use a more powerful set of earplugs

    Is there a way to correct the crackling when using a set of earplugs more powerful?

  • Firefox crashes, will still not open

    BP-4ae5915d-4a6b-4e46-8bee-150d82111111 I use a SONY with Windows Vista laptop. Firefox updated automatically to version 8 a day or 2 ago. After it updated, he taught me that it was remove some affiliate programs. Initially, he opens a window, but sa

  • Backlight serious bleeding on 40L7355DB

    Just opened my new TV last night, it's my LCD Toshiba 3rd in a row, I update usually about every 4-5 years... Everything on TV is fantastic apart from the ruined backlight bleeding around the edges and also a few fixes to the middle. I got a fully ba

  • DeskJet 3510 all-in-one will not feed the paper correctly

    I have a Deskjet 3510 all-in-one and it is only about 6 months.  She went from fine print one day not to catch the paper or grab 2 or 3 pieces at a time.  Sometimes, it will sound as he begins to print and then a beep of 2 or 3 times.  Suggestions to

  • How to implement graphical waveform cursor?

    Hello I used visa tools to make the data values .dat file... I used the table of waveform to graphically represent data of this file.i want to implement cursor in that you can help me how to do. Kind regards vijtin