I have access to a flash media server on a CDN.
I want to allow people to easily connect to this server. Currenty, they need to an additional software to connect to the FMS.
It would be nicer if they could just connect to the server with their browser.
So I assume I need to create a SWF file and connect from this file to the FMS (with Actionscript).
The end result would look like the demo of the jquery webcam plugin, only that the SWF file would establish a connection to the FMS and stream the video to the FMS.
http://www.xarg.org/project/jquery-webcam-plugin/
I need to show the dialog to accept a webcam connection and then connect with and stream the video to the server.
Take a look at Chapter 4 of the FMS Dev guide.
In outline you need to do the following:
create a NetConnection to the FMS
create a NetStream using that
connection
attach the camera and microphone to
the stream (this will automatically
trigger the webcam dialog)
publish your stream
You will need to add various listeners to pick up on the events such as checking that you have successfully connected to the FMS before creating the NetStream and then starting the recording, etc.
Sample code:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://myServerName/nameOfFMSapplication/");
var ns:NetStream = new NetStream(nc);
camera = Camera.getCamera();
mic = Microphone.getMicrophone();
ns.attachAudio(camera);
ns.attachAudio(mic);
ns.publish("theName ofThisVideoIs", "record");
NB to stop publishing the stream : ns.publish(false);
One of the key things is managing each stage with listeners so that you are sure you are connected etc before you proceed onto the next step. Good Luck!
Related
i would like to stream Dron video from the controler (Dji mavic air 2 with a RC-N1 controler) via RTMP direktly from the controler/my Phone to my PC wihl i am in the fields without having any internet conection or an extra Network. Is that some how possible?
First, you still need a network. You can create a hotspot using a computer (laptop) or a device that connects to the RC-controller (phone, tablet).
Secondly, you need an RTMP server that will be located in this network. As a quick example, I can recommend MonaServer2, it is easy to install and run.
Thirdly, you need someone who will "listen" to the server when the stream comes to it. For example, you can use a VLC player. Launch it and specify RTMP stream as a source.
So, you start the RTMP-server, let's say it is located at 192.168.0.1:1935. On your device connected to the RC-controller, using the standard DJI-Fly application or your own app developed using Mobile SDK, select the option to start streaming, specify the address: rtmp://192.168.0.1:1935/live. Next, launch VLC-Player, select File->Open Network Stream and type rtmp://192.168.0.1:1935/live in URL field. Now you will be able to watch live-stream in your VLC window.
This is the fastest and easiest way I can recommend.
Also you can take raw h264 frames from camera, send them to decoder and do whatever you want. If you need some more info about it feel free to ask. Hope it helps!
I am streaming video from an IP camera to Youtube using the restreamer software (https://datarhei.github.io/restreamer/) running on a Raspberry Pi 4.
Actually everything works as well. But when the stream is interrupted (for whatever reason), a new livestream is created only when I click on the "Dismiss" button in Youtube Studio.
But since I want to start the new stream automatically, I'm looking for a way to execute the click on the button (or the associated command) via the Youtube API.
How can I execute this?
I will answer my own question because I found the problem description and a solution in another forum: https://obsproject.com/forum/threads/stream-didnt-show-error-or-load-to-youtube.130897/
Something has changed on youtube in the last few days, but the solution to manage a real streaming reconnection is this: from the youtube control room from the manage icon, you need to create a scheduled streaming. Start the encode on this stream and everything will work fine. If the connection drops, youtube will say streaming offline; when the connection is re-established, streaming restarts.
I want to broadcast existing videos to multiple users through wowza...
Suppose I want to broadcast any 1 uploaded video (in wowza server) to my multiple users? so how can I do that.. can wowza call any API to start streaming in other users devices? Means when I started streaming video from my application then it should start in other devices also through wowza API.
Are you talking about broadcasting (streaming) an MP4 file as a simulated Live stream (playout) or as Video On Demand (VOD)?
Obviously you cannot force devices to start playing a stream. That'd only work if you develop an App that can listen for commands and trigger playback accordingly. Wowza doesn't have such an App, nor any built-in features that can do this.
If you want devices to access a stream on-demand you can simply upload the file to Wowza's content folder. If you want to have a programmed playout, like a TV channel, then you can check out this article: https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
(the source code of the plug-in that is used in that article is available from https://github.com/WowzaMediaSystems/wse-plugin-streampublisher)
As from your Question, You can broadcast stream successfully and you might have used Wowza Go Coder SDK for doing it.
On Broadcasting live stream, broadcasted videos stored in CONTENT directory which is inside of Stream Engine installation directory structure.
You can find all the streamed videos in it.
Now, You want to broadcast particular stored video then you can do it by loading specific URL for that video. Broadcasting for that Video is not possible but, you can play that particular video as below which will be accessible to all your application users :
In IOS, Link or URL for Videos stored in CONTENT directory is as below :
http://[Host Address]:[PORT]/vod/mp4:sample.mp4/playlist.m3u8
rtsp://[Host Address]:[PORT]/vod/sample.mp4 (In Android)
Here, sample is the name of your Stream. You have to broadcast live stream video with different stream names so that all videos are accessible.
In this way, you can play stored live stream videos.
I am new to Live streaming of a data. I have been exploring in a web about how to live stream a Video. Actually I am an iOS developer and I want to develop an App that streams video.
I am clear about the fundamentals of live video streaming. I came to know that I will be need a Streaming Media Server which will feed the stream to the viewer. I also came to know that viewer has to have a player which decodes the data and synchronize the audio/video stream.
Now, Wowza is a kind of Streaming Media Server which is recommended. But, I have following questions..
(1) Why Media Server? Why we can't have our own Media server? What actually Media Server do that makes its role necessary ?
(2) In my App, I will have to integrate a library for encoding and feed to a streaming server like Wowza. But, how it would be fed to the streaming server ?
(3) How will my server communicate with a streaming server like Wowza ?
(4) How Wowza will feed the stream to the receiving side i.e. the user having an iPhone and needs to see a live stream.
(5) What should be at the receiving side. What will decode the stream and will play the stream to AVPlayer ?
Guys, I need to develop a streaming App with better quality. So, better I first understand the flow of data and then start.
It would be great if someone gives a graphical representation of the data flow.
Thanks a lot in Advance !!!
Let me quickly add my understanding to your questions:
1a. Why Media Server? ..
You could write your own software for distributing the stream data to all the players as well. But in that case you would need to implement various transport protocols and you would end up implementing a fairly big piece of software, your home grown media server.
1b. What actually Media Server do to make its role necessary?
A way to see the role of the media server is to either receive the live stream from a stream source and handle the distribution of this stream to probably many-many other players. This usually involves taking the data out from the source transport protocol and repackage it into one or more other container format or transport protocol that the clients favour. Optionally the Media Server can change the way the video or the audio is encoded (transcoding), or produce different resolution and quality streams and provide the players with the list of available qualities in the form of a manifest file (e.g. m3u8 or smil file) so they can do so called adaptive streaming.
An other typical use-case of Media Servers is serving non-live video files to players from disk, as well as recording live streams, and so on. If you look at the feature list of popular media servers, you'll see that they are really doing many things, so practically this is something you probably want to get out of the box and not implement your own.
In my App, I will have to integrate a library for encoding and feed to a streaming server like Wowza. But, how it would be fed to the
streaming server?
You need to encode the video and audio with a particular codec (such as H.264 for video and AAC for audio), then you need to choose a suitable container format to put these streams into (e.g. MPEG-TS) and then choose a transport protocol to push the stream to the server (e.g. RTMP). Best if you google for tutorials to see how this looks like in code.
How will my server communicate with a streaming server like Wowza?
The contract is basically the transport protocol, one example is using RTMP protocol to connect to Wowza and publish the stream to it. These protocols cover all the technical details.
How Wowza will feed to the stream to the receiving side i.e. the user having an iPhone and needs to see a live stream.
The player software will initiate the communication with Wowza. This is again protocol dependent but in case you are using HLS, the player will use the HTTP protocol to find out the URL of the consequtive video chunks that it will progressively download and display to the user.
What should be at the receiving side. What will decode the stream and will play the stream to AVPlayer ?
It's not clear whether your app under development is the broadcaster side or the player side. But generally on the player side you need to find a library that is able to pull the stream from the media server with the protocol/transport/codec you are using. I am not familiar with this part in iOS, I only have experience with players embedded in websites.
I am not going to draw this, but imagine 3 boxes connected with arrows and that's the data flow. From encoder to streaming server and finally to player. That's it I guess.. :-)
I'm trying to play a live stream that is being sent out by a Wowza server, we are using RTMP to handle the streams. We have an equivalent for that works on android and the way they do it is by connecting to the server via the url and 2 parameters to identify the actual stream to play and if you are allowed to see the live video. After the connection is attempted, the server does a call back sending an integer for a check to see if the user is logged in. Once the check has passed, the video is played.
I have no idea how to handle the call back or how to properly set up the connection so that it takes both parameters and the url.
One big issue is that the Wowza server was created by a third party that we are no longer in contact with, so i have no idea on how the actual server is set up.
Any suggestions would be greatly appreciated
I recommend a few steps to start with:
Determine how the Android app actually works. Is the the server you speak of to which it sends the two parameters the Wowza server? If so, it is probably a custom plugin.
Get access to the server, so that you can configure it for iOS streaming.
You'll also need to check out some documentation, http://www.wowza.com/forums/content.php?3-quick-start-guide, http://www.wowza.com/forums/content.php?217#cupertinostreaming
Once you have a better understanding of the problem, the Wowza folks are very helpful at http://www.wowza.com/forums.
Good luck!
there is no need to android apps etc. Wowza is supporting the output which can be played # ios, because of the ios cant play flash, then it cannot played rtmp or rtsp . However Ios can play the stream which is like http: // myWowzaServer/myApplication/myStream/playlist.m3u8 ...
For better config detail please visit the
http://emrekaratasoglu.com/php-freelance-watch-wowza-live-stream-apple-ios-mobile-phone/