Build Periscope in 10 Minutes

November 30th, 2015 by Chris Allen

Create_header_2

With live streaming becoming increasingly prevalent in 2015, developers are focused on creating applications to address the public’s fascination with streaming media. Periscope is the prime example of such an application and the sheer size of Periscope’s user base and class-leading engagement metrics validate its dominance in the space.

But what does it take to build a live streaming and communication platform such as Periscope, with the capability to broadcast to one hundred thousand or even one million subscribers? What if I told you that you could build a live streaming application with Periscope-like functionality and scalability in just 10 minutes?

Before we created Red5 Pro it took some serious effort to build this kind of server-side infrastructure and tackle the high level of complexity to build a native Android and iOS video encoder/decoder that works with the server. We saw this trend of a new kind of mobile app that connects people in real-time, and we saw these early adopters cobble together inefficient software wasting tons of time and energy. We couldn’t allow this to happen anymore, so we decided to make it easy for developers. With Red5 Pro, you truly have the ability to build the guts of the next live streaming phenomenon in a matter of minutes, and here’s how:

Let’s first start with all the pieces, and what you would need to build if you were to do this from scratch.

The Fundamentals

1. Publish from the mobile client:

  • Access the camera

  • Encode the video

  • Encode microphone data

  • Negotiate a connection with a media server

  • Implement a low-latency streaming protocol for transport

  • Stream the data to the server

2. Intercept with a media server

  • Intercept the stream

  • Relay to other clients

      and/or

  • Re-stream to a CDN (adds latency)

  • Record the stream (optional)

3. Implement client side subscribing:

  • HLS in WebView (even more latency)

and/or

  • Setup connection with media server

  • Implement streaming protocol

  • Mix the audio and video

  • Decode video/audio

  • Render video and play the audio

 

*Note-this is actually a simplified list of all the tasks involved. Try doing this on multiple threads and getting it to perform well; it is complicated! It’s truly a rabbit hole that most developers don’t want to venture down. Given the awesome tools and libraries that exist for us developers, we thought that it was ridiculous that an easy-to-use and extensible live streaming platform just didn’t exist. That’s why we built Red5 Pro.

 

Red5 Pro to the Rescue

Let’s uncomplicate this. The Red5 Pro Streaming SDKs provide what we think is an intuitive and flexible API to remove the complexity while retaining tremendous control if you need it. Let’s take a look at the classes our SDKs provide. (note that they are the same on Android and iOS).

Graph

Let’s step through an example using these classes, piece by piece.

The Publisher

R5Configuration:

Red5Pro_tools

The first step is to create an R5Configuration. This class holds the various data used by your streaming app. It contains things like the address of your server, the ports used, protocols, etc. In this example we are connecting to a server running at 192.168.0.1 on port 8554 via the RTSP protocol. This Red5 Pro server has an app called “live” running on it, and that is what we want to connect to based on the context name. And finally we are setting the buffer time to half a second.

iOS

 

Android

 

R5Connection:

Red5Pro_links

Next, you create an R5Connection object, passing in your configuration. This establishes a connection to the Red5 Pro media server.

 

iOS

 

Android

 

 

R5Stream:

Red5Pro_stream

Now you create a stream object passing in the connection object you just created. Note that the R5Stream is also used for incoming streams, which we will get to in a bit.

 

iOS

 

 

Android

 

R5Camera:

Red5Pro_camera

Next we create a camera object and attach it to the R5Stream as a video source.

 

iOS

 

 

Android

 

 

R5Microphone:

Red5Pro_microphone

Then we create a microphone object and attach it to the stream as an audio source.

 

iOS

 

 

Android

 

 

R5VideoView:

 

Red5Pro_view

While it’s not a requirement to publish a live stream, we find it useful to provide a preview for the user of their video being streamed from the camera. This is how you set that up.

 

iOS

 

 

Android

 

R5Stream.publish():

Red5Pro_publish

Finally the last step for the publisher is to publish the stream using a unique name that the subscriber can subscribe to.

 

iOS

 

 

Android

 

The record type parameter tells the server the recording mode to use on the server. In this example we are setting it to live, meaning it won’t record the stream on the server.

 

Here are your other choices.

R5RecordTypeLive – Stream but do not record

R5RecordTypeRecord – Stream and record the file name. Replace existing save.

R5RecordTypeAppend – Stream and append the recording to any existing save.

If you compiled and ran this app with it configured to point to a running Red5 Pro server, you would be able to see it running in your browser. Open a browser window and navigate to –> http://your_red5_pro_server_ip:5080//live/streams.jsp to see a list of active streams. Click on the flash version to subscribe to your stream.

 

LiveStreaming.png

The Subscriber

Now that we’ve built the publisher we have established a live stream being published to the server. Yes, we did see the stream in Flash, but in order to consume that stream on mobile we need to build the subscriber client. Let’s dig into that now.

 

R5Configuration:

Red5Pro_tools

Just as before, we setup a configuration object holding the details of our connection and protocols.

 

iOS

 

 

Android

 

 

R5Stream:

Red5Pro_stream

Then, like in the publisher, we set up a stream by passing in the configuration into the constructor.

 

iOS

 

 

Android

 

R5VideoView:

Red5Pro_view

This is the step where things deviate just a little from the publisher. We still set up an R5View, but this time we want to use it to display the incoming stream

 

iOS

 

 

Android

 

 

R5Stream.play():

Red5Pro_play

Finally, we tell the stream to play by using the play method and passing in the unique stream name that the publisher is using.

 

iOS

 

Android

 

Voila, you can now build your own one-to-many live streaming experience, all within minutes with the help of Red5 Pro. What do you think, are there ways we could make this even easier? We love hearing feedback, so let us know in the comments or email us directly. Happy Coding!

, , , , ,

Release Notes: New iOS Streaming SDK with Critical Fixes for A9-based devices

November 24th, 2015 by Jamie Maynard

 

Good afternoon!

A new iOS SDK is now available: it includes a critical fix for the latest iOS devices which covers the iPad Pro, iPhone 6s and iPhone 6s Plus. This build also involves a few updates with new examples, including how to create a custom R5VideoSource and how to publish using the Swift language. Full release notes are below.

Release Notes: iOS SDK v0.8.41.1-

iOS streaming SDK has been loaded up on Red5Pro.com.

Updates in this SDK include:

- fixed a memory leak in publishing
- fixed issue with new iOS devices (A9 chip) creating bad streams and microphone errors
- support for image capture during subscribing to a stream
- support for publishing from a custom video source

Updated examples in https://github.com/red5pro/streaming-ios include image capture and custom video source, in addition to a publishing example written in Swift

We look forward to seeing what you build with this. As always, please let us know if you have any questions.

-Jamie

Infrared5 Selected As A Top Boston App Developer By B2B Research Firm Clutch

November 20th, 2015 by Jamie Maynard

Screen Shot 2015-11-20 at 11.29.23 AM

 

Today Clutch published its first report highlighting Top Boston App Developers and we are extremely pleased to have been included on this list. It’s an honor to be included among these top app development shops, and as we transition our focus to Red5 Pro, we look forward to collaborating with all of them as well by helping developers create awesome live streaming experiences. Check out Clutch’s post on Infrared5 and the other winners here:

Here’s what Ryan Stevens, Senior Analyst at Clutch had to say about the mobile app development landscape in Boston and New England more generally: “The Boston and Greater New England Area continues to become a more competitive development landscape, but many of these firms have been longstanding staples in this development community. These firms have proven that they can take a client’s concept and develop an application that more than delivers on expectations.”

Learn more about Clutch.

 

 

 

Quick Start Guide For Red5 Pro!

November 18th, 2015 by Jamie Maynard

Unlike some other streaming solutions, we don’t just focus on the server side or the client side–we provide the whole stack. While this provides a tremendous amount of power and flexibility, it does make it more difficult to set up. A few of our customers were confused on how to get started, so we consolidated four of our guides in one place to make it more streamlined and simple to follow. This guide will get you quickly up and running with the Red5 Pro server and the client-side SDKs.

Get the new Quick Start Guide and we look forward to hearing your feedback!

^E3E74F0BA61990535924F81D51A76F33B10475AAF43D3528AA^pimgpsh_fullsize_distr

Quick Guide to install Red5 Pro on AWS

November 12th, 2015 by Jamie Maynard

Dealing with the complexities and all the options of Amazon Web Services practically requires a PHD in Cloud Hosting, so we put together a quick tutorial on how to efficiently install Red5 Pro on an AWS EC2 Instance Configuration. The following guide should get you up and running quickly and without the headache. Enjoy!

 

AWS Guide

, ,

He’s BAAAaaaack!

November 10th, 2015 by Paul Gregoire

Screen Shot 2015-11-10 at 4.11.15 PM

Why on earth would anyone choose to rejoin a company where they previously worked? In retrospect, the answer seems quite simple, though of course, taking the plunge is always a daunting task. I assume the statistics do not favor a return to a previous workplace after an extended hiatus, but I could certainly provide a plethora of reasons why I returned to Infrared5 when presented with the opportunity to do so. For me, and in any and all endeavors, the work has to be both intellectually stimulating and challenging. Software development can often be repetitive and monotonous, but fortunately that never was (and still isn’t) the case at Infrared5. Of near equal importance are the workmates that surround me; without a high quality, collaborative and generally pleasant team, even the most stimulating work can lose its shine.

So to that end, here is a short checklist I used when making the decision:

1. Do I enjoy my interactions with my teammates? Check!

2. Do I have respect for them and their abilities? Check!

3. Lastly, Infrared5 wanted to pay me to write code all day and work on Red5! Well that’s a no brainer–count me in!

While working for another company, I had joined the Red5 Pro beta just after it was announced on Twitter. A “Pro” version or Red5 was something Dominick and I had chatted about on a few occasions back in the day–there may or may not have been beer involved. Despite the casual conversations, we both thought there could be immense long-term value in providing the Red5 community with what they were always asking for and talking about on the users list and social media. Providing the ability to stream from any device to any device has always interested me. Alas, I had the desire to turn intrigue into application by helping to create a software which could do just this. Red5 Pro offers Flash streaming, HLS streaming, and RTSP streaming; these technologies are still in-demand and are not interoperable on existing platforms, except on Red5 Pro.

In the near future, the public can expect some major disruption on the streaming media front from Red5 Pro. It should come as no surprise to the community that we’re adding the new hotness of technology, WebRTC, to our existing stack. If this addition isn’t “For the Win,” I don’t know what is. I have no qualms about saying that the suite of tools which comprise Red5 Pro will help shape the future of the streaming market–and I couldn’t be happier with my decision to return.

-Paul

 

, , , ,

Final Product Release For Red5 Pro Beta!

November 6th, 2015 by Matt Angier

red5pro_live_streaming

 

To the community,

 

Happy Friday! We are super excited about our latest and final beta release for Red5 Pro. Our next version will be the 1.0–something we have been looking forward to for quite some time.

We have just released some great updates to the Red5 Pro Server and Streaming SDKs, and wanted to provide some details on whats included. First off, none of the updates are critical, and the updated server is backwards compatible with the previous SDKs (unless you want to use the new security parameter feature).

Below you will find: the release notes, the Server and SDK downloads, and the link to our Github repos with the updated examples and sample apps.

As always, we are here if you have any questions, and don’t hesitate to let us know how we can help!

-Matt@infrared5.com

 

Release Notes

Server version 0.1.72-PROD:

  • Contains a new, improved server interface for the webapps examples which include server build version, documentation, and more
  • Addresses a problem of the webapps examples not being able to identify public IPs of some cloud-hosted servers (notably, AWS), and allows the user to update the IP address displayed via the interface.
  • Addresses a problem with a carriage return in the LICENSE.KEY file not being read as a valid license
  • Supports setting connection parameters, which can be used to secure streams

 

Streaming SDK (iOS and Android) version 0.8.38:

  • Supports setting connection parameters, which can be used to secure streams

 

Sever Download

SDK Downloads

Github Repositories

, , ,

First Annual Intel Innovators Summit

November 5th, 2015 by Chris Allen

Intel Innovator Summit 2.JPG

 

I just got back from the Intel Innovators Summit in Santa Clara, CA where I serve as a current Intel Software Innovator. Intel brought together some of the top programmers, makers and creative technologists from around the world to show us some of the innovative things they are working on. While I can’t share many of the details of what was presented, to me, the most valuable aspect of the summit was having the fantastic opportunity to connect with so many talented developers in one space.

During the event, Intel split up the topics between RealSense and IoT. RealSense, for those who don’t know, is a platform built around 3D depth cameras. As mentioned above, due to an NDA I can’t share everything Intel is up to, but much of what they are doing has been released publicly, and there are public SDKs that anyone can download to start thinking with the devices. As a quick aside, here’s a link to a video that Infrared5 put together for a contest on perceptual computing (which is actually the basis of RealSense) as a catalyst for a truly immersive game play experience at the 2013 Intel Ultimate Coder Challenge. While the front-facing cameras on Windows PCs offer quite a few interesting options for Minority Report style input and games, I find the rear/world-facing r200 cameras on Android devices much more intriguing. The possibilities surrounding the combination of the devices with IoTs are enormous; Imagine unlocking doors just by a camera recognizing your face, or creating wearables that interact with the world with 3D data.

In retrospect, IoT was really the topic that got me excited at this event. Though I don’t consider myself a Maker, Infrared5 has engaged in a significant number of projects with internet connected sensors. Our customer SICK, for example, utilizes Red5 for live streaming of data coming from their sensors. I’m really excited to get my hands on an Intel Edison board after seeing firsthand how the device can seamlessly enable live streaming across a variety of products.

SparkFun_Edison_Boards-14

The fact that it’s so small–and relatively powerful– introduces all kinds of exciting use cases beyond mobile phones. Rest assured, we will be experimenting and sharing with you guys what we and the other Innovators do with Red5 Pro and these devices.

One of my favorite activities of the summit was the little contest Intel ran called the Spark Tank, which was undoubtedly inspired by the hit TV show Shark Tank. Intel kicked off the exercise by splitting the Innovators up into groups with the task of inventing a project which we then pitched to the judges. The judges consisted of the Intel Innovator program as well as executives from the company. I must say, all the teams came up with compelling experiences–everything from doors that scanned your face in order to allow entry to stuffed animals with medical sensors embedded within.

Our project consisted of a military application to improve communication within squads and leveraged the Red5 Pro platform with the Edison board. Each team had to do a skit or a spontaneous commercial for their product and present on the benefits of their concept. For ours, we ended up cutting out cardboard rifles and paper goggles and then taped together gesture/motion control MYO armbands that let you wirelessly control connected devices. It was rather dramatic, as we had our team get shot and die on stage. While we won the “Most Likely to Get the Blind into the Military” award, we clearly should have won funniest skit for the most serious topic.

Intel Innovator Summit 1.JPG

It’s fantastic to be a part of such a talented group of developers, and I’m honored to be able to represent Infrared5 in the Intel Innovators group. Kudos to Intel for having one of the best developer outreach programs out there! I’m excited about all the possible collaborations that will emerge from the Intel Innovator’s Summit, and of course, we can’t wait to see what these guys do with live streaming and Red5 Pro.

, , , ,

What We’ve Quietly Been Working On: Red5 Pro – Going Back to Our Roots

November 4th, 2015 by Chris Allen

red5pro_live_broadcast.png

 

The Times They Are A Changin’

As you might have noticed, we recently updated our website to better reflect our new direction at Infrared5. We are now focused on the Red5 Pro Server and SDKs for iOS and Android that enable developers to build experiences like Meerkat or FaceTime in a matter of minutes. Yes, you read that correctly – the ability to create mobile streaming applications in minutes. We originally started this company because of the tremendous reception and interest in the Red5 Open Source Media Server. For those that aren’t familiar with the project, our initial team, composed of John Grden, Paul Gregoire, Dominick Accattato and myself, worked with other developers around the world to reverse engineer the RTMP protocol and create an open source alternative to Macromedia’s Flash Communication Server. This project eventually became Red5. Two years later as the project grew, we noticed strong demand from developers who needed custom work and consulting on Red5 – so much so that we decided to quit our day jobs and start Infrared5. Over the years though, our focus drifted away from exclusively building live streaming solutions with Red5.

Games and Brass Monkey

Our developers at Infrared5 have always been interested in disrupting the present and pushing the boundaries with new technologies. One of these instances was the Unity game engine. Andy Zupko and John Grden really pushed us in this direction as early adopters of the platform. We built many great games on Unity including the Star Wars Trench Run, Hasbro’s Game of Life Zapped Edition, and most recently the augmented reality Force Trainer feature in the official Star Wars app. Even though we are no longer focused on games, our passion for game design and the unique experiences they enable really influence our product design. We want to make using Red5 Pro fun and enjoyable for developers, which in many respects isn’t far off from the goal of a good game.

b-pre-connect

During this time Rebecca led Infrared5 not just in games projects, but also on IoT and streaming projects that leveraged the open source Red5. Another project that Infrared5 invented and spun off was our smartphone-as-a-game (SAAG?) controller product, Brass Monkey. I moved over to lead that company as CEO in 2010, but eventually I came back to Infrared5 full time, as we weren’t able to effectively convince people to pay for smartphone controlled, browser-based games. Note though, we kept the technology, and it’s now part of Red5 Pro as the Second Screen SDK.

Going Back To Our Roots

After Steve Jobs announced the demise of Flash with the lack of support in iOS, and the eventual decay of support for Android, we came to the conclusion that we would solve the “Get off of Flash Problem” for live streaming mobile apps. We heard from a lot of our consulting clients that they wanted this, and instead of trying to build custom solutions over and over again, we decided Red5 needed an upgrade. Mobile SDKs for RTMP are mostly fragmented, hard to use, clunky and generally just a mess. We have now made it our mission to make building a live streaming app for iOS and Android efficient and intuitive. Whether it’s a one-to-many live broadcasting app like Periscope, a many-to-many conferencing app, or a one-to-one video chat application, we want to make it so incredibly simple that any developer can do it.

The Future: WebRTC, Second Screen, IoT

While migrating existing live streaming Flash apps to our new platform is super helpful, what we are most excited about is our vision for the myriad applications of the Red5 Pro technology.

An ever-increasing number of browsers are adding support for WebRTC; heck, even Microsoft Edge is getting there! We think this is clearly the future for in-browser streaming, and we are currently working on making Red5 Pro speak this protocol. We see the Red Pro Server as the underlying hub that is able to talk to all different streaming mobile apps and browser apps with minimal latency and outstanding performance.

However, the phones we carry in our pockets, the laptops sitting on our desks, and the tablets we browse while sitting on the couch are truly just the beginning. Other devices with cameras that can connect to the internet are the next big thing in live streaming. We are thrilled to make Red5 Pro integrate with all of these Internet of Things devices. The possibilities are endless: imagine fully immersing yourself in a live concert via your VR headset streamed live from a 3D camera at the venue, or enabling live video streaming among military troops over mesh networks going to their AR headsets. There are countless things for developers to build in this space, and we’re excited to see how we can power them through Red5 Pro.

Finally, we think that the second screen experiences like what we started with Brass Monkey have huge potential for changing the way people interact with technology. Not only can you as a developer turn phones into game controllers, but you can also create new banking software that enables your phone to interact with and take away information from a screen in bank branches of the future.

red5pro_secondscreen

…And There’s More!

Of course we can only think of so many scenarios of how our tech can be applied. The true innovation will be done by what you as a developer create with it. What would you build with Red5 Pro? Let us know in the comments. Much more coming your way soon!

, , , ,