Introduction: Examples of usage AVLib sdk
More: Author   ReportBugs   

Examples for AVLib sdk usage.

AVLib library is powerful RTMP-streaming solution that provides following features:

  • Ability to use with outdated and low-performance devices with Android 4.1+
  • Auto-detection device performance and setting an optimal stream configuration
  • Handling rotation and size changes with no stream re-initiation
  • Ability to customize frame size, video codec quality, video and audio bitrate, and disable audio
  • Activity and Fragment support
  • Decreasing bitrate when connection is slow
  • Switching the main/front cameras
  • Scaling types, aspect ratio correction, and full handling lifecycle
  • Handling errors
  • Simple interface
  • Fast performance
  • No dependencies
  • Armv7a and armv8-64 support
  • Action cameras support
  • “Tap to focus” feature
  • “Record stream” feature
  • Device screen broadcasting

How to use:

  • Contact with us for AVLib sdk

  • Add AVLib sdk into your project (It's one aar file without any dependencies)

dependencies {
    implementation(name: 'AVlib1.0.2', ext: 'aar')
  • For broadcasting from android cam use CameraStreamer class. Create instance and attach 'broadcast view'.

Camera view from layout

    android:layout_height="match_parent" />
public void onCreate(@Nullable Bundle savedInstanceState) {
    mStreamer = new CameraStreamer();
    mStreamer.onCreate(getActivity(), savedInstanceState);
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_camera_streaming, container, false);
    mStreamer.onCreateView(mBinding.cameraView, PreviewScaleType.CENTER_CROP);
    return view;
  • add some required lifecycle method calls. onPause, onResume, onDestroy, onConfigurationChanged, onSaveInstanceState. For example:
public void onPause() {

  • Add some customization if need: setVideoBitrate(VideoBitrate bitrate), setAudioBitrate(AudioBitrate bitrate), setPreviewSize(PreviewSize size)
public void onInitCompleted() {
  • Start/Stop broadcasting:

Learn More

AVLib sdk developer's guide

Privacy Policy

Official website

Copyright © 2018 Onix-Systems, LLC, All Rights Reserved.

Support Me
About Me
Google+: Trinea trinea
GitHub: Trinea