CompileFFmpegWithOpenSSL


Source link: https://github.com/davinctor/CompileFFmpegWithOpenSSL

About

A bunch of script you can use to compile FFmpeg with OpenSSL

Environment

  1. Linux (At that time I used Linux Mint 18.1 Serena MATE 64-bit)
  2. Android NDK r14b
  3. Internet

How to run it

  1. Copy the repository
  2. cd into it
  3. Call in console ./build.sh
  4. Wait for a while
  5. Congratulations!

Output folder structure

~/AndroidStudioProjects/compile-ffmpeg-and-openssl/  ? build.sh (the main compilation script for both FFmpeg and OpenSSL)  ? _build_ffmpeg.sh (FFmpeg compilation script)  ? _build_openssl.sh (OpenSSL compilation script)  ? _old_build_ffmpeg.sh (FFmpeg compilation script for only armeabi architecture)  ? _old_build_openssl.sh (OpenSSL 1.0.0a compilation script)  ? Setenv-android.sh (set up environment (variables, etc) for OpenSSL compilation, runs inside _build_openssl.sh)  ? patches
? patch_fix_ffmpeg_lib_name.txt (the patch file to fix FFmpeg libs name suffix)  ? src
? ffmpeg-android (FFmpeg sources)
? openssl-android (OpenSSL sources)
? ffmpeg-3.3tar.bz2
? openssl-1.0.2j.tar.gz  ? libs (folder with compiled libs)
? ffmpeg
 ? include
  ? armeabi-v7a

? libavcodec

? libavdevice

? libavfilter

? libavformat

? libavutil

? libswresample

? libswscale
  ? x86

? (Like inside armeabi-v7a folder)
  ? armeabi

? (Like inside armeabi-v7a folder)
  ? arm64-v8a

? (Like inside armeabi-v7a folder)
 ? binaries
  ? armeabi-v7a

?  libavcodec-57.so

?  libavcodec.so -> libavcodec-57.so

?  libavdevice-57.so

?  libavdevice.so -> libavdevice-57.so

?  libavfilter-6.so

? libavfilter.so -> libavfilter-6.so

? libavformat-57.so

? libavformat.so -> libavformat-57.so

? libavutil-55.so

? libavutil.so -> libavutil-55.so
  ? x86

? (Like inside armeabi-v7a folder)
  ? armeabi

? (Like inside armeabi-v7a folder)
  ? arm64-v8a

? (Like inside armeabi-v7a folder)
 ? lib
  ? libavcodec

? armeabi-v7a

  ?  libavcodec-57.so

 ?  libavcodec.so -> libavcodec-57.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
  ? libavdevice

? armeabi-v7a

  ?  libavdevice-57.so

 ?  libavdevice.so -> libavdevice-57.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)

? libavfilter

? armeabi-v7a

 ?  libavfilter-6.so

 ? libavfilter.so -> libavfilter-6.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
  ? libavformat

? armeabi-v7a

 ? libavformat-57.so

 ? libavformat.so -> libavformat-57.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
  ? libavutil

? armeabi-v7a

 ? libavutil-55.so

 ? libavutil.so -> libavutil-55.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
  ? libswresample

? armeabi-v7a

 ? libswresample-2.so

 ? libswresample.so -> libswresample-2.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
  ? libswscale

? armeabi-v7a

 ? libswscale-4.so

 ? libswscale.so -> libswscale-4.so

? x86

 ? (Like inside armeabi-v7a folder)

? armeabi

 ? (Like inside armeabi-v7a folder)

? arm64-v8a

 ? (Like inside armeabi-v7a folder)
? openssl (libs/openssl)
 ? build
  ? armeabi-v7a

? bin

? certs

? include

 ? openssl

? lib

 ? engines

 ? libcrypto.a

 ? libscrypto.so

 ? libssl.a

 ? libssl.so

 ? link_shared

 ? pkg-config

? misc

? private

? openssl.cnf
  ? x86

? (Like inside armeabi-v7a folder)
  ? armeabi

? (Like inside armeabi-v7a folder)
  ? arm64-v8a

? (Like inside armeabi-v7a folder)
 ? include
  ? armeabi-v7a

? openssl

? x86

? (Like inside armeabi-v7a folder)
  ? armeabi

? (Like inside armeabi-v7a folder)
  ? arm64-v8a

? (Like inside armeabi-v7a folder)
 ? lib
  ? armeabi-v7a

? libssl.so

? libcrypto.so

? x86

? (Like inside armeabi-v7a folder)
  ? armeabi

? (Like inside armeabi-v7a folder)
  ? arm64-v8a

? (Like inside armeabi-v7a folder)  

Resources that I used

  1. https://github.com/wseemann/FFmpegMediaMetadataRetriever (forked from)
  2. https://github.com/wseemann/FFmpegMediaPlayer (old version of 1-st point)
  3. https://github.com/wseemann/ServeStream
  4. https://github.com/cine-io/android-ffmpeg-with-rtmp (It was my first target to compile, but this script compile only to armeabi-v7a)
  5. https://github.com/WritingMinds/ffmpeg-android-java (A wrapper around FFmpeg(.so) and calling FFmpeg through the terminal)
  6. https://github.com/WritingMinds/ffmpeg-android (Another one compilation script for FFmpeg with a lot of additional libs)
  7. https://github.com/OnlyInAmerica/FFmpeg-Android (deprecated, but useful)
  8. https://github.com/appunite/AndroidFFmpeg (a compilation script with sample)
  9. https://github.com/havlenapetr/FFMpeg (A sample FFmpeg for android - wrapper for all FFmpeg classes)

P.S.

The status of compilation - at begin of MAY 2017 with using NDK version r14b FFmpeg compilation fails for x86_64, mips, arm64-v8a, and OpenSSL fails for x86_64. As we all know for mass production is enough to have armeabi-v7a (the most polular architecture, other arm-based processors can work with it) and x86 (around 2 percent of all android devices). So I don't stuck with other architectures, and I guess that using older one version of NDK, for example, one of NDK r12 can fix the problem for some architectures.

Summary

As build.sh script I can:

  • FFmpeg for armeabi, armeabi-v7a, x86;
  • OpenSSL for armeabi, armeabi-v7a, arm64-v8a, mips, x86;

As build.sh script I can't (but I tried):

  • FFmpeg for arm64-v8a, x86_64, mips;
  • OpenSSL for x86_64 and other;

License FFmpeg

Check LICENSE.GPLv3 and make sure to follow the licensing terms and conditions of the project and the software used to build the project.

License OpenSSL

Check license and make sure to follow the licensing terms and conditions of the project and the software used to build the project.

License

MIT License  Copyright (c) 2017 Victor Ponomarenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 

Resources

SLATE is a light-weight NATIVE cross-platform template engine for mobile devices.

Android library to easily queue background and UI tasks.

So what does it exactly do?

If you are working on Android you probably have ended up using AsyncTasks to do background tasks and then have a response on the UI Thread. Well, author confesses: "I HATE ASYNCTASKS".

SeekBarHint allows to add a SeekBar widget witch is moved and updated according to the SeekBar position.

Bring your apps to life with voice and messaging using the Sinch SDK for iOS, Android and JavaScript. The Sinch SDK takes care of app communications in a cinch.

ButtonMenu is an Android library created to build user interfaces based on buttons. This library has been implemented using Model View ViewModel pattern combined with an Android custom view that extends LinearLayout.

It works on Android 2.X or higher versions.

Effects for android notifications. It is based on Crouton.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes