bajicdusko bajicdusko - 6 months ago 41
Android Question

How to stream live video from android to Wowza via RTMP

Problem that occupied me for last 7 days is implementation of live video streaming from android to WowzaMediaEngine.

I have started my research on official Wowza pages and i was thrilled with existance of GoCoderSDK library for android and IOS. "Small" problem is the price (10k first year, 2k annually) and since i am building application for "small" client, i have tried other libraries:

  • libstreaming is ok, in my opinion ugly coded (no hard feelings), with plenty of bugs to fix, but with quite complicated techniques (well done on those). I've tested on Nexus 5 marshmallow and it worked after a while by using MediaCodec and low video resolution. Increasing resolution would switch to MediaRecorder which is mostly not working. On KitKat device, i was not able to start it at all. After 3-4 days of fixes implementation i've give up. Lib seams not to be maintained anymore

  • Media Broadcasting Library looks promising but have'nt tried it. Really expensive. 500$/month is simple too much in my opinion.

  • KickFlip is pretty coded, looks nice, great features and they have removed support for RTMP/RTSP. Tried to revert support and failed.

  • RealTimeLibs price is acceptable. Installed Broadcast ME (demo app) from PlayStore, unable to initiate stream. Demo app is constantly crashing. Discouraged, have'nt tried to contact them.

What to do, to buy GoCoderSDK, to rewrite libstreaming library (since i had the best results with it) or to write my own solution (dont know how much time it would take). Huge multimedia experience is required (which i dont have)?

Answer Source

Not mentioned in question, but i have stumbled upon JavaCV library few times, but reviews were not that great. Also i saw few quite positive comments here on SO, so i decided to try it.

At first it is quite confusing (import javacv.jar, import javacpp.jar, import ffmpeg.jar, add a lot .so files to jniLibs with matching versions etc etc). After looking at examples and few raged posts. Answer to this question (How to f****ing add JavaCV to Android Studio so I can use the f***ing annoying FFmpeg?) actually helped me a lot and with help from Samuel Audet (to which i am really grateful), i've succeded to stream video from android via RTMP to Wowza in quality and video options i choose to set.

Since i have lost 7 days of work on this and in return to community i have created boilerplate (or starterkit) android application for live streaming video to wowza media engine so that many other wowza dependant apps in future can be built much faster.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download