How to broadcast wowza video from one iPad to multiple iPad devices - swift - ios

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.

Related

Cordova ios watch live video streaming ApiRTC

I am using cordova ios app for live streaming. I am able to stream video from iphone but when i try to join stream it never calls remoteStreamAddedHandler function to display streaming video.
I am using cordova-plugin-iosrtc plugin. It also shows status that "someone has joined room" but not calling that remoteStreamAddedHandler where i can append video tag from. It is working fine in andriod phone.
Thanks
remoteStreamAddedHandler event is fired when a remote user has already joined the room and published his stream.
On apiRTC tutorial : 11-VIDEO CALL STREAMING, user only subscribe to available streams (there is no video publish)
You need to have an user connected with tutorial 10-GROUP CALL, this user will publish his stream and subscribe to remote streams.
The tutorial 12-GROUP CALL - ADVANCED shows you an advanced sample where user can choose to publish/subscribe streams.

What is the role of Streaming server like Wowza?

I have been exploring on how to live stream from iPhone. I will have to publish a stream at URL to Wowza server that I came to know. Other thing is that I will require a library for iOS to encode and compress the camera output and will have to send that stream over RTMP protocol to the Wowza server. At the receiving and, there should be a player which can decode, decompress that stream comes from the Wowza to the device like iPhone (a user who wants to see live stream).
My question is, if encoding is done through particular iOS SDK, RTMP has a role as a Protocol, a player at receiving end has a role of decoding, then what is the role of Wowza ? What is its function that makes it very important in the live streaming process ?
I have been searching on the function of a Media Streaming server since 3 days, but I could not understand the exact function of Media Streaming server like a Wowza.
I am desperate to the answer..
Any explanation will be appriciated, thanks in Advance !!!
I actually did a year-long project involving media streaming on iOS and I used Wowza. The role of Wowza is to function as a media server that can receive the video that is broadcast from an iOS device over the RTMP protocol. With Wowza, you have options to send http parameters that instruct the server to begin or stop recording the live video that is being streamed. You also have the option of embedding video players in websites for live view.

What is the major role of Streaming Media Server?

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.. :-)

Wowza Publish the live Stream on Apple HLS demand

The problem is simple. In Wowza when I use a stream file in live mode (so the streaming are published only when requested through RTMP), I'm not able to publish the streaming and get the video streaming when I use the JWPlayer on IOS (so through Apple HLS) so i'm looking for a method for streaming the cams-live on iOS on demand!
I've just started in Wowza so I cannot write Java code to expand the functionality for the moment so be patient.
I've seen this post on stackoverflow, but i can't see the solution, Wowza: Need to stream rtp-live to iphone !

Objective C: iOS: Audio Streaming and Audio Uploading using RTMP

I have to record the high volume sound. It can be upto 60 seconds. The application is already made on flash and the current flash application uses rtmp (red5 server) and streams the recording to the server in real time as FLV. I have uploaded the audio file on server as mp3 from iOS application but this approach is not useful as the volume is very high as mentioned above. So I want to use rtmp (red5 server) for iOS application. I want to ask is it possible that I can record the audio and upload on this server and also can steam from there?
Edit-1: I want to ask that whether Apple can reject the application if we use the RTMP iOS library in our application?
Edit-2: I did some research and found some 3rd party libraries like:
http://www.aftek.com/afteklab/aftek-iphone-RTMP-library.shtml
I want to know, whether it is possible to directly connect from iOS to RTMP server?
Or these libraries use the middle layer approach with HTTP to connect to RTMP?
Example: iOS -> HTTP Server -> RTMP Server (red5)
I will appreciate the help.

Resources