Flash :: File Stream In Flex Web App
Jul 25, 2011I want to read a file that is in the client machine in flex web app.But ± dont want file to send server for processing ± want to to read content of file and show in it a component .
View 1 RepliesI want to read a file that is in the client machine in flex web app.But ± dont want file to send server for processing ± want to to read content of file and show in it a component .
View 1 RepliesThe system is a Flex application communicating with a WCF REST web service. I am trying to upload a file from the Flex application to the server and am running into some issues. I'm using a FileReference in the Flex app to browse and upload the file as defined here: [URL]. I am then receiving the file as a Stream (shows as System.ServiceModel.Dispatcher.StreamFormatter.MessageBodyStream in the debugger) in the WCF REST web service (using project type of WCF 4 REST Service)
[WebInvoke(Method = "POST", UriTemplate = "_test/upload")]
public void UploadImage(Stream data) {
// TODO: just hardcode filename for now
var filepath = HttpContext.Current.Server.MapPath(@"~\_testfile.txt");
using (Stream file = File.OpenWrite(filepath)){
[Code] .....
I read limited (small - 15 - 500 mb files). I need to be able to put all file bytes into one single bytearray. So I have a function:
[Bindable]
public var ba:ByteArray = new ByteArray;
//.... code ....//
[Code]....
But it does not work=( - gives me Error: Error #2030: End of file was encountered.
How to get a full bytearray from stream to use it as normal bytearray?
I have a netConnection connected to a Flash Media Server. I am trying to use the new appendBytes function from Flash Player 10.1 to stream a local FLV file to FMS. I'm having issues however... Documentation I get online
function playFile(data:ByteArray):void
{
// data is bytearray data from an already loaded FileReference object[code]....
However, I'm getting an error with the appendBytesAction and appendBytes. The error is: Error #2004: One of the parameters is invalid....TypeError: Error #2004: One of the parameters is invalid.
Are there any way that Flash Media Server isn't able to pass metadata of F4V file into the stream (RTMP) if F4V file was encrypted with Flash Access?
View 1 RepliesI'm trying to force the Flash player to play video files without showing screens. I did try to set vidDisplay.visible to false. But it seemed not working at all.I was doing was try to build a generic media player. Whatever the source is(audio or video), the control panel always the same, namely, a mp3 player panel is always displayed:However, when I stream in a video file, it would end up overriding mp3 panel with a partial video screen. I don't have enough reputation to upload images...
View 1 RepliesWe have a Red5 Server that we use to host a video chat. We are looking for a way to overlay SWF files over the top of a live stream video.For example, we could overlay an SWF animation of snow falling in front of a live stream from a webcam.
View 1 RepliesI want to get a feed from my camera and to pass it to the receive function. Also in flash builder(in design mode) how do I put elements so they can play a camera feed?? Because as it seems VideoDisplay just doesn't work
public function receive(???:???):void{
//othercam is a graphic element(VideoDisplay)
othercam.??? = ????;
}
[Code]...
Live streaming and a buffer on a NetStream do not mix. Why? The docs don't say you can't do this.The playback gets hosed. Buffer is supposed to fill to what you set it to before playing. Instead though, about half the time, the player starts playing right away and disregards the buffer time you've set. Then you get caught in short buffering and rebuffering cycles that degrades the playback experience.
Give it a shot yourself. Here is the simplest of live streaming video players. No frills. Just connect it to your live stream by changing the defaultURL string and stream name in the ns.play() statement.
Run it in Flex debug mode. It will check and print the ns.bufferLength property every second. The buffer is set to 20 secs currently. Last time I ran it, I never made it above 2 seconds in the buffer. Player started playing right away instead of buffering the full 20 secs first. Sometimes you get to the full 20 and sometimes not.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="init()">
<mx:Script>
[code]....
I'm using NetStream class to create p2p video conferension. Is it possible to add overlay pictures or animation into video captured from webcam and then send reencoded stream to other user?
View 2 RepliesI'm trying to send a video stream to a Red5 server using Flex.
My Red5 setup seems to work for remote method invocations and shared objects, but I've yet to succeed in getting video working.
This is the AS3 code that connects to Red5:
# connect to RTMP server
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netConnection.connect("rtmp://localhost/context_name");
# omitted code for waiting for connection success, and setting up shared
[Code].....
As said, note that the Red5 setup works flawlessly for remote method invocations and shared objects, but not for video which is strange.
I am developing a audio player in flex. I need a seekbar kind of like on youtube's video player. To implement the basic seek functionality the HSlider component is enough. But I also want to show the stream progress on the seek bar. (youtube colors the already streamed part of the seekbar red). Is there a way I can achieve the same? drag and drop audio player component with play/pause and seek functionality.
View 1 Repliesis it possible to play video stream from non-adobe(or homebrew server), in the newest flash player(10).It looks like the VideoPlayer only plays the stream from FMS? Is it the business model of Adobe?
View 2 RepliesHow to get timestamp with milliseconds or better nanoseconds of currently playing video?
View 1 RepliesThis will create an flv video file on flash media server:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.publish("yourCamera", "record");
ns.attachVideo(Camera.get());
How can I generate an image for the current video frame every 2 seconds?
It's possible do a stream of a *.swf file??
like we can do with a *.mp3:
[AS]mySound = new Sound();
mySound.loadSound("http://www.foo.com/SoundsToLoad/sound14.mp3", true);
mySound.start();
[/AS]
but i have the mp3 into other swf, with loop and i want to stream that file to the main *.swf
I am trying to stream a MP4-file from the VOD-folder using the videoplayer in flash. I can play the sample-file without any trouble, but when i try to use iceage.mp4 as source, it don't find the stream.[URL]..
View 2 RepliesI have success full installation of Flash media server 4 in my linux machine.I am in need of stream the .mp3 file over network.
View 4 RepliesI've two problems with the streaming from a flv-file from a FMS2. First, when I stop the stream (pause) and want to restart it i have a small jump in the stream. Second, how can I detecting the end of the stream/file? Here is my code:
[Code]....
I recently installed FMS 3.5.1 and then upgraded it to 3.5.3 on a Windows 2003 server. In both versions, I can not stream .f4v or .mp3 from a subfolder. The .flv file plays fine. I used the default configuration settings, sample .f4v and .flv files provided by the installer. I used the sample player in C:Program FilesAdobeFlash Media Server 3.5samplesvideoPlayer as the client.
[Code]...
I have a FMS set up and when I do a normal video stream I use an address like [URL] So I want to make it so that I can stream from sub folders in the VOD file like [URL] This doesnt seem to work.
View 13 RepliesCurrently we have a swf file application that runs in a browser and takes the live video stream from the camera on the computer and streams a live sorenson spark stream to the fms 3.5 server.
Question is: How to live stream vp6 from the browser/swf file on the camera computer, instead of the sorenson spark. (We seem to be stuck only on sorenson spark).
Flash Media Server (finally) supports multicast video. But documentation about this feature is about multicasting live video
View 1 RepliesI watched two videos by Jody Bleyle:
1. [URL]
2. [URL]
In Video 1, she shows how to stream a single file. I've done everything to the letter on this video, however, when she uses the videoplayer to reference the livestream.f4m file, there is none. I've actually checked the folder location(apploications/livepkgr/streams/_definst_/livestream and there are files in there (.f4f and .f4x), but no .f4m which is the file she references in the video player.
In Video 2, she shows how to create a multi-bitrate video stream. Using the manifest packager and creating a .f4m and .m3u8 package and placing it in the webroot folder. Here is the contents of my liveevent.f4m file:
[Code]...
I am using actionscript engine to upload a file, the engine will select the file and send the file over network thru HTTP POST command, the document says the POST message is like:[code]In server side I have a C++ program listens on port 80 and parse the POST message. I only want the file name and file data. How to decode the file data using c++, is it base64 encoded and is there a library can do it for me? I want to decode the binary, and write it to the file.
View 3 RepliesI have created one as3 application to capture and save the mic or web cam in red5 server by streaming.I am also changing the file name by passing argument in publish() function.How I can check whether the any other file with same name already exists in the server or not.I want to maintain the file name sequence in the server... Example: if the file name "xyz.flv" I sent through publish() and the xyz.flv already there in the server, then it should take the sequence of the file name like "xyz-1.flv" or "xyz-2.flv"...like that.
View 1 RepliesDoes anyone know how to get a script of some kind to grab a picture from a live stream and save it as a JPG file?
In this way a cron job can tricker the script and thereby grab a picture fx every 10'th minute and the picture can be shown on a website so people that are not attending can have a look into what is happening in the live stream.
I'm trying to append a live stream to an existing file, but I cant figure out how to open the existing file and then append the live stream. This is server side as well.I know I need to open the existing file using stream = stream.get("file"). but I don't understand how to associate stream with the live stream coming in.
View 8 Repliesclose another live stream B if opening when stream A is closed? Does FMS support this kind of logic?
View 8 RepliesOnly just getting started on this whole domain of learning, so go easy!If I set up a P2P video/audio chat (similar to the sample VideoPhone thing on the Cirrus site), can I get the stream from both parties to send to a server at the same time so that I can record it? If so, would I have to use a FMS to stream it to and perform the recording (and if so which version could I get away with)? Are there any (preferably free, or just tutorialised) solutions for the recording side of things?
Currently it seems like the only option for doing the P2P thing is to use Stratus/Cirrus unless I use FMS4 Enterprise.
how effective this kind of situation can be, in terms of quality of the stream and recording? Does any of this make sense?