|
Help
How to install and run the haXeVideo server
Featured InstallationIn order to run the haXeVideo server, you need first to download install haXe from http://haxe.org/download. You can then download the latest haXeVideo release from the Downloads section. You'll also have to install the format library to compile haxevideo. Run the following command from the commandline : haxelib install format TestingOnce you have the source releases, run haxe video.hxml, this will compile a server.n and a video.swf file. You can start the server on localhost by executing : neko server.n localhost 1935 You can open the video.html file to display the videos/test.flv file in realtime streaming. Although the haXeVideo FLV server works for all Flash versions, displaying the video.swf requires Flash Player 9, so make sure it is installed. UsagesHere's some code usages about how to perform various commands from Flash using haxeVideo. Code is given in haXe Playing a VideoVideos are stored by default in the ./videos/ folder relative to the place the server is running. In order to play a video you need first to connect to the server by using a flash.net.NetConnection and then create a flash.net.NetStream . You can start playing the video by using the ns.play("myvideo.flv") command. You can pause with .pause(), seek with .seek(absoluteTime) and stop with .stop(). Recording a VideoIf a webcam and/or a microphone are connected, it's possible to record the audio/video stream sent by the FlashPlayer into a FLV file. First you need to connect to the server and create a stream. Then you can link the NetStream to the camera with ns.attachCamera(flash.media.Camera.getCamera()) and to the microphone with ns.attachAudio(flash.media.Microphone.getMicrophone()). You can now send audio+video data to the server by calling ns.publish("record.flv") which will create ./videos/record.flv file. Live StreamingIn order to live stream some published data, you need first to give the stream a shared by calling ns.publish("record.flv","sharedName"). Then, from another client or NetConnection/NetStream pair, you can connect to the live stream by calling ns.play("#sharedName") (the name of the shared stream prefixed with a sharp char in order to tell that it's a livestream). You can pause/resume a live stream but you can't seek it. MetadatasMetadatas present in the FLV file are transmitted to the client reading the stream. In Flash9, they can be intercepted by setting the ns.client field. Sending live dataOnce you have published a live stream, you can send live messages by using the ns.send command. For example ns.send("onMetaData",{ hello : "World" }) will be similar as if some metadata was found in the FLV. Shared ObjectShared object is a persistent storage that can be used for storing some informations on the server. There is only untested protocol support for it right now, so it's not yet fully implemented. FLV IndexingWhile seeking into a FLV, haXeVideo currently reopen the FLV file an browse through it to find the matching keyframe. This could be done faster by creating and cashing an FLV keyframe index but this will be done in next version. TroubleshootingIf the player can't connect to the server, try allowing access from the SWF by using the Flash Settings Manager. By default, the server is running on localhost, which means it's not available for access from other machines. Please change it in both server.bat (or the neko command you're running) and video.html (two times) with your network IP (such as 192.168.0.1) and open the port 1935 of your firewall in order to make the server accessible from the network. |
if you are having problems getting your client to stream from the server, with an 'objectEncoding error' returned by your SWF file, make sure you change your NetConnection object to use flash.net.ObjectEncoding.AMF0
eg:
fwiw my flash install asked for access to 'local' instead of 'localhost'
So I copied the video.html and video.swf to my localhost webserver. And it worked.
Thanks.
Can I organize live streaming not from a client web-camrera, but from a local process ( ip-camera+mencoder ) ?
whats the requirements besides haxe compiler? i want to use it on debian machine, do i only need to instal neko? or do i have to install red5 to? please enligth me...
You need neko to run haxevideo.
...no need for red5.
first I have to say GOOD JOB guys but... sorry I try running HaxeVideo? under linux (ubuntu Karmic Koala 9.10) but nothing happenned :(. I'm pretty sure i made a mistake. I've followed instructions : - I've installed Haxe and neko and they work (I tried the haxe tutorial and it works).
What's going wrong... If somebody can help me. So thanks you very much guys and again good job and sorry for my bad english ( I'm French ;) ). SincerllyHey, I just installed it and it worked. angelamalice, you need to copy video.{html|swf} to you regular server, e.g. ~/public_html, and access it there (starting apache or other httpd server) using regular port 80 (or whatever you have configured). The 1935 is only for rtmp protocol.
Btw, I am using latest svn version - the older 1.1 version did not work for me for flash 10 - it is a known bug (look for "Overflow error in haXe Video Server"). Everything works for me - except "View Cam", but maybe I don't know how to use it... I get "Connection succeeded", then "code: NetConnection?.Connect.Close"
I run neko server.n localhost 1935, then I get:
Starting haXe Video Server on localhost:1935
I have my video.swf stored in a localhost site made with apache (xampp by the way), try to play the test video and only get: "NetConnection?.Connect.Failed", and in the cmd window I get:
Called from haxe/io/Input.hx line 230 Called from format/Rtmp.hx line 126 Called from hxvid/Client.hx line 604 Called from hxvid/Server.hx line 36 Called from hxvid/RealtimeServer?.hx line 283 Called from hxvid/RealtimeServer?.hx line 142
Does someone know what I'm doing wrong? I had followed every step we have here.
Guy, you made a crazy piece of code, thanx sooo much.
Same issue as dark6.metal here.
Extremely simple and extremely powerful. Sure teaches the Red5 guys how good software is done.
Hello, sorry my english, Can you give me some idea about a way to stream from a Android stmartphone to the haXeVideo server?
I testet 5 or 6 flash streaming servers and haxevideo is just fantastic. It works as promised and here one can find helpful configuration details.
I would like to ask though, whether anyone has a working example of using flowplayer with haxevideo, google says nough about it.
I tried to fix it myself tweaking the examples from flowplayer site but I only succeded in connecting to server (I see connect msg) but I cannot start playback as it waits for data that does not come.
I tried the video.html and it works.
Anyone any hints (maybe I need other flash player ?)
Best,
wAnt
@dark6.metal @Aupajo I had the same issue. Looking around the issues section in this google code page I found that it was becasuse of the format install. I used "haxelib install format 1.13" and recompiled the aplication and everything went fine.
Is it possible Video Conference (with Webcam) between 2 clients connected to the server, but the server only manage the IP to able to connect the 2 people? The video streaming don't pass throw the server, so no a lot of bandwidth required on the server.
Red5 do it?
Thant you.
same issue as dark6.metal and Aupajo, too
yeah I found, changed to flash player 9 and did work.
Same here, only works with flash player 9. With 10, you get Overflow. Hope this can be fixed. I'm something of a programmer, I wouldn't mind taking a shot at it, if I had some clue how to get started.
A tutorial how to create a rtmp server from scratch would be awesome. After that we would be able to understand and expand the server !!!