FLEX 2.0 and Flash Media Server 2.0 Unable to stream from client to server

Hi All,
I have been trying to put together a quick demo to stream
and record audio from Client to Server. I get this error when
trying to connect to FMS.
ArgumentError: Error #2126: NetConnection object must be
connected.
at flash.net::NetStream/flash.net:NetStream::construct()
at flash.net::NetStream$iinit()
at Audio/toggle()
at Audio/__submit_click()
my Program fails at this line - ns = new NetStream(nc);
Your help is greatly appreciated. Here is the MXML file
Audio.mxml
This file contains a simple start and stop button start and
stop audio processing.
This page is served from Apache Tomcat on host : demoserver1
and port 8080
Flash media server is also installed on the same host
demoserver1.
I did not do any additional config at FMS except creating an
application called "DemoApp". All other settings are defaults.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
applicationComplete="startup()">
<mx:Script>
<![CDATA[
import flash.net.NetConnection;
import flash.net.NetStream;
public var started:Boolean = false;
public var nc:NetConnection;
public var ns:NetStream;
public var mp:Microphone;
public function startup():void{
lblMessage.text="Stopped";
public function toggle():void{
if (started==false){
submit.label="Stop";
started=true;
lblMessage.text="Started";
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
securityErrorHandler);
nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
nc.connect("rtmp://demoserver1/DemoApp");
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS,
netStatusHandler);
mp = Microphone.getMicrophone(0);
ns.attachAudio(mp);
ns.publish("sample1", "record");
else{
started=false;
submit.label="Start";
lblMessage.text="Stopped";
ns.close();
nc.close();
private function netStatusHandler(event:NetStatusEvent):void
switch (event.info.code) {
case "NetConnection.Connect.Success":
trace(" connection success : " );
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found: " );
break;
private function
securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
]]>
</mx:Script>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
width="400"
height="300">
<mx:HBox left="19" right="0" height="100" top="30">
<mx:Label text="Label" id="lblMessage" width="150"/>
<mx:Button label="Start" click="toggle()" id="submit"/>
</mx:HBox>
</mx:Canvas>
</mx:Application>

Hi,
Are you trying to make an air app or a web application (flash) for streaming? You may want to check out the osmf framework to help you write a player for mobile platform. Check out http://www.opensourcemediaframework.com/ for more info on how you can write streaming video players using this framework. There are some good tutorials there and also you may post on the forum to get your specific queries solved.
Thanks,
Abhishek

Similar Messages

  • Playback of flv using Flash Player 10.1 and Flash Media Interactive Server jerky.

    Greetings:
    Thanks for taking time to read this.
    Here is our problem:
    Playback of flv using Flash Player 10.1 and Flash Media Interactive Server jerky.
    Playback ok if using Flash Player 10.0 with Flash Media Interactive Server.
    1. Record live using Flash Media Interactive Server
    2. Attempt to play back resulting flv using Flash Player 10.1 and Flash Media Interactive Server.
      Video plays ok for a few seconds and then plays faster than as recorded -- very jerky.
    Audio plays at normal rate.
    OS: Windows 7 64bit (two different machines. All updates installed.)
    Web browser: FireFox 3.6.10 and IE8 8.0.7600.16385
    Flash version: 10.1.85.3
    Tried with hardware acceleration on and off.
    Note: Also had another person report the same thing on a Mac.
    We had been using Flex 3, so we tried building with Flash Builder 4 – had the same problem.
    This is a show stopper for us.
    Tried using Wowza and everything worked.
    We’re dropping FMIS and switching to Wowza.
    If someone can suggest something else to try, we would appreciate it.

    Hi Greg,
    So if I understand correctly, your findings are:
    Flash Player 10.1.85.3 + Flash Media Interactive Server = Jerky Video
    Flash Player 10.0.x.x + Flash Media Interactive Server = Smooth Video
    Flash Player 10.1.85.3 + Wowza = Smooth Video
    And what about Flash Player 10.0.x.x + Wowza?
    Also, if you could check the network traffic to confirm if it's Flash Player causing the issue or it is receiving it like that from FMIS.
    Cheers
    --Vikas

  • How to deploy Forms, Reports and Menu from Client to Server machine

    Dear Experts,
    I have one requirement to deploy the Forms, Reports and Menu from client machine to server machine.
    Deployment involves the following steps :
    1. Firstly we have to search the selected file in a folder where the .fmx is present ( in Server machine) and take the back up of the the existing file in the server (Source and destination paths will be available).
         Ex. If the existing FMB name is TEST.fmx then the backup file should be TEST_sysdate.fmx.
    2. Secondly we have to transfer the file from the client folder (or from another folder of the same server) to the server folder where the back up exists.
    Please help me to search/rename/copy/replace the _.fmx/.rdf/.rep/.mmx_ files from client to server.
    We are using
    9i Database.
    10g Forms and reports.
    SQL Developer tool.
    OS is Windows (Client and Server).
    Help me out to attach a file of front end screen which we are planning to develop. It will give a clear picture on this requirement.
    Thanks :)
    Edited by: 941175 on Jun 17, 2012 9:09 AM
    Edited by: 941175 on Jun 17, 2012 9:12 AM
    Edited by: 941175 on Jun 17, 2012 9:14 AM

    941175
    Welcome to the forum. Please take a while to go through the FAQ to be found to the top right of the page.
    Your issue is more to do with batch files rather than Forms. The only relation with Forms, as I see it, is that you will be using HOST/CLIENT_HOST to start a batch file with the file name to be deployed as a parameter passed to it.
    You need to rewrite either a CMD batch file or a Powershell script to achieve what have set out to do.
    For CMD batch files look up http://www.robvanderwoude.com/battech.php , or any of the other excellent resources available on the internet.
    Regards,

  • How to transfer passwords encrypted from client to server?

    Hello dear community,
    I have already some experience with programming and did a lot of web-software, but I never was facing the problem that passwords are transfered as plain text to the server when using a login-form.
    For my front-end, I use Java ServerFaces 2.0.
    I read a lot of hints like using a javascript based MD5 library and send the password as MD5 but this can be sniffed an decrypted easily.
    Do you have some hints to easily implement a secure transfer of values from client to server?
    best regards,
    Berni

    goose_fraba wrote:
    and how to do that? how to configure etc.?Server specific. Read your server's documentation.

  • Sending an object from client to server always on button press

    What I need is to send an object from client to server but I need to make server wait until another object is sent. What I have is the JFrame where you put the wanted name and surname, then you create a User object with these details and on button press you send this object to the server. I just can't hold the connection because when I send the first object, server doesn't wait for another button click and throws EOFexception. Creating the while loop isn't helpfull as well because it keeps sending the same object again and again. The code is here
    public class ClientFrame extends JFrame {
        private JButton btnSend;
        private JTextField txfName;
        private JTextField txfSurname;
        public ClientFrame() {
            this.setTitle(".. ");
            Container con = this.getContentPane();
            con.setLayout(new BorderLayout());
            txfName = new JTextField("name");
            txfSurname = new JTextField("surname");
            btnSend = new JButton(new AbstractAction() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    SSLSocketFactory f =
                            (SSLSocketFactory) SSLSocketFactory.getDefault();
                    try {
                        SSLSocket c =
                                (SSLSocket) f.createSocket("localhost", 8888);
                        c.startHandshake();
                        OutputStream os = c.getOutputStream();
                        ObjectOutputStream oos = new ObjectOutputStream(os);
                        InputStream is = c.getInputStream();
                        ObjectInputStream ois = new ObjectInputStream(is);
                        boolean done = false;
                        while (!done) {
                            String first = txfName.getText();
                            String last = txfSurname.getText();
                            User u = new User();
                            u.setFirstName(first);
                            u.setLastName(last);
                            oos.reset();
                            oos.writeObject(u);
                            String str = (String) ois.readObject();
                            if (str.equals("rcvdOK")) {
                                System.out.println("received on the server side");
                            } else if (str.equals("ERROR")) {
                                System.out.println("ERROR");
                        //oos.writeObject(confirmString);
                        oos.close();
                        os.close();
                        c.close();
                    } catch (ClassNotFoundException ex) {
                        Logger.getLogger(ClientFrame.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        System.err.println(ex.toString());
            btnSend.setText("send object");
            con.add(btnSend, BorderLayout.PAGE_START);
            con.add(txfName, BorderLayout.CENTER);
            con.add(txfSurname, BorderLayout.PAGE_END);
            this.pack();
            setSize(200, 150);
            setVisible(true);
    public class TestServer {
        public static void main(String[] args) {
            try {
                KeyStore ks = KeyStore.getInstance("JKS");
                ks.load(new FileInputStream(ksName), ksPass);
                KeyManagerFactory kmf =
                        KeyManagerFactory.getInstance("SunX509");
                kmf.init(ks, ctPass);
                SSLContext sc = SSLContext.getInstance("TLS");
                sc.init(kmf.getKeyManagers(), null, null);
                SSLServerSocketFactory ssf = sc.getServerSocketFactory();
                SSLServerSocket s = (SSLServerSocket) ssf.createServerSocket(8888);
                printServerSocketInfo(s);
                SSLSocket c = (SSLSocket) s.accept();
                InputStream is = c.getInputStream();
                ObjectInputStream ois = new ObjectInputStream(is);
                OutputStream os = c.getOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(os);
                boolean done = false;
                User u;
                  while(!done){
                    u = (User) ois.readObject();
                    String confirmString = "rcvdOK";
                    String errorString = "ERROR";
                    if (u != null) {
                        System.out.println(u.getFirstName() + " " + u.getLastName());
                        oos.writeObject(confirmString);
                    } else if (u == null) {
                        oos.writeObject(errorString);
                is.close();
                s.close();
                c.close();
            } catch (Exception e) {
                    System.err.println(e.toString());
    }Thanks for any help, btw this doesnt need to be via ssl, the problem would be the same using only http. Please anyone help me:)
    Edited by: Vencicek on 7.5.2012 2:19
    Edited by: EJP on 7/05/2012 19:53
    Edited by: Vencicek on 7.5.2012 3:36

    Current code fails because it's sending still the same entity again(using while loop)No it's not. You are creating a new User object every time around the loop.
    which makes the system freezeWhich means that you are executing network code in the event thread. Don't do that, use a separate thread. At the moment you're doing all that sending inside the constructor for ClientFrame which is an even worse idea: you can never get out of there to the rest of your client program. This is a program design problem, not a networking problem.
    and doesn't allow me to set new parameters of the new entityI do not understand.
    I need to find a way to keep Server running even when the client doesn't send any data and wait until the client doesnt press the send button again to read a new object.That's exactly what happens. readObject() blocks until data is received.

  • Date converting to less one day while transferring from client to server

    Hi,
    I have very typical problem. My application is in java, we are using oralce 9ias. The problem when the server is running in german locale and client is running in english. We the date value is passed from client to server it is converting to one day less.
    i.e.
    If i want to search with records jan 02,2005,
    on server side if we print the value it is getting as jan 01,2005.
    Can anybody help me in solving the above problem.
    Its bit very urgent.
    Thanks in advance
    regards
    Kalyan

    well, i have had nightmares with this problem. here are the reason and soln:
    reason:
    in ur DB, u r using a field "Date" which does not include time information. Hence, any date will be taken at 00:00:00. If such a date is opened in some other timezone, which is ahead of the server timezone, the date differs by one. This is becoz java always considers the millisecond info encapsulated in the date, calendar.
    soln:
    Step 1:
    u must be able to get the "timeZoneOffset" from a calendar object. This timeZoneOffset will give the number of minutes/seconds/hours... by which the system is offset from GMT.
    Thus if u create a calendar in India, the timeZoneOffset will be 330. If you create the calendar in UK, it will be 0.
    To achieve this, we have made an object-UTCDate. This class encapsulates a Calendar. It has a function called "getTimeZoneOffset".
    Step 2:
    Once u get the timeZoneOffset, here is what u need to do in ur code. (assume that the timeZoneOffset is in minutes. the variable names will be self-explanatory)
    at the client side code:
    long timeInMillis = calendar.getTime().getTime() + (timeZoneOffsetOfTheCalendarReceivedFromServer * 60 * 1000 ) - (timeZoneOffsetOfClient * 60 * 60 )
    use timeInMillis to make a new Date Object and use this date object.
    at the server side code:
    long timeInMillis = calendar.getTime().getTime() + (timeZoneOffsetOfTheCalendarReceivedFromClient * 60 * 1000 ) - (timeZoneOffsetOfServer * 60 * 60 )
    hope this helps.
    regards

  • Converting date value one day less while transfering from client to server

    Hi,
    I have very typical problem. My application is in java, we are using oralce 9ias. The problem when the server is running in german locale and client is running in english. We the date value is passed from client to server it is converting to one day less.
    i.e.
    If i want to search with records jan 02,2005,
    on server side if we print the value it is getting as jan 01,2005.
    Can anybody help me in solving the above problem.
    Its bit very urgent.
    Thanks in advance
    regards
    Kalyan

    // to get  current time in Germany
        Calendar cal = new GregorianCalendar(TimeZone.getTimeZone("Germany"));
        int hour12 = cal.get(Calendar.HOUR);
        int minutes = cal.get(Calendar.MINUTE);    
        int seconds = cal.get(Calendar.SECOND); 
        boolean am = cal.get(Calendar.AM_PM) == Calendar.AM;
        //I think all you need to do is to set the timezone to the current, so that when the
    //server at some other timezone gets this date it knows that this date belongs to
    //different timezone and gets converted automatically according to the server
    //timezone settings.
        // Set the current local timezone
        cal.setTimeZone(TimeZone.getDefault());
        int hour24 = cal.get(Calendar.HOUR);
      Hope this answers your question. Good luck.
    -Sreekanth varidhireddy

  • Stream-in images from client to server,without running the transmit code

    Hello all,
    Im using JMF for my current project.Right now,I am trying to only recieve images from the client without the client transmitting it.That is I dont want the transmit code to run on the client.
    I should just be able to stream in the images from client to server, without running the transmit code on client.
    Can this be done?
    Thanks in advance

    suppigs wrote:
    Can I know more about this?Sure.
    <Side A>
    You'd just need to write an application that doesn't have a GUI (so, a console-based application) that listens on some pre-determined port for a message to start broadcasting. Maybe you'd send it the IP/PORT number to start broadcasting on. Once it receives that message, it'd start broadcasting the web cam to the IP/PORT number until it received a message to stop. Once it stops, it'll just go back to waiting for the next "start" signal.
    <Side B>
    On the other side, you'd write an application that sends the start messages, receives/displays the videos, and then sends the stop signal. This will have a GUI, and be your "control program" so to speak.
    Then, once of have both of those programs working...if you're using Linux, you're done. If you're using Windows, you'd need to modify the <Side A> program so that it can run as a Windows service.
    There are a lot of ways to do this, you can google it or look at the following link:
    [http://twit88.com/blog/2007/09/19/open-source-software-to-start-up-java-as-windows-serviceunix-daemon/]

  • Transfer file from client to server using http

    HI friends,
    I want to transfer files from client to server...I tried that with the help of socket and rmi..........
    But Http is only the best mechanism for my application..........
    Without using servlets, how to transfer files with the help of http.....
    Any help would be appreciated.......

    Google is your friend, and appearently www.jguru.com also:
    http://www.jguru.com/faq/view.jsp?EID=160

  • Trying to set up my video site to stream from the "fms server." Any Idea?

    I am trying to set up my video site to stream from the “fms server” and the instruction stated that I should create my own new folder in the application directory on the “fms server,” and I have created my directory, which I called “brigma_streams”, and I have copied files from {FMS-Install-Dir}/ sample/Application/vod to my new folder.
    I also configured the vod service in the FMS-Install-Dir/applications/(in my-New-Folder/Application.xml file).
    Here is the sample of my configuration below:
    <Streams>/;${BRIGMA_STREAMS_VOD_COMMON_DIR}</Streams>
    <Streams>/;${BRIGMA_STREAMS_VOD_DIR}</Streams>
    And here is an example on how I modified to my XML streaming:
    src="rtmp://localhost/inetpub/wwwroot/brigma_streams/SanfordNSons768K_002.f4v"
    thumb="thumbs/SanfordNSons768K_002.jpg" />
    After all these configuration and modification it still didn’t work at all when I tested the video in streaming mode. Could some one please take a look at and point me to the right direction. Thanks in advance.

    Hi,
    After adding the configurations to the Application.xml file, you also need to add those entries to the FMS.ini file (in the conf folder). Please add those entries (similar to VOD_ entries) if not already added.
    Once that step is also done, the src RTMP url will look like this : rtmp://localhost/<name of your application folder>/mp4:<stream-name-with-extension>

  • How to Serialize a file path from client to server?

    I am using serializing concepts in java. I am stuck, that how can i send only file path from client to server?

    Um, ill take a wild guess and say that youre trying to
    access a file on another computer using that path?
    That wont work.
    What could the other computer possible do
    with that path unless both computers are networked to a
    common drive, or if they are networked to each other in a way
    where the root in the file path would point to the same place
    on either computer?

  • How to send multiple objects from Client to Server

    Hi
    I have a simple Client - Server architecture. I am trying to send 5 objects from Client to the Server which the server would operate on.
    In the past I've used PrintWriter to pass Strings from Client to Server but now when I am dealing with multiple Objects and PrintWriter not allowing sending of Arrays or ArrayList, how can I send these from the Client to the Server? What would be a good writer to use for this purpose?
    Thanks!

    Thanks, I am looking into ObjectOutputStream but from the API it appears I can only send 1 object at a time. I need to send 5 objects per transaction and then send the next group of 5 objects for another transaction.
    Could you clarify some more on how to put these objects together as a single Object perhaps?
    Thanks

  • My apple Tv has audio problems when streaming from my NAS server.

    My Apple TV has audio problems when streaming from my NAS server or computer and even internet. I can hear the click sound it makes when you click on the icons, but when the movie starts there is no audio. This even happens when using XBMC. I have HMDI directly to my TV suing Apple TV 2. I have tried resetting, turning off both TV and Apple TV, and changing the HDMI cable. It is driving me nuts.

    XMBC requires a hack, we cannot help with hacked devices.

  • Urgent - Upload a file from Client to Server.

    Need to load a file from the client machine to the Server running 9iAS Rel. 1 on a HP Unix Machine.
    We are using Forms 6i. We have looked into the File Upload Utility demo code provided with Forms 6i - but have been unsuccessful in reusing it. PLS HELP

    Duplicate post.
    Upload a file from client to server by forms in E-Bussiness Suite R12
    Re: Upload a file from client to server by forms in E-Bussiness Suite R12.

  • Windows Vista and Flash Media Server Streaming Problems

    My company recently started using Flash Media Server to
    stream audio and video content.
    My boss just installed Windows Vista Ultimate and now no
    streaming content will play at all. Simple Flash animations work,
    but nothing that accesses the Flash Media Server for content. I've
    uninstalled and reinstalled multiple versions of the Flash Player
    on his machine but nothing seems to work. I also tried the new
    "Reset" feature in IE that is supposed to return it to it's
    shipping state and that didn't work. I navigated to the "System 32"
    folder and ran the Flash Updater EXE. I downloaded and installed
    all of the available updates through "Windows Update".
    I also tested Flash Objects that stream video on Adobe.com
    and they don't play either. Has anyone heard of this happening or
    know what I need to do to fix it? I don't know if this is a bug in
    the Flash Player or with Windows Vista.

    This appears to be the solution:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=44&catid=184&threadid =1243464&enterthread=y

Maybe you are looking for

  • Error in init.xml SUN IDM 8.1.0 patch 5

    Hi, when i use the command : lh import init.xml, i have this error : Restored AdminGroup:Service Provider Administrator Restored AdminGroup:Service Provider Admin Role Administrator Problem during execution: java.lang.NoSuchMethodError: com.waveset.o

  • Error in activating Digital Editions - pls help

    Hi... I keep getting the following error code and told to 'try again'. I've seen other posts (much older) where they received the same error, but don't know what the solution is. I am not very techy at all and just wanted to be able to read some libr

  • "Import string" method not supported in LabVIEW 7.1

    We have made an application that support multi-language (English, French, etc.). In LabVIEW 6.1, we used the "import string" VI method to support this option. The method was executed just before to open front panel. The code was based on this example

  • Passing Parameter through SOAP Header in ODIInvokeWebService

    How to pass parameters in SOAP Header in ODIInvokeWebService and not just in SOAP Body? Background: One of our web service provider expects certain parameters set in SOAP Header. Currently, ODIInvokeWebService allows to set parameters through SOAP (R

  • ER: organize imports in an "import" attribute of a JSP page directive

    Hi, it would be useful to see packages/classes hierarchy when changing the "import" attribute of <%@ page %> directive. It might be as well to have all possibilities of imports processing as in .java classes (autoadding, remove unused import, etc.) T