ActionScript 3.0 :: Single Media Player - NetStream With Audio / Video
Mar 27, 2009
I have a project I'm working where I need a single media player to be able to play either audio or video depending on what gets passed (flv or m4a).
PHP Code:
ExternalInterface.addCallback("playMedia", playMedia);
// The way a/v gets changed is from a dropdown menu in the HTMLvar av:String;
/ The param that gets passed to my playMedia function which will determine if its audio or video
var nc:NetConnection = new NetConnection();nc.connect(null);var ns:NetStream = new NetStream(nc);ns.client(this);
[Code] .....
How do I add the audio to the container in such a way that it 'replaces' the video that's in the container? I may want to add a static image as a visual representation.*/
ns.play(av);
}}
I have 3D videos encoded with each eye's content side-by-side on each frame. What I want to do is take the left-half and over-lay it on the right-half. (I'll then change with the colors and the overlaying so that someone with blue-cyan 3D glasses can view the video).
I tried to attach a single NetStream to two video objects and offset them, but that only let the stream play on one object.
just wondering if it is possible to play an FLV and attach the video from that netstream to another and publish it to FM2.
is there a a way to attach video and audio from one netstream to another? i have tried everything so far that i know of. when i think its attaching and publish it, i see nothing. publshing my cam and mic work flawlessly.
here's my code:
Quote:
nec = new NetConnection(); nec.connect(null); nes = new NetStream(nec); nes.play("http://testbox/transformers.flv");
how to get flv's to load up dynamically using xml - it all works well apart from this one problem that i have.
when the thumbnail for the flv is clicked the preloader appears and the flv starts to load - but for some reason the audio begins to play almost immediately - then when the flv actually loads then the audio plays again whilst the initial (unwanted) audio carries on playing!
The task seems easy: I am loading a video via a netsream object (could be FLV or an h264 mp4) and I would need to check if this video has audio available (otherwhise sound control objects should be disabled or become hidden).
I ran a simple live video streaming application for the first time with actual users and ran into a couple of serious performance issues that had not turned up during testing. In this instance there was one video stream from a live web cam and used FMLE at 150 kbps using VP6 and MP3 @22k. There were 16 clients and everything worked pretty good for about 30 minutes. (although some clients said their audio and video were out of sync by up to 3 seconds)
Then individual clients would have either the video freeze or the video would continue and the audio would stop. These clints had to "disconnect" and then "connect" again to the application. This happened to all of the clients at one time or another for several minutes. I stopped and restarted the FMLE with progessively lower bandwidth settings down to 75 kbps but still clients were having the same issue.
I eventually stopped the FMLE and used the applications built in publisher at 45 kbps and that seemed to eliminate the freeze/dropping issue. But of course the video quality was very poor and some clients still reported that the audio was out of sync with the video. The server hosting the FMS application is a quad processor dell with lots of memory and network connectivity. The Flash Media Admin Console performance graph showed the total Bandwidth as 3 Mbps at maximum.
I need to merge multiple live audio streams into a single stream so that i can pass this stream as input to VOIP through a softphone.For this i tried the following approach:Created a new stream (str1) on FMS onAppStart and recorded the live streams (sent throgh microphone) in that new stream.
Below is the code : application.onAppStart = function() {
I'm doing an Assignment where I have to build a website using Flash and for it to contain 4 video's.How can I have one single video player where the user can select what video's they want played in it from the website?
I'm developing an application and i want to make one single connection for video(netstream) and chat(sharedObject).I have one connection for each but i have limited connection available in the server so i need to make a single connection to handle the video net stream and chat sharedObject.I use this urls to connect:
private var serverWebcamURL:String = "rtmp://myserverIP/live"; private var serverChatURL:String = "rtmp://myserverIP/multicast/chat";
I built a timeline based player with 2 menus and many videos that you can play.The buttons move the timeline to a frame label and the video plays. The back button has a stop function built in it so the video stops playing when its hit.It plays wonderfully locally but once on a server after a few clicks it boggs down and sometimes the audio from the last video remains playing even when prompted to stop. I was pointed to use the add and remove child functions to prevent this but being very new to Flash and 100% self taught i have zero idea on how to do this. The link to the player is[url]....Even if its a link to a tutorial or something.
I notice that, when I pause the video, the event "NetStream.Buffer.Flush" is triggered. And according to the language reference: "Data has finished streaming, and the remaining buffer will be emptied.", I have to re-buffer it, right? However, also according to the reference, it shouldn't stop buffering:Starting with Flash Player 9.0.115.0, Flash Player no longer clears the buffer when NetStream.pause() is called. This behavior is called "smart pause". Before Flash Player 9.0.115.0, Flash Player waited for the buffer to fill up before resuming playback, which often caused a delay.I'm using Flash Professional to do the debugging, and the traced version number is: MAC 10,0,22,91, and the streaming server is FMS4
dvrcast is a live service.mp4: as the service record and I look over to the dvr sample player debug output messages while out NetStream.Buffer.Empty will stop.Screenshot is shown below. Is it possible to do without stopping the service?
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="[URL]" layout="absolute" creationComplete="init();"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.core.mx_internal; import flash.media.Camera; [Code] ..... So, I play the record video , but there is no image , just voice
I'm trying to create an flv player to play a single video from a website. I can't seem to resize the playback window. Altering the width just seems to move the same small window around the screen.
Ideally I'd like it to go full-screen or at least fill the browser window. However, I don't even seem to have basic control at the moment. What am I doing wrong here?
Also, (and maybe this is related), I couldn't import fl.video.* in Flex Builder without placing the component first in my library resource using Flash. Is it possible to bypass this step and import directly in Flex Builder?
I have read that you can stream protected audio/video to iOS based devices with the new FMS 4.5.Is it also possible to stream protected A/V to a HTML5/JS based Player.
I'm trying to make a software which sends video and audio data to a flash media server by using RTMP protocol. Currently, my program can communicate with a flash media server correctly. RTMP specifications does not describe about the raw data in video/audio messages, so I muxed raw H.264 and AAC data into video/audio messages and sent to the server. The server seems to accept them, but a video player cannot playback the stream sending from the server. The player just says "Loading..." For a test purpose, I sniffed the network packets between Wirecast and the flash media server and ripped off only video and audio data. Then, I muxed those data into video/audio message and sent to the flash media server. In this case, the video player connected to the server can playback the stream correctly.
I checked the stream sent from Wirecast, the stream seems not to be H.264 raw data because those data are not started from 0x17 instead of H.264 start code. With those situation, I am wondering what kind of container format I should use for H.264/AAC data to the flash media server.
I'm developing a video player for Pure IP multicast video. I'm using the Multicast Configurator provided with FMS 4 for generating the configuration. This is the manifest file generated: <manifest xmlns="[URL]"> <id>Multicast_IP_Multicast</id> <streamType>live</streamType> <duration>0</duration> [Code] .....
That's not working. And I have several doubts about it: 1.- It's not working, and I don't know where is the error. I'm not sure what I should add as parameter in GroupSpecifier constructor? GroupSpecs from manifest file?? "com.adobe.pureIPMulticastGroup"??
2.- I've been watching the multicast.as application in FMS4. The only way of publishing multicast streams in FMS4 is using the configurarion from Multicast Config Tool? Is it possible publishing a stream without the GroupsSpec generated by the Config Tool?
3.- If It's mandatory using the config tools for managinf the pure ip multicast. I would like to integrate the Multicast Config Tool in my platform. Is there any place where I could get the code of Multicast Config Tool? Any documentation about how to build it? This component have any flashvars or callbacks that could allow me integrate it in my platform?
I want to set the bit rate of audio and video (48,96.128 kbps) at the time of live streaming . i m not using the flash media live encoder because i have to make it as web applicaton. can any one tell me how to set bit rate.
I am using Flash Media server 4.5 and i read the tutorial if i want to stream the live feed, i may need to use the media live encoder. but what i found in media encoder is i have to manually setup everything and it only support camera devices. But in my case i have multiple video files keep received from another program and place it on file system (server),my goal is use the Flash Media server to perform a live boardcasting with these video file one by one. That means when client watching a live streaming, they will not notice the server is playing mov1, then mov2, then mov3, then mov4... and so on.
You can imagine i am trying to boardcast a live footage say for 60sec, but the video file will not recorded entirely after 60sec, instead for every 10sec i will save a new video file, so that when client watching the live by HLS [URL]when the time reach to 10sec, a mov1 video file available and FMS should boardcast this video on live123.when the time reach to 20sec, a mov2 video file available and FMS should Immediately follow the mov1 boardcast on live123.and so on...Also can FMS dynamically create a new streaming session (invoke by code), so that when client A uploading some video files to the server, the FMS open a new streaming session only stream cilent A video files?the configuration to boardcasting like screen size, bit rate, etc should be pre-defined on the server. [URL]
How do you stop audio playing in a SWF file in a web page when the user navigates to another section?
In fact how can you manipulate audio in general. eg You have three player instances on screen and you want to allow the user to mute or enable the audio on each one without a set of on screen controls- and to control which one is ON as you enter the frame / scene
In my main swf file i load external swf files for each section.. In my video section i load a swf that includes a flv player that plays flv's with sound!
when i go back to menu...or go to another section....sound is still playing! why? I was thinking maybe i need to add a stop all sounds actionscript when going back to menu?
We use a Flash component to allow a user on our web site to record from a Webcam on to our own Flash Media Server. The problem we are having is that the video in a 30 second FLV freezes at the 7th second but the audio continues. The video unfreezes after a couple of seconds but never catches up with the audio. At the very end there's a "Fast-forwarding" of video for the last few seconds so that at literally the last moment, everything's in sync. This happens for almost all of our recordings. Has anyone experienced this type of behavior?
I have been running FMIS 3.5 since April of this year. In August, we started recording conferences, but I'm not sure that this is the issue. We are under very low load at the moment. We never have more than one conference going simultaneously. Our server is spec'ed with a 64-bit operating system (MS08), 24GB RAM, and 24 processors.I notice that in some of our conferences, the video and audio freezes for 5 to 10 seconds. Then they recover and resume where they left off. When this occurs, it recurs every one or two minutes, which is very disruptive.People have to constantly repeat themselves.
FMIS is configured with defaults out of the box, with the exception that we are recording live video and audio. How do I solve a problem like this? Is it Internet latency? Is it our internal network? Is it FMIS 3.5? Not sure where to start.Now I've inherited much of the Flex 3 code that is used in the stream and player Flash components. I notice in the player component that the original programmer is using a timer to monitor the mx.Event.VideoEvent.STATE_CHANGED event. As long as the event fires, he resets the timer. But if 10 seconds expires and the STATE_CHANGED event has not fired, he restarts the player. Is this a valid methodology? Here is the code fragment.
<mx:Script><![CDATA[var lastUpdate : Number = 0;private var pulse : Timer = null; private function onInit() : void { viewVideo.addEventListener(VideoEvent.STATE_CHANGE, function() : void { if (!lastUpdate) { pulse.start(); }[code]....
I'm currently able to record audio and video (from a webcam) to a Flash Media Server. However, in some cases users have a webcam with no builtin microphone. In that case the flash client uses the default microphone with 'Microphone.getMicrophone();' and possibly selects the micrphone of the PC.
A delay between audio and video is caused in cases with a separated webcam and microphone. There isn't a lot of delay on an internal network (e.g. LAN) however, there is a very large delay between audio and video on an external network (e.g. WAN).
I've a site where consumer can take a live meeting with the beauty consultant. The problem I'm facing is during the video chat. Basically there is a delay of 5 seconds between Video and Audio when I access the site from out of my network but when I access it within my network (VPN) then it's work fine.