# Is OpenCV official Android release free to use in commercial usage?

**URL:** <https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522>\
**Category:** Android/Java\
**Tags:** legal\
**Created:** [February 21, 2024, 5:07am UTC](https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522 "2024-02-21T05:07:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chester](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chester](https://forum.opencv.org/u/Chester)\
**Post date:** [February 21, 2024, 5:07am UTC](https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522/1 "2024-02-21T05:07:27Z")

</div>

As title, I download the OpenCV Android release 4.8 ZIP file from official website. My worry is that whether it’s safe to use it commercial usage?

My guess is that it should not contain any other 3rd party patent inside since the official release is open for everyone and it doesn’t even have other way for us to enable/disable NON\_FREE content.

The reason why it caught my attention is that, earlier I read some old articles that mentioned that OpenCV’s **VideoCapture** cannot read MP4 (H264) by default, it only accepts MJPEG in AVI container, developer may need to bring other 3rd party backend in (ex: FFMPEG).

However when I use OpenCV official Android release 4.8, it perfectly read MP4 (H264) without any error. I notice the OpenCV source code, they directly have a file ‘modules/videoio/src/cap\_android\_mediandk.cpp’ that uses Android NDK API’s (AMedia) to decode video.

If my understanding is right, OpenCV should support reading MP4 (H264) without FFMPEG, cause it uses Android NDK for decoding. Then I don’t need to worry about any NON FREE patent usage, or do I?

Aside from video part, I’m also worried what if the official Android release contain NON FREE patent like SURF, SIFT (probably ok since 2020).

Thanks.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [February 21, 2024, 7:13am UTC](https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522/2 "2024-02-21T07:13:08Z")

</div>

> **[License](https://opencv.org/license/)**
>
> The OpenCV library is licensed under two different licenses depending on the version of the library. The rationale behind changing OpenCV license from 3-clause BSD to Apache 2 is explained in this post. OpenCV 4.5.0 and higher OpenCV 4.5.0 and higher...

SIFT patent has expired years ago. official builds (except maybe those with contrib packages) contain only free stuff.

what you read about VideoCapture tried to describe that VideoCapture uses “backends”, i.e. dependencies. without any, there’s only avi and mjpeg because that’s built in. system APIs can be backends.

when in doubt, consult a lawyer. we can’t give legal advice.

---

<div class="post-metadata">

**Author:** ![Chester](https://avatars.discourse-cdn.com/v4/letter/c/ecccb3/32.png) [@Chester](https://forum.opencv.org/u/Chester)\
**Post date:** [February 21, 2024, 8:23am UTC](https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522/3 "2024-02-21T08:23:23Z")

</div>

Thanks for reply 🙂.

To be clear, I’m just wondering the following things:

When OpenCV officially releases the pre-built library (for **Android** in this case), does it potentially contain any other method which may use non-free patent? Because I haven’t found any clear statement about what patent risk that developer should be aware of, then we can’t even be sure what “backend” that the OpenCV 4.8 is using with respect to video, then we can’t even ask what patent is risky.

For example, how would we know if OpenCV official Android release internally uses GStreamer/FFMPEG for video capturing, or it actually uses system API like Android NDK for h264 decoding (Specifically, I mean this source code): [https://github.com/opencv/opencv/blob/4.8.0/modules/videoio/src/cap\_android\_mediandk.cpp](https://github.com/opencv/opencv/blob/4.8.0/modules/videoio/src/cap_android_mediandk.cpp)

So if the OpenCV official Android release really uses this Android NDK system API as backend, then the remaining question will just be “whether Android NDK system APIs uses h264 decode is free or not”.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [February 21, 2024, 10:24am UTC](https://forum.opencv.org/t/is-opencv-official-android-release-free-to-use-in-commercial-usage/16522/4 "2024-02-21T10:24:13Z")

</div>

you can check with `getBuildInformation()`, see “Video I/O” section. I’d assume that _maybe_ the desktop java package comes with ffmpeg but certainly not the android one. it should only have system APIs enabled in its build.

I don’t have answers to your questions. maybe there are answers. I don’t know them. my not knowing should not be construed as those answers not existing. I am not one who is supposed to know this stuff.

you could browse the issues on OpenCV’s github for any information. that is _assuming_ (I didn’t look) that there’s nothing in the actual documentation.

some third party libraries are included by source in OpenCV’s repo. those probably have a certain kind of license that is sufficiently permissible.

if what you’re looking for doesn’t exist yet, you could try to convince the OpenCV developers to prepare such a legalese document for each release.

personally, I’d deal with lawyers by planting them in the back yard. you might wanna retain one of them to make sure similar approaches are all above board.
