August 23, 2015

Larix Broadcaster mobile streaming setup and usage for Android

Do you want to broadcast live video from mobile device to your own audience all over the world? The viewers might be your clients, colleagues, friends, family or everybody else you want to show the current moment of your live. Sure, that should be simple. Just point your mobile device and push the button.


In this article we are going to show how to create video streaming from Android based mobile device via Larix Broadcaster. Larix Broadcaster is a free mobile application which can stream live video or/and audio to media server via RTSP and RTMP protocols. For our example, we will use Nimble Streamer because it is free and powerful media server with rich set of documentation.

To launch the live steaming from a mobile device via Larix Broadcaster you need to perform several steps:

  1. Install Larix Broadcaster on your mobile device;
  2. Install Nimble Streamer and make necessary settings;
  3. Specify published URL in Larix Broadcaster;
  4. Open output stream from the media server and check that everything works fine.


Install Larix Broadcaster application


Open Google Play in your mobile device, type Larix Broadcaster into search window and then press the search icon.
Choose Larix Broadcaster on the application page and press the "Install" button.
Allow access to your camera and microphone by pressing the "Accept" button. Application will be installed in a few seconds.
When you launch Larix Boadcaster you will see preview window with "Settings" and "Broadcast"  buttons.
See the screenshots below.




Install Nimble Streamer


Nimble Streamer can be installed on all popular Linux distributions - Ubuntu, Debian, RadHat and CentOS. For rapid deployment and periodical updates the batch installation is used. There are separate installers for Windows and Mac OS X.

For more details about Nimble Streamer installation please see this page. You need to sign up WMSPanel account before starting the installation.

Go to wmspanel.com and press the "Sign Up" link in the top right corner.



Specify your e-mail address in the appeared dialog and then press "Sign Up" button. Follow the instructions from the received e-mail message to complete the registration.

Now install Nimble Streamer (we are going to show the installation procedure for Windows 7, but you can also install it on Linux or Mac OS X, please note that 64-bit OS is required).

Go to https://wmspanel.com/nimble/install web page then click on Windows tab.



Press the "Download Nimble Streamer Installer" button. The setup file will be downloaded to your file system.

Double click on “NimbleStreamerSetup-2.7.2-3-x86_64.exe” file. Press the "Next" button in the appeared dialog. Select the Destination Folder and press the "Install" button.



The dialog will notify you about successful installation in a few seconds.

Then you need to register just installed media server in WMSPanel. For Windows 7, go to "Start" -> "All programs" - > "Nimble Streamer" and run "Register Nimble Streamer" as administrator. You will be asked for your WMSPanel login and password sent to you during sign up.



Your media server will be visible in the WMSPanel immediately after registration (see the
"Servers" tab on wmspanel.com).



Now lets proceed to Nimble Streamer setup.

Setting up transmux RTSP stream to HLS and RTMP


Log in to wmspanel.com and go to "Nimble Streamer" -> "Live stream settings". Check the HLS and RTMP checkboxes in "General" tab and then press the "Save" button. You may specify Push login and Push password to protect you connection with mobile device. This login and password will be used in Larix Broadcaster settings.




Go to "Interfaces" tab and press "Add RTSP interface" button.


Secify the port number in appeared dialog (this port number will be used in Larix Broadcaster settings). Select your media server and press the "Save" button.




If you'd like to avoid publishing from un-authorized sources, you need to set up login and password which you may then use in this app. Go to Global tab to set up server-wide credentials or create application-specific credentials. Refer to this article for basic workflow setup.

So the basic Nimble Streamer configuration to work with Larix Broadcaster is completed. Proceed to configure mobile application.

Configure Larix Broadcaster application


Launch the Larix Broadcaster application on your mobile device and press "Settings..." button.



Select the "Connection #0, URI" in Settings menu.


Specify the IP-address of your media server, Port and Path. If you have specified Push login and Push password then RTSP URL should look like
rtsp://push_login:push_password@192.168.5.5:1937/live/stream
For RTMP it will be
rtmp://192.168.5.5:1937/live?rtmpauth=push_login:push_password/stream
Press "Ok" button to save your settings.

Note: If you use Wowza as a media server, you need to use ModuleSecureURLParams to authenticate via RTMP.



Now return to mobile application and press "Broadcast" button (make sure, that your mobile device has network connection, e,g, wi-fi). 


Check the streaming


Log in to WMSPanel. Go to "Nimble Streamer" -> "Live streams" and click on the number under the "Outgoing streams" column.


Then click on the Question sign in the stream name row.


The video playback from mobile device starts automatically in the appeared dialog. By default the most popular streaming protocol (HLS) is used for video playback. HLS is supported by the most modern mobile devices. However it has a quite long latency (about 6 seconds). If you need to playback video with minimum possible latency, please use RTMP protocol. To configure minimum latency please read the "Nimble Streamer performance tuning" article.



Also you can play streaming URL with system player (e.g. VLC).

You can broadcast live video and/or audio from your mobile device via Larix Broadcaster to your web page, YouTube live or any other CDN.


Mobile Broadcasting Library


If you'd like to create similar Android app capable of media streaming, you can use our mobile broadcasting library and SDK which is the core of Larix Broadcaster. You will get Larix source code and a library for further UI customization.



Please contact us if you have any problems with installation.

Related documentation


Установка и запуск приложения для мобильного стриминга Larix Broadcaster

Transmux RTSP to HLS, RTMP, DASH and more via Nimble Streamer

4 comments:

  1. how to save video recording in sdcard if i have capture video from your library.

    ReplyDelete
    Replies
    1. This is a planned feature for our library, not yet available.

      Delete
    2. If I would like to record this from your library then which portion need to modify. Can you please suggest me?

      Delete
    3. You will be able to do it from the library method calls. Please follow our news to see when it's avialable.

      Delete