A few people have asked us if they can stream live video from their iPhones directly to the JW Player. If you’re willing to install and configure a few applications, the answer is yes! This guide will provide step-by-step instructions on how to do it.
This tutorial is broken up into three steps:
Step 1: Set up Your Streaming Server
First, you’ll need to download and install Wowza Media Server. They have a free 30-day trial available. Once you’ve installed Wowza, you’ll need to configure your Wowza server, by editing files in the install directory. This is different for each platform, but you should be able to easily find where Wowza has installed its files.
- Find the applications folder in the Wowza installation folder. By default, there will be nothing there except for a folder called vod. Create a new folder for your live streaming application. We’ll call it livu.
- Next, open up the conf folder and create another folder called livu. Then copy the Application.xml file from the conf folder to the livu folder.
- Now open up the Application.xml file. Find the <StreamType> property and change it from default to live.
- Still in Application.xml, find the <PublishMethod> property and change it from digest to none. This will turn off authentication for live stream publishing, so you should only do this for testing purposes.
- Back in the conf folder, open up the file called VHost.xml. You’ll need to copy and paste the entire <HostPort> section, so that we can set up the port for our live stream ingestion (RTSP). In the new <HostPort>, edit the <Port> property to read 554.
Note: On Mac OS X, you’ll need to set this value to a number higher than 1024. This is because ports below 1024 must be opened by processes with admin privileges. For example, to avoid trouble, set the <Port> value to 5544.
- Now, simply start up your Wowza Media Server. If this is your first time running Wowza, you’ll be prompted to enter in your trial license number. When it’s started up, make sure your RTSP port (554 or 5544) was successfully enabled.
Step 2: Set up Your iPhone to Stream to Wowza
Now that you’ve got your streaming server set up, it’s time to set up your iPhone to stream live video. We’re going to use a $2.99 app called Livu, which is specifically designed to work with Wowza Media Server. Grab it by searching for “Livu” in iTunes, or by clicking here. Once you’ve downloaded the app, here’s how to configure it:
- Open up the configuration menu, and in the Host field, enter the IP address for the computer hosting your Wowza Media Server instance.
- Under App, enter /livu/iphone. If you named your live streaming application something different in your Wowza setup, use that name here instead of livu.
- Under Port, enter the port your configured for RTSP ingestion in step 6 of the Wowza setup.
- If you disabled authentication in step 4, you can leave the User Name and Password fields blank.
- Once everything’s configured, press the Save button.
- The Livu app should now activate your iPhone’s camera. Click the icon in the top left to start streaming.
- If you’ve configured everything properly, a message will display saying “Stream Started.” You’re now broadcasting!
Step 3: Set up the JW Player to Play the Stream
If you’ve made it this far, the hard part is over. Now all that’s left is to configure the JW Player to play your live stream. Here’s the embed code you’ll need to set up your player:
streamer: "rtmp://192.168.0.160/livu", // Replace this with your own IP address
That’s all there is to it. If you’ve set everything up correctly, the player will display the live video stream from your iPhone!