i am building an live streaming website and i am use
1- FMS
2- Apache webserver
i have made the subcriber and i works well .
but i need to build the publisher to allow users to broadcast thier stream from thier cameras.
i have tested a publisher which was build using actionscript and it didn't work untill i have installed the fms on my localhost , but i need a publisher which any user can use in his web browser .
my publisher :
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
connection = new NetConnection();
connection.connect("rtmp:/live");
connection.addEventListener(NetStatusEvent.NET_STATUS,onConnected);
}
private function setupVideo():void
{
//setting up outgoing devices
camera = Camera.getCamera();
camera.setMode(640,480,30);
mic = Microphone.getMicrophone();
//setting up outgoing Stream
outStream = new NetStream(connection);
outStream.attachCamera(camera);
outStream.attachAudio(mic);
outStream.publish("EraMaX-Live");
//setting up outgoing video & attach outgoing devices
outVideo = new Video();
outVideo.attachCamera(camera);
//setting up incomming Stream
inStream = new NetStream(connection);
inStream.play("EraMaX-Live");
//setting up incomming video & attach incoming Stream
inVideo = new Video();
inVideo.attachNetStream(inStream);
//wrap video object
outVideoWrapper = new UIComponent();
outVideoWrapper.addChild(outVideo);
addElement(outVideoWrapper);
inVideoWrapper = new UIComponent();
inVideoWrapper.addChild(inVideo);
addElement(inVideoWrapper);
inVideoWrapper.move(400,0);
//setting up incomming video
}
so my question must i have FMS to publish a stream from my camera to my website ?
If you want to stream live video, you need a streaming server. Not definitely FMS, you also can use Red5, Wowza, or even open source solutions such as RTMPD or RTMPLite.
Related
I'm calling PHP page from my android application using Webview control, but it displaying white page only. my mobile and pc are connected to USB data cable and both are having the same wifi connection. I've used ipconfig command and copied ipv4 IP address in code. I've given all the required permission in manifest file in eclipse.
my android code as follows:
// find the WebView by name in the main.xml of step 2
browser=(WebView)findViewById(R.id.webview);
// Enable javascript
browser.getSettings().setJavaScriptEnabled(true);
// Set WebView client
browser.setWebChromeClient(new WebChromeClient());
browser.setWebViewClient(new WebViewClient() {
#Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
// Load the webpage
browser.loadUrl("http://192.168.2.7/tendersystem/webservice/display_category.php");
I can see ouptput in laptop using above path, but when running in android using datacable gettign white page only in webview control. so, whta's the problem???
If I'm using online url like http://www.google.com , it is displaying properly but ip address doing problem.
I'm working on youtube live streaming for my website.
The concept is simple, I have a stream and I want to go live, for this I'm doing the following:
creating broadcast
creating livestream
binding livestream and broadcast
getting rtmp url
pushing from my media server to youtube given rtmp url
when I'm going to youtube it shows me that the stream status is good: The health is good
then I'm submitting transition change to testing, and when I get broadcast lifecycleStatus it always returns testStarting and from this point I can't run live transition.
Code samples:
$broadcastsResponse = $youtube->liveBroadcasts->insert('snippet,status', $broadcastInsert, []);
$streamsResponse = $youtube->liveStreams->insert('snippet,cdn', $streamInsert, []);
$bindBroadcastResponse = $youtube->liveBroadcasts->bind(
$broadcastsResponse['id'],
'id,contentDetails',
['streamId' => $streamsResponse['id']]
);
$transitionBroadcastResponse = $youtube->liveBroadcasts->transition('testing', $broadcastsResponse['id'], 'id,status,contentDetails');
So my question is if anyone has experienced the same issue and how have you solved it, or if I am doing something wrong. Any help is appreciated.
In addition: when I try to start streaming from youtube interface, even though the stream status is good when I press preview button the start streaming button is always fade and I can't click on it. So maybe this is the youtube issue?
So I got access to the new o365 v2 api and it's working pretty good so far. I am however having trouble accessing any shared inboxes.
Even worse, there doesn't appear to be any error message being returned:
#odata.context = https://outlook.office.com/api/v2.0/$metadata#Me/Messages(Subject,ReceivedDateTime,SentDateTime,Sender,From,ToRecipients,CcRecipients,BccRecipients,ReplyTo,ConversationId,IsRead,InternetMessageId
[value] =
Has anyone ever tried this?
To clarify, this isn't for exchange, but outlook.com
It seems that you were using the delegate-token to request the message from the specific user for the messages in a shared box.
The Office 365 REST API only support app-level token to get the messages from the organization. The delegate-token only could get the messages of the delegatee user.
You can also consider using the EWS to retrieve the messages of shared box as a workaround.
Here is an example for your reference:
string userName = "";
string password = "";
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.Credentials = new NetworkCredential(userName, password);
service.TraceEnabled = true;
service.TraceFlags = TraceFlags.All;
service.AutodiscoverUrl(userName, RedirectionUrlValidationCallback);
FolderId SharedMailbox = new FolderId(WellKnownFolderName.Inbox, "sharedmailbox#consoto.onmicrosoft.com");
ItemView itemView = new ItemView(10);
var results = service.FindItems(SharedMailbox, itemView);
foreach (var item in results)
{
Console.WriteLine(item.Subject);
}
And if you want the Office 365 REST API to support this feature, you can also submit the feedback from here.
Can I know about "Receive Email From Customer by using Windows Azure in my Website"?
Now I'm creating my company website.In this site,I will create "Contact Us" page.
This page will accept Email from my customer.
But this mail cannot not direct reach to my server by using WIndows Azure.
This page I will create with PHP language.
Can I create this function?
And how can I create this page? Do you know how to do this?
The Windows Azure environment itself does not currently provide a SMTP relay or mail relay service. Steve Marx puts together a great sample application ( available for download here) that does the
following:
It uses a third party service (SendGrid) to send email from inside
Windows Azure.
It uses a worker role with an input endpoint to listen for SMTP
traffic on port 25.
It uses a custom domain name on a CDN endpoint to cache blobs.
here’s the code that handles an incoming email:
// make a container, with public access to blobs
var id = Guid.NewGuid().ToString().Replace("-", null);
var container = account.CreateCloudBlobClient().GetContainerReference(id);
container.Create();
container.SetPermissions(new BlobContainerPermissions() { PublicAccess=BlobContainerPublicAccessType.Blob });
// parse the message
var msg = new SharpMessage(new MemoryStream(Encoding.ASCII.GetBytes(message.Data)),
SharpDecodeOptions.AllowAttachments | SharpDecodeOptions.AllowHtml | SharpDecodeOptions.DecodeTnef);
// create a permalink-style name for the blob
var permalink = Regex.Replace(Regex.Replace(msg.Subject.ToLower(), #"[^a-z0-9]", "-"), "--+", "-").Trim('-');
if (string.IsNullOrEmpty(permalink))
{
// in case there's no subject
permalink = "message";
}
var bodyBlob = container.GetBlobReference(permalink);
// set the CDN to cache the object for 2 hours
bodyBlob.Properties.CacheControl = "max-age=7200";
// replaces references to attachments with the URL of where we'll put them
msg.SetUrlBase(Utility.GetCdnUrlForUri(bodyBlob.Uri) + "/[Name]");
// save each attachment in a blob, setting the appropriate content type
foreach (SharpAttachment attachment in msg.Attachments)
{
var blob = container.GetBlobReference(permalink + "/" + attachment.Name);
blob.Properties.ContentType = attachment.MimeTopLevelMediaType + "/" + attachment.MimeMediaSubType;
blob.Properties.CacheControl = "max-age=7200";
attachment.Stream.Position = 0;
blob.UploadFromStream(attachment.Stream);
}
// add the footer and save the body to the blob
SaveBody(msg, bodyBlob, message, container, permalink);
I wish to build an application using which I can record video (along with audio) and also audio (only audio preferably in mp3 format).
From some research I did, I found I need a client app in flash or flex, a RTMP Server (RED5 preferable as its free)
This is the code which I used to get cam working flash.
var camera:Camera = Camera.getCamera();
var video:Video = new Video();
video.attachCamera(camera);
addChild(video);
The problem is, I don't know how to send the stream to RED5.
Also, what do I need to do so that I can store the video according to the user. The website I am creating is in PHP/MySQL and need to have their own videos and audios recorded. I love the way facebook has integrated Video Recording.
Check this: http://www.actionscript.org/resources/articles/615/2/Getting-started-with-red5-server/Page2.html
It explains how to connect and use RED5 and gives you an example.
Here's the exact AS3 code for publishing video from Flash to a media server like Red5, Wowza or AMS:
//init vars
public var nc:NetConnection;
public var ns:NetStream;
//net connection to media server
nc = new NetConnection();
nc.connect("rtmp://yourmediaserver/oflaDemo/instance");
//net stream through which the recording data is sent
ns = new NetStream(nc)
//attach cam and mic to net stream
ns.attachCamera(Camera.getCamera())
ns.attachAudio(Microphone.getMicrophone())
//send the data to the media server
ns.publish("streamName","record");
For just audio comment the ns.attachAudio line .
Flash Player can't encode mp3 sound (it can decode). You'll get sound encoded with NellyMoser ASAO. Speex is also an option. See this answer for more details.
oflaDemo is a Red5 app that supports video recording that's shipped with Red5.
For a (commercial) Flash/HTML video recording solution that supports Red5 and PHP you should check out https://hdfvr.com.
Also, what do I need to do so that I can store the video according to the user.
Just execute a PHP script (from the Flash client) that saves the info in the database. You can use POST or GET to send the video data and sessions or cookies to retrieve the user data.
var video:Video;
var camera:Camera = Camera.getCamera();
camera.addEventListener(ActivityEvent.ACTIVITY, active);
video = new Video();
video.attachCamera(camera);
function active(event:Event):void
{
addChild(video);
camera.removeEventListener(ActivityEvent.ACTIVITY, active);
}