Do not created live video stream on RTMP

Hello, all.
Whats wrong in this code:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="windowedapplication1_applicationCompleteHandler(event)" width="644" height="666">
    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;
            import org.osmf.events.MediaPlayerStateChangeEvent;
            import org.osmf.events.TimeEvent;
            import spark.components.mediaClasses.DynamicStreamingVideoSource;
            private var nc:NetConnection;
            private var ns:NetStream;
            var camera:Camera;
            protected function windowedapplication1_applicationCompleteHandler(event:FlexEvent):void
                // TODO Auto-generated method stub
            private function videoDisplay_creationComplete():void {
                camera = Camera.getCamera();
                if (camera) {
                    videoDisplay1.attachCamera(camera);
                    videoDisplay1.autoPlay;
                    SetNetworkStream();
                else {
                    ErrorMessage.text += "You dont have a camera.\n";
            import mx.collections.ArrayCollection;
            [Bindable]private var microphoneList:ArrayCollection;
            protected var microphone:Microphone;
            protected function cbMicChoices_creationCompleteHandler(event:FlexEvent):void
                microphoneList = new ArrayCollection(Microphone.names);
                cbMicChoices.selectedIndex=0;
            private var nsClient:Object;
            private var video:Video;
            private var meta:Object;
            protected function SetNetworkStream():void{
                nsClient = {};
                nsClient.onMetaData = ns_onMetaData;
                nsClient.onCuePoint = ns_onCuePoint;
                nsClient.onBWDone = ns_onBWDone;
                nc = new NetConnection();
                nc.client=nsClient;
                nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
                nc.connect("rtmp://localhost/live");
            private function checkConnect (event:NetStatusEvent):void
                if (event.info.code=="NetConnection.Connect.Success"){
                    ns = new NetStream(nc);
                    ns.attachCamera(camera,VideoQuality.value);
                    ns.attachAudio(microphone);
                    ns.publish("livestream","live");
            protected function vpCompleteHandler(event:TimeEvent):void {
                TextArea1.text = "Video complete - restarting."
            protected function vpMediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void {
                if (event.state == "loading")
                    TextArea1.text = "loading ...";
                if (event.state == "playing")
                    TextArea1.text = "playing ...";
            private function ns_onMetaData(item:Object):void {
                trace("meta");
            private function ns_onCuePoint(item:Object):void {
                trace("cue");
            private function ns_onBWDone():void {
                trace("BWDone");
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:TileGroup horizontalGap="12" verticalGap="12" left="10" right="10" top="10" bottom="10">
        <mx:Form dropShadowVisible="true" borderAlpha="1.0" borderVisible="true" borderStyle="solid" width="300">
            <mx:FormItem >
                <mx:VideoDisplay id="videoDisplay1"
                                 creationComplete="videoDisplay_creationComplete();"
                                 width="200"
                                 height="200"  horizontalCenter="0" verticalCenter="0" dropShadowVisible="false"/>
            </mx:FormItem>
            <mx:FormItem >
                <mx:Button id="RefreshLocalCamera"
                           label="Refresh local Camera"
                           click="videoDisplay_creationComplete();" />
            </mx:FormItem>
            <mx:FormItem>
                <s:HSlider id="VideoQuality" width="143" stepSize="1" minimum="0" maximum="100" value="50" />
                <s:Label text="Quality"/>
            </mx:FormItem>
        </mx:Form>
        <mx:Form dropShadowVisible="true" borderAlpha="1.0" borderVisible="true" borderStyle="solid" width="300" height="132">
            <mx:FormHeading label="Remote camera:"/>
            <mx:FormItem >
                <s:VideoPlayer id="VideoPlayer1" width="200"  height="200" autoPlay="true"
                                 complete="vpCompleteHandler(event);"
                                 mediaPlayerStateChange="vpMediaPlayerStateChangeHandler(event); ">
                    <s:source>
                        <s:DynamicStreamingVideoSource id="Live1"
                                                       host="rtmp://192.168.0.21:8008/live">
                            <s:DynamicStreamingVideoItem id="livestream1"
                                                         streamName="livestream"
                                                         bitrate="150" />
                        </s:DynamicStreamingVideoSource>
                    </s:source>
                    </s:VideoPlayer>
                <s:TextArea id="TextArea1" width="200" height="25"/>
            </mx:FormItem>
        </mx:Form>
        <mx:Form dropShadowVisible="true" borderAlpha="1.0" borderVisible="true" borderStyle="solid" width="300" height="132">
            <mx:FormHeading label="Local microphone:"/>
            <mx:FormItem label="Volume">
                <s:HSlider width="143"/>
            </mx:FormItem>   
            <mx:FormItem >
                <s:ComboBox id="cbMicChoices" dataProvider="{microphoneList}" selectedIndex="0" dropShadowVisible="true" creationComplete="cbMicChoices_creationCompleteHandler(event)"/>
            </mx:FormItem>   
        </mx:Form>
        <mx:Form dropShadowVisible="true" borderAlpha="1.0" borderVisible="true" borderStyle="solid" width="300" height="132">
            <mx:FormHeading label="System message:"/>
            <mx:FormItem >
                <s:RichText id="ErrorMessage" text="" />
            </mx:FormItem>
        </mx:Form>
    </s:TileGroup>
</s:WindowedApplication>
Video in VideoPlayer1 does not play. But play if live video created by Flash Media Live Encoder.
All my developer environment is described in this page - http://www.vb-net.ru/Flex_Video/index.htm
please, help

I'm a little confused here... do you want to upload a
pre-recorded video file, or have a live broadcast (like from a
webcam?)
If it's live broadcast, you'll want to use FMS.
If it's a prerecroded video, FMS might be a bit of expensive
overkill. You could just as easily use PHP to begin playing the
video from a given byte (see
http://flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two
)

Similar Messages

  • Rtmp live video streaming in ios

    Hello all ,
    I am trying to play rtmp live video streaming from my app developed in flash builder. The video is played in simulator. On Iphone the video is not played. Its a blank screen. Any idea how to rectify this ?
    rtmp used - rtmp://fms5.visionip.tv/live/RT_2 , stream id - RT_2

    Well, JMF doesn't support MPEG-4, so you'll want to do whatever you need to do to get the JPEG feed.
    The following code should allow you to view the web cam steam:
    MediaLocator ml = new MediaLocator("rtsp://whatever.blah:1234");
    DataSource ds = new DataSource(ml);
    Player p = Manager.createRealizedPlayer(ds);
    p.start();

  • Live video streaming not working

    My live video streaming is not work properly. I can watch video for a few seconds to a few minutes before it stops. Why??? What can be done to fix this?

    I downloaded a new version of the app NDTV , but the problem still persists .
    I am using iPhone 5 .
    Please advise, if there are any specific updates you are pointing to . Because I dont have any pending updates showing in App store

  • How to play live Video Stream with Flex?

    I'm trying to get Flex Builder 3 to play a live video stream with Flash Media
    Server and Flash Live Media Encoder.
    I'm able to stream pre-recrorded (vod) flvs in flex from flash media server.
    I'm able to stream live video using Flash/FMS/Flas Live Media Encoder, but not
    with Flex.
    This code streams pre-recorded Video on Demand flvs, but not live streams:
    If I change source to "rtmp://localhost/live/livesream.flv, I get nothing.
    What am I doing wrong?
    <?xml version="1.0"?>
    <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HBox>
            <mx:Label text="RTMP FMS 2.0"/>
            <mx:VideoDisplay
                autoBandWidthDetection="false"
                source="rtmp://localhost/vod/Legend.flv"/>
        </mx:HBox>
    </mx:Application>
    Oh and sorry for the double post. I didn't know there was a seperate FMS forum.

    That worked! Thanks  *very* much. Stupid of me to forget to set the live attribute to true. Also removed the .flv. BTW: what video component do you prefer?
    Here's the working code:
    <?xml version="1.0"?>
    <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HBox>
            <mx:VideoDisplay
                live="true"
                autoBandWidthDetection="false"
                source="rtmp://localhost/live/livestream"/>
        </mx:HBox>
    </mx:Application>

  • Live video stream to both Flash and iOS problem

    Hi everyone, I'm Lucas. I Have learnt how to deliver a single live video stream to both Flash and iOS from this video
    But after that I got a problem with the ".f4m" file and ".m3u8" file (I think)  like this video below here. I don't know what happen with the server because my camera is still working perfectly.
    I now using Flash Media Server 4.5
    Does anyone know how to fix it?

    Try this :
    1: stop any stream.
    2: go to  root_install\applications\livepkgr\events\_definst_\liveevent and delete any .stream file that is in there
    3: Go to   root_install\applications\livepkgr\streams\_definst_ any livestream folder that is in there for example if you streamed with name livestream12 there should be a folder with the name livestream12, delete it.
    4: Then try streaming a single bitrate stream by adding to the FMLE the following parameters 
    FMS Url :  rtmp://localhost/livepkgr
    Stream: livestream?adbe-live-event=liveevent
    5: go to sample player and add this url to the field : http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream.f4m
    *If you have a public IP do the following :
    1: go to http://www.osmf.org/configurator/fmp/#
    and add this url  : http://public_ip/hds-live/livepkgr/_definst_/liveevent/livestream.f4m (replace localhost with your public IP)
    and from the advanced tab say that it is live.
    Give it a try!

  • Switching video source for live video streaming

    Is it possible to switch the video source from a video
    capture card to a standalone video during live video streaming? We
    are streaming live TV and we want to skip playing any
    advertisements.
    If this is not possible, what is the best way skip playing
    any advertisements? Do we have to do it at the client player level
    i.e. catch an event from the video player and play a predefined
    video when the live video stream is stopped?

    Thanks for reporting your fix. That news could be very important to those who delete events from their hard drive to save space, but may want to reload them later to do some editing.
    It sounds like the key is re-importing with exactly the same name as before.
    Just curious: What kind of camcorder? Was it MiniDV tape? Flash? Hard drive? DVD?
    It strikes me that with tape it might be difficult to reimport an exact match. If you start on a different frame, the pointers could be off. But if that is not the case, it is very good news.

  • Director 11 using a webcam or live video streaming input

    I am looking for a solution to use input from a webcam or from any other live video stream in Director 11.
    I have tried using a Flash component but this does not work.
    The MyronXtra does not work with Director 11 too!
    Anyone has an idea?
    Thank you

    You can use this demo from valentin :
    http://valentin.dasdeck.com/xtras/ar_xtra/win/arxtra_win_v019.zip
    it could help
    Brahim AYI

  • Live video stream play permission on server-side

    I have a live video stream application one-to-many for
    example, and i want to send video only to few clients, not to all.
    Like:
    quote:
    application.onConnect = function(client, canSeeVideo) {
    // canSeeVideo = boolean
    this.acceptConnection(client);
    if (!canSeeVideo) client.receiveVideo(false);
    // and after this, can be swich to TRUE or FALSE ?
    client.receiveVideo(true);
    I only want to do restriction for Video, from server-side
    with FMS, or if can't be possible.. how can i put for example a
    black screen on video ? :) and after can be removed, etc...

    1.
    necesary client.receiveVideo() and client.receiveAudio()
    server-side functions
    Thank you fmslove for you trying to help me but
    client.readAccess property can NOT be set after client
    connection was accepted, and for me is useless. Any other
    solution(s) ? i strong recomend to Adobe FMS dev staff to implement
    this feature because is refering to security client-side solution
    from server-side. I have bad experience with users trying to modify
    the Flash Player (plug-in) run memory and set values for my swf
    without my accept, and is nothing that i can do from client-side
    like NetSream.receiveVideo(false) on many-to-many or one-to-many
    live A/V stream.
    2.
    a necesary server-side video encoder solution better than
    Sorenson Spark
    If in future FMS staff from Adobe will implement this
    necesary security feature on server-side like a copy of
    NetSream.receiveVideo() function from client-side, i will be happy
    if i see a solution to encode LIVE video stream on server-side
    because
    Sorenson Spark video encoder built-in Flash Player (plug-in) is
    very old and unuseful.
    If this can't be possible i hope the future Flash Player
    version (10) will have a better video encoder built-in than
    Sorenson Spark !!!

  • Audio several seconds out of sync with live video stream.

    I did a live stream last week using 282,482,832,1500Kbps streams. What would cause the audio to get out of sync with the live video stream? I'm trying to determine if it was  bandwidth related, cpu/memory issue on the FMIS 4.5 server, or an issue with encoding PC exceeding it's limits?
    Thanks,
    Dave

    Which device are you using? Are audio and video coming from the same device or different devices?
    Is it a USB device? Try changing the device and see if there is any difference. Changing bitrates will not affect audio-video sync.

  • AAC audio causes stuttering in live video stream playback

    I am using the Spark VideoDisplay component and setting the mx_internal bufferTime to 0.  (videoDisplay.mx_internal::videoPlayer.bufferTime = 0)  I am doing this because I need to have the absolute minimum delay in the live video stream.  I am broadcasting video files as a live stream using ffmpeg, through Red5, then to the client.  ffmpeg is not re-encoding the video or audio.  I am using h.264 video format.  I have tried encoding videos using Adobe Media Encoder and ffmpeg.
    When I have a video stream only and no audio stream this works fine, but when I have an AAC audio channel with the video, I frequently see the video jitter badly.  It looks like the video is quickly going forward and back a few frames.  When this problem occurs it will go on for some time and sometimes eventualy starts playing normal.  When the video is playing normally the audio sounds fine.  When I play the videos in a regular media player (like VLC) they play and sound fine.  Also if I use an mp3 audio channel I don't see the jittering
    Does anyone have any idea what the cause of this problem might be or how it can be resolved?

    Ah, yes, I am not serving high-def video myself. H264 is probably better, but my understanding is that you need hardware acceleration to get good performance from it (again, not an expert on the topic, that's just what my understanding has been...)
    This document [pdf] may have some usefull info on choosing an optimal encoding for your needs.
    (Or you can see the full lecuture here [Adobe TV])

  • I'm creating live video effects using a midi controller

    I am creating live video effects using a midi controller on a mcabook.The final destination for the video content is an ipad app which uses the built in iPad camera to capture video. I want to "trick" the ipad into "filming" the video from the macbook with the effects. Does anyone have any ideas - software orhardware solutions are all viable. The ipad accepts audio through an Alesis iODock. I really be looking for a software solution which will over ride the built in camera on the ipad and accept a feed from the Macbook.

    You can't override the physical camera and substitute the macbook camera.
    You could find an app or write one that would have the macbook stream the video over wifi from the macbook to the iPad.

  • How do you auto reconnect a live video stream broadcast in flash action script 3?

    how do you auto reconnect a live video stream broadcast in flash action script 3?
    so i don't have to ask people to refresh the page if the connection drops
    i copy pasted the live video stream broadcast files and script from here;
    http://www.adobe.com/devnet/adobe-media-server/articles/beginner_live_fms3.html
    http://www.adobe.com/content/dotcom/en/devnet/adobe-media-
    server/articles/beginner_live_fms3/_jcr_content/articlePrerequistes/multiplefiles
    /node_1278314297096/file.res/beginner_live_fms3.zip
    i don't know what i'm doing

    Why don't you use several layers with appropriate alpha properties, and move these layers according to the mouse events?

  • Live video stream keeps replaying parts of stream.

    While watching live video stream the video jumps back and replays what has already played.  It doesn't skip forward only replays, no problems with chopping stream or anything else.  Thanks for your help.

    Dear RahiSC.
    We actualy never found the solution to this problem. This issue was only there when we were using BlackMagic Studio cards using SDI link. Now we use Osprey video capture card using composite input and now everything works perfectly.
    After that we didn't yet try to resolve the issue when using BlackMagic Studio cards using SDI link.
    best regards,
    Borut.

  • Hello, on an ipad 4 when watching a live video stream , came up with a blank picture with the quick time symbol in the middle, the sound worked perfectly but no picture ? any suggestions please ?

    hello, on an ipad 4, when watching a live video stream , came up with a blank picture with the quick time symbol in the middle, the sound worked perfectly but no picture ? any suggestions please ?

    We have a solution that allows you to do most of what you want, including bulding the form, having people fill it out either in Reader (as an XFA-PDF) or on the iPad (as an HTML form).
    You design the form once, and it will by styled correctly on the appropriate platform.
    For more information, check out these links:
    http://www.avoka.com/blog/2012/02/style/
    http://www.avoka.com/content/avoka/en/products/sff3/smartform-composer/features_and_demos. html
    http://www.avoka.com/content/avoka/en/products/sff3/avoka-smartform-factory.html

  • FMS3: Multiple live video streams

    Hi,
    After reading the features and documentation I have a doubt:
    Can I have multiple live video streams with FMSS at the same time?
    E.g.: Different TV stations broadcast to a single server, and
    then the user chooses what station wants to watch.
    Thanks,
    Oriol

    Contact them and ask them which video streaming standards they use.  The most popular are:
    Windows Media, Windows Media with DRM enabled, MPEG-4, Realplayer, Adobe Flash, and Silverlight. Microsoft has released a Silverlight update for Lion.  http://www.flip4mac.com/ allows native non-DRM Windows Media.  Alternatively, you may need virtualization*. Realplayer's latest update is Lion compatible.  MPEG-4 make sure the version of Quicktime you have installed is the latest.  Adobe's Flash, the same thing.  Also ask them if their website depends on ActiveX.  Again, with ActiveX, virtualization may be your only solution.

Maybe you are looking for

  • Acrobat 7 and Vista

    I have read a number of reports of the problems people were having with acrobat 7 pro and vista so I thought I would report how I got it to work for me. My hardware is a new notebook running Vista Home Premium SP1 with all current updates. After inst

  • Adding text field to e-mail subject

    Hi all, I've got a button on my form that should submit the form in pdf format, to a fixed mail address with a fixed subject message, that has variable content dragged from a text field, i.e "Subject; New e-DCR <TextField12.rawValue>" Firstly, I got

  • Shut down problem wit my K7N2G-L

    i dunno whether ths matter had discuss b4 or not...but i really doubt about ths..... each time i shut down my pc...it will go to a blank screen and the pc not automatically off..it still operating and the cooling fans is still working on...help me pl

  • Attach different names (languages) to a folder (in KM)

    Hi I am looking for a way to combine different names to the same folder. My problem is that that the portal users are from different countries and they want the folders in the KM part to be shown in their one language. I saw a solution on properties

  • About measurement method

    Hellow! Normally speaking,when taking a waveform measurement by labview,is it necessary to take a new measurement continuously(put the read waveform.VI in a While loop)? or just take one measurement each time? thanks!