Recently in a BS-based video conferencing system, decided to use open source Fluorinefx.net and flex method to develop, early development is very smooth, including synchronous whiteboard. However, when the real-time video transmission, the original design is that each client can display three video, but to the test on IIS, the discovery State is very unstable, and occasionally can be fully displayed, in most cases, the client always randomly display one or two. The technical documentation of Act
The common operation of byte is usually required in network communication
function probablyWrite Int16,int32,int64,byte Read int16,int32,int64,byte
I do this here, if you need to add it later
Package mynet Import ("bytes" "Encoding/binary" "errors") type NetStream struct {Data []byte
rpos int wpos int Capacity int} func newnetstream (Capacity int) *netstream {a: =
ArticleWhy: When scrubbed videos with seek (), we found that every time we jump to the end of the FLV video (the FLV video uses external loading instead of streaming media ), netstream will be accepted when there are several to dozens of frames different. seek. invalidtime, and then the strange thing happened. The video will not be played any more, but will be stuck in the video. Bai Si couldn't explain his online search. After reading a foreigner's b
Standard Flash Player ACTIONSCRIPT3 statement that plays a flash publish rtmp stream,Netconnection--->netstream--->play--->attachnetstreamThe project, however, has been in a state of stalling.Later added a sentenceNsplayer.buffertime = 0.1;I don't even have a card.The help document says:The default value is 0.1 (One-tenth of a second). To determine the number of seconds currently in the buffer with the Bufferlength property.Unlike actually, I tested n
characters). So we can judge if size = = Buf.length, then continue to receive, and then multiple received results are grouped together. However, the data sent by the exact size of the buf.length error, so the two sides can stipulate that if the data sent is an integer multiple of buf.length, then add "#END" and then send, and the receiver received a separate #end will also indicate a read-in end. 1 classMynetstream2 {3 Public Const intMAX =5;4 NetworkStream stream;5 PublicMynetstrea
.
Netstream class: when loading a video file that will be controlled by ActionScript, A netstream instance is used to represent the video content source. In this example, the video data stream is used. Using a netstream instance also involves the use of a netconnection object, which is a connection to a video file. It is like a channel for video data feed.
Came
segmentation.
Save the site traffic, that is, save server resources to improve load capacity. When the user opens a video, it is likely that the video will not be read, only part of it. If the video is not segmented, users can open the site to all the video data loaded, then the traffic is a huge waste. After segmenting the video we can load the video for a period of time so that the user will see how much we load.
More flexible seek (drag), for a video that does not do any segment
segmentation.
Save the site traffic, that is, save server resources to improve load capacity. When the user opens a video, it is likely that the video will not be read, only part of it. If the video is not segmented, users can open the site to all the video data loaded, then the traffic is a huge waste. After segmenting the video we can load the video for a period of time so that the user will see how much we load.
More flexible seek (drag), for a video that does not do any segment
parts: playback and display.Play
Playback is divided into three steps:(1) Establish NetConnection
(2) create a NetStream
(3) call the play () method of NetStream
Two logical structures in the RTMP specification are established in the first two steps: NetConnection and NetStream. NetConnection represents the basic connection between server applications and clien
code section of the main form, because we need to use network and network stream objects, we must first Add the following important Namespace ):
Using System. Net;
Using System. Net. Sockets;
Using System. IO;
Using System. Text;
Next, add a NetworkStream object to our class to control the stream in the network.
Private NetworkStream netStream;
Add the following code to the constructor of this class to set the clock interval and make the program invi
Using actionscript3.0 scripts to play FLV videos requires collaboration of a series of classes:You need a netstream object to load videos and control video playback;However, the netstream class only processes flow data and does not process data display. Therefore, a video object needs to use netstream data to display videos on the screen.The
exist, the server will try again. In the end, if the email cannot be delivered, the email will be discarded or returned to the sender of the email. This concept is called end-to-end delivery, and it stores the mail in the queue until the mail is delivered. We can find the SMTP discussion from the two RFC. RFC822 describes the structure of the message, including the envelope. RFC821 specifies the protocol for controlling mail exchange between two machines.
The following module uses the TcpClient
If you do not consider the security factor (anyone can connect FluorineFx for video recording without logon authentication), the server does not need to write a line of code, you only need to create a subdirectory under the apps directory as an application, and configure the rtmp Channel in the services-config.xml.
The following as3 code of the flash client is modified from the official Flash AS2 example of FluorineFx (of course, there are many optimizations in the details)
Package {import fl.
Flex, fms3 SeriesArticleNavigation
Index of flex and fms3 articles
This article isVideo chat, conference Development Instance series articlesThe links to all the articles in this series are as follows:Http://www.cnblogs.com/aierong/archive/2008/12/30/Flex.html#sp
1. For simple fms3 and flex applications, refer to my previous article.Http://www.cnblogs.com/aierong/archive/2009/01/09/flex_fms_chat.html
2. PreparationsCreate a new folder test_video1 in the application
)ReceiveSimplest LIBRTMP-based example: Receive (rtmp saved as FLV)The simplest ffmpeg+sdl-based video player Ver2 (with SDL2.0)Brief introductionThe use of ActionScript to process rtmp is very simple compared to using a/C + + processing rtmp. Rtmp's method of establishing a connection is already encapsulated, just call the ready-made interface function. But the disadvantage of using ActionScript to handle rtmp is also obvious-there are few places for yourself to develop. Since flash itself is n
server resources to improve load capacity. When a user opens a video, there is a good chance that the video will not be read and only part of it. If you do not segment the video, the user opens the site to all the video data loaded, then the flow is a great waste. After segmenting the video, we can load the video for a period of time, and we will load the user to see how much.
More flexible seek (drag), for a video that does not make any segments, such as static video files on HTTP servers, we
through the network in synchronous blocking mode.Take a simple console chatbot as an example:Server:
Using System;Using System. Collections. Generic;Using System. Linq;Using System. Text;Using System. Net. Sockets;Using System. Net;Using System. IO;Using System. Threading;
Namespace Server{Class Program{Static void Main (string [] args){Console. WriteLine ("server ");TcpListener server = new TcpListener (IPAddress. Parse ("***. ***"), 9999 );
// Ip address of the serverServer. Start ();TcpClien
Create a full-featured flvplayer
The flvplayer we made consists of the following parts:A video object used to display video images,Three buttons are used to play, pause, and stop a video respectively,And a dynamic text used to display the buffer loading progress.
1. Create three button components, named "play", "pause", and "stop" respectively, and drag and drop one of their instances to the scene stage.
2. Create a video component, drag an instance to the scene stage, and assign its insta
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.