Giter Site home page Giter Site logo

tomfamily / androidmediacodec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yocn/androidmediacodec

0.0 0.0 0.0 27.25 MB

Android 音视频处理集合,关联了ffmpeg\libyuv等等库

License: Apache License 2.0

Shell 5.56% C++ 5.20% Python 0.49% Perl 0.48% C 55.48% Java 10.17% Assembly 13.70% Kotlin 0.39% Pascal 0.12% Makefile 4.79% HTML 3.02% CMake 0.08% Batchfile 0.03% M4 0.12% Roff 0.30% VBScript 0.05%

androidmediacodec's Introduction

Android 音视频处理集合

关联了ffmpeg\libyuv等等库,可以作为参考。 部分模块博客有介绍,详细可以移步我的博客:简书 - YocnZhao

编译步骤:

  1. 下载NDK,在你的电脑里配置好,如果是mac请在.bash_profile/.zshrc等配置环境变量
export NDK=/Your-Path/Android/sdk/ndk/20.1.5948944
export PATH=${PATH}:${NDK}
  1. 因为ffmpeg使用了子模块,使用前请使用子模块来更新代码
git submodule init
git submodule update
  1. 编译ffmpeg等的so库
cd libNative/src/main/jni
./build-all.sh

成功之后就可以啦~

包含的内容:

  1. Camera2相关

    1.1. Camera使用TextureView预览

    1.2. ImageReader获取Camera2回调数据

    1.3. 转换方式一:获取YUV_420_888格式回调,I420Tonv21转换成NV21格式,使用YuvImage(只接受NV21)获取Bitmap输出到ImageView预览

    1.4. 转换方式二:获取YUV_420_888格式回调,同转换为NV21,根据ImageImageReader一步一步转换得出。

    1.5. 适配预览所有的尺寸,使画面不变形

    1.6. 使用libYuv库做ARGB和YUV的转换。

    1.7. 使用GPUImage库做预览,可以选择各种gles效果。

  2. FFmpeg相关

    2.1. 解码播放视频

    2.2. 解码播放音频,存储pcm数据,使用libmp3lame库转成mp3

    2.3. 最简单的音视频同步

  3. MediaCodec相关

    3.1. 视频解码播放到Surface,获取到yuv数据并存储

    3.2. 时频解码之后编码成mp4文件

  4. open gles相关

    4.1. 部分gles坐标系入门

    4.2. 预览camera

  5. 一个简单的yuv播放器


   Copyright [2022] [YocnZhao]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

androidmediacodec's People

Contributors

yocn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.