whats the difference between stratus and flash media server 4 - actionscript-3

I want to create a simple video chat application using rtmfp the new p2p feature. It's available in flash media server 4 and using stratus, I've only been able to find tutorials on stratus. So my question is if I want to use the p2p feature in flash media server 4 do I have to signup for stratus and use its api or does fms 4 have its own api?

What is your goal? If you need to make just a videochat, you can use FMS only, without stratus. Just connect to server, perform connection accept on serverside, and then you can use publish and play methods of NetStream class. But if you want to perform videochat through p2p, than you do not need FMS (because the main idea of p2p - communication without server), but still you can use FMS for managing clients, and perform video streaming through stratus.

Related

Display RTSP stream in Adobe AIR

I am working on a project that involves displaying video feed from an IP camera using Adobe AIR. I know that Flash does not have a native support of RTSP protocol and therefore I am evaluating all possible routes I can take to solve this issue:
Use Adobe Media Server to convert incoming RTSP stream to RTMP and then use Flash API (NetConnection & NetStream) directly.
Write a custom class to fetch, decode and display the stream in adobe AIR. [I am unable to confirm if this is possible due to insufficient info on the net]
Give up on RTSP and instead fetch JPEG/MJPEG sequence of images and display them in AIR relatively easily but with doubtful live performance. [due to JPEG/MJPEG refresh interval of IP camera and same interval separately in AIR]
Use DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras to process the JPEG/MJPEG stream, create a virtual Webcam device (the filter does this automatically) and then use Camera class to display the video feed in AIR.
Use webcam 7 - A software designed to handle RTSP, JPEG/MJPEG and other stream protocols for many camera brands/models. It installs a driver in system that creates a virtual camera, and that all the other applications can then use as a normal webcam.
Unfortunately this software is buggy and often becomes unstable (could be with my particular camera model only though) and might even crash.
Are there any better, easier options that might not require any third-party software?
EDIT:
In case anybody else bumps into same problem:
As suggested by Rudolfs Bundulis, I decided to write a NativeProcess (ANE) that uses FFMPEG to fetch the RTSP stream data, transcode it, and feed it to Flash player.
You might want to look at these for more specific steps:
http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/
https://www.youtube.com/watch?v=6N7eN9wvAGQ
Take the route described in option 2 - write a Adobe AIR native extension (ANE) that uses FFMpeg to handle the RTSP stream, decode it and pass the RGB data back to AIR for rendering. The hardest part would be compiling FFmpeg if you need cross platform functionality, however, since you mention DirectShow that is Windows only, then I assume you are bound to Windows. Zeranoe provides prebuild FFmpeg libraries for Windows, Stackoverflow has a lot of topics on decoding a stream using FFmpeg and then all you need is a callback to AIR and you're good.

Available Functions on FMS Server

I have a chat client that uses FMS server. I do not know how many more functions are on FSM that I can utilize. There is 0 documentation for the available FMS server. Is there a way to browse or query all the available features/functions of Adobe FMS server?
Also some of the chatters crashes my flash play remotely. I think, they are just overflowing the buffer? Is it the case? or how anyone can remotely crash my flash player? This only happens if I kick any of the specific user using the command /kick user.
FMS has pretty good doc at FMS API. But functions you want depend of who implemented server side for you.
Crash might be caused of your chat implementation. You need to find initial developer to fix that.

Converting an application from Unity3d to Flash

I am attempting to convert my Unity3d game to flash but am experiencing trouble with comments. Because of the socket trouble, I am trying to use Json and Post, but I don't know where to start. I saw this
Java server- client socket communication
but it incorporates sockets.
This is for the user client, but I also need to redo the server side. I believe I need a web server to get the Json strings and return the appropriate response.
Am I doing this right, or is there something I am overlooking?
This may lessen the amount of work quite a bit if you are interested in using an API. Smartfox is an awesome Client API / Multiplayer server tool that can increase output time as well as allow you to implement efficiency code to improve server stability.
It works for both Unity3D and flash.
http://www.smartfoxserver.com/
Addressing your main question I believe you would need a server to effectively use Json and be able to communicate to the clients however this is where smartfoxserver can come in handy. I have not had much experience in the flash multiplayer programming however smartfox is a great tool and I used it to make multiplayer programs in unity3d.
Hope this helps!
Mitch

How to customize stream protocol to flash client

I need to create a custom communication between server and flash client. For example I want to write UDP protocol using error correction. It is much faster than TCP and does not suffer from routing problem. Unfortunately I absolutely cannot think of how to replace the existing way:
_stream = new NetStream(_connection);
_video.attachNetStream(_stream);
This encloses all communication and I do not have a control over it. I understand that I can use appendBytes, but not sure what exactly to pass to this function. I can do anything on the server side. My video is H.264 and audio is ACC.
Unless it's a AIR application, you can't. It's native API which already handling application layer (OSI model).
If you want make your own, using flash.net.DatagramSocket class (available in AIR 2+) for your application layer and NetStream.appendBytes for audio/video stream decoding & playback (feeded with FLV/F4V chunks)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/DatagramSocket.html
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#appendBytes%28%29
I was betting on UDP, but never got it working in Flash. I'll explain it:
In your browser, there is really no way to make usage of UDP!!! Flash applications there run in a sandbox, which only talk TCP!
Air is used for desktop applications, which after compilation run in a desktop wrapper, which itself has direct access to the socket and other possibilities.
That's it! You have to use TCP.

Is it possible to Recorder an Audio from a Web page without Flash Media Server

a lot of the people who talk about Record an Audio from Web Page said that you have to use Server Side Applications Like RED5, Wowza, Adobe Flash Media Servers.
But Is it possible to record an audio from client side Flash Only?
Yes, it is possible to record an audio from client side Flash Only.
in the modern versions of Flash you can do that, it will save the audio first in your memory and then you can upload it to your server without need for a Flash Media Server.
and here is an example of that : http://fms.denniehoopingarner.com/barebonesRecorder/
and i configure the client version here http://alkobair.com/trial/ and it works Great.
My Question is :
Do you know another Client Side Flash Audio Recorder?
Seems like it's possible with flash 10.1. See the "Look, Ma - no server!" section in this page of recorders examples. There is some source code there. too.