I would like to get the NetStream width/height when receiving a RTMFP stream. This is important because the video component needs different measures when, for example, the user receives a 4:3 or a 16:9 stream.
Unfortunately, the onMetaData callback for NetStream does not work as it does for RTMP streams.
Is there a workaround?
You might try using different ports and see if the onMetaData gives you anything different. I believe the 3 main ones are: 1935, 443 and 80.
The following link can give you further documentation on configuring your server:
http://help.adobe.com/en_US/flashmediaserver/configadmin/WSdb9a8c2ed4c02d261d76cb3412a40a490be-8000.html
Related
Running into some issues using webrtc with an sfu. Occasionally we run into problems where the video track on an incoming stream is muted: true and readystate: "muted". Those are read only properties so I know I am not setting them anywhere. Are those properties determined by the browser (chrome) or are they explicitly set on the stream/track by the sfu? Any help is welcome, but I'd love to see some documentation somewhere about this. For reference, the sfu we are using is Jitsi Video Bridge.
I'm streaming data from a server and passing it into a net stream in data generation mode. I'm successfully wrapping H264 and PCMU to be played back through NetStream, however I need to be able to capture this output from the video display it's on and store it in an image. When using an RTMP server, I'd configure it to send an RtmpSampleAccess command, with true,true for audio and video access allowed. When using RTMFP I'd do the same, send() a RtmpSampleAccess true,true from the peer to allow access.
I believe I need to send in an FLV tag for a script data object to represent the RtmpSampleAccess command, however I can't find any information on what the format of that tag needs to be. I've tried using the OSMF FLVTagScriptDataObject with the objects set to the following combinations:
["|RtmpSampleAccess", true, true];
["|RtmpSampleAccess", [true, true]];
And various attempts at guessing the naming for object parameters (though looking at the protocol docs, I'm not sure there is one).
Could someone out there help me here, would be much appreciated.
Where you put your Netstream into Data Generation mode you add a second Play command. The second one simply plays "a blank" and for some reason this overrides the security error.
ns.play(null);
ns.play(""); //works to avoid all security errors
ns.appendBytesAction(NetStreamAppendBytesAction.RESET_BEGIN);
Then to draw just setup a button to run the draw_VideoFrame function when clicked, or try real-time drawing with something like below (using enterFrame):
vid_Obj.addEventListener(Event.ENTER_FRAME, draw_VideoFrame);
and then create a function like this example.
function draw_VideoFrame (e:Event) : void
{
vid_BMD.draw( vid_Obj ); //draw into a BitMapData variable
}
I am using SimpleWebRTC to create a video chat room application.
One of the requirements is, a peer machine that has no microphone and webcam, should atleast be able to hear and see the video of other peers.
Is it possible to do?
I tried this using constraints{audio: false, video: false} in regular webRTC and it works on a machine that has no microphone and webcam.
How to accomplish this using simpleWebRTC?
Thanks!
I am not familiar with simpleWebRTC, but I use PeerJS. To answer even if you don't have a webcam or mic, all I do is I answer with 'null' instead of the stream.
So in Peerjs instead of
call.answer(window.localStream);
you can say
call.answer(null);
Try to find the code in SimpleWebRTC where the call is made or answered and try this.
I've posted a similar question about the more general case, but this question deals specifically with RTMP.
We have an Adobe AIR app written in AS3 that can view live video streams from other parties. That being said, when trying to call BitmapData.draw() on one of those remote video streams (technically we're calling ImageSnapshot.captureImage()), we're getting a 2123 error - a security sandbox exception. I've seen a lot of people refer to a real simple configuration in the AMS that will allow this to work for RTMP streams, but they keep posting broken links, links to posts that only vaguely mention this configuration, etc. The one thing I did find is something that I'm having trouble applying:
http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7ec3.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7fcb
To make the above work, I've tried setting audioSampleAccess and videoSampleAccess both to "/", but to no avail. On the AMS, in Application.xml, I've set these configurations:
<FolderAccess>true</FolderAccess>
<AudioSampleAccess enabled="true">*</AudioSampleAccess>
<VideoSampleAccess enabled="true">*</VideoSampleAccess>
I've also seen references to setting up a wide-open cross-domain policy file, but I've seen people emphasize that it's not necessary, and I don't see any clear mention of where on the server that policy file needs to be. I have, however, started setting NetStream.checkPolicyFile to true, and I have placed a cross-domain policy file in the root directory of the website itself (as opposed to the AMS).
Please don't just give me another link, unless it's to a quick, clear explanation. How do you configure the AMS to allow people to capture screenshots from RTMP video streams? For the above article, I've tried setting videoStreamAccess and audioStreamAccess both to "/", and even it didn't work. We also need to be able to do this for P2P RTMFP streams, but that's really a different question. Thanks.
I have following FMS code to fix that error in application.onConnect method:
client.videoSampleAccess = "/";
client.audioSampleAccess = "/";
I'm trying to serve up a live stream (ie. completely buffered in memory, cannot access the past) and am having trouble with Expression Encoder 4.
Ideally, I'd like to just stream a bare H.264 byte stream to the client consumed by:
<video id="mainVideoWindow">
<source src='http://localhost/path/to/my/stream.mp4' type='video/mp4' />
</video>
I figured I could stream it to the client just like any other byte stream over HTTP. However, I'm having trouble figuring out the appropriate code required to do (first day with Expression Encoder, not sure how to go about getting the raw byte stream) so nor do I know if it would work in the first place.
An alternate was to use IIS Live Streaming server:
var source = job.AddDeviceSource(device, null);
job.ActivateSource(source);
job.ApplyPreset(LivePresets.VC1IISSmoothStreaming720pWidescreen);
var format = new PushBroadcastPublishFormat();
format.PublishingPoint = new Uri("http://localhost/test.isml");
job.PublishFormats.Add(format);
job.StartEncoding();
// Let's listen for a keypress or error message to know when to stop encoding
while (Console.ReadKey(true).Key != ConsoleKey.X) ;
// Stop our encoding
Console.WriteLine("Encoding stopped.");
job.StopEncoding();
However, I'm having trouble getting the client side markup to want to display the video on Chrome and I haven't seen anything to indicate that it'd work on Chrome (though http://learn.iis.net/page.aspx/854/apple-http-live-streaming-with-iis-media-services indicates how it would work with an iOS device).
Anyone have any insights?
You are trying to consume (with your sencond example) a Smooth Streaming feed (HTTP-Adaptive Streaming by Microsoft) through HTML5, which is not supported.
This could work on iOS devices if you enable the Apple HTTP Live Streaming to transmux the fragments into MPEG-2 Transport Stream. This will also generate an Apple HTTP Live Streaming manifest which than can be called though the video tag.
...I saw that you have the IIS link. The Apple HTTP Live Streaming needs to be enabled on the IIS Server (IIS Media Services). This will work for iOS devices. Quicktime will get into play...