Coder Social home page Coder Social logo

iamyours / ffmpegaudioplayer Goto Github PK

View Code? Open in Web Editor NEW
66.0 3.0 20.0 65 MB

基于FFmpeg+OpenSL ES实现的音频播放器,组合使用多种过滤器

Home Page: https://juejin.im/post/5d6e5c8a5188257ec84738c4

CMake 0.23% Kotlin 0.98% C++ 7.12% C 89.93% Objective-C 0.22% Shell 0.31% Java 1.21%
ffmpeg opensles

ffmpegaudioplayer's Introduction

在Android使用FFmpeg的一些例子

  • mp3解码成pcm
  • 多个文件解码合成 (使用amix过滤器合成多个音频文件)
  • 实时解码播放 (c++生产消费模型,实时解码,OpenSL ES播放pcm)
  • 多音轨播放 (多种AVFilter综合组合使用,实现音频变速,调音,多音轨合成实时播放)
  • 音频波形显示 (Visualizer替代方案,避免需要录音权限)
  • 录音编码 (libmp3lame+FFmpeg交叉编译,使用FFmpeg实现实时录音编码成mp3)

ffmpegaudioplayer's People

Contributors

iamyours avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ffmpegaudioplayer's Issues

so库打包成功,最后运行报错:Build command failed.

android studio版本:3.4.0
FFmpeg:3.2.12
ndk版本:android-ndk-r15c
打包成功so库以后,添加到了新建的项目中,直接拷贝了你的CMakeLists里面的代码,build是没问题的,但运行到手机上的时候报错了:
`Build command failed.
Error while executing process /Users/wenba/android-sdk-macosx/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/wenba/AndroidStudioProjects/FFmpegDemo/app/.externalNativeBuild/cmake/debug/armeabi --target native-lib}

ninja: error: '/Users/.../app/src/main/cpp/src/main/jniLibs/armeabi/libavutil-55.so', needed by '/Users/.../app/build/intermediates/cmake/debug/obj/armeabi/libnative-lib.so', missing and no known rule to make it`
提示说找不到libavutil-55.so,但是Users/.../app/src/main/cpp/src/main/jniLibs/armeabi/libavutil-55.so'在这个路径下是能够找到libavutil-55.so这个库的。

调节音量会崩溃

手机是Android10.0的,多音轨播放调节音量,崩溃。
10-26 16:30:52.731 28413 28413 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-26 16:30:52.732 28413 28413 F DEBUG : Build fingerprint: 'HONOR/LRA-AL00/HWLRA-H:10/HONORLRA-AL00/10.1.0.146C00:user/release-keys'
10-26 16:30:52.732 28413 28413 F DEBUG : Revision: '0'
10-26 16:30:52.732 28413 28413 F DEBUG : ABI: 'arm'
10-26 16:30:52.736 28413 28413 F DEBUG : SYSVMTYPE: Maple
10-26 16:30:52.736 28413 28413 F DEBUG : APPVMTYPE: Art
10-26 16:30:52.736 28413 28413 F DEBUG : Timestamp: 2020-10-26 16:30:52+0800
10-26 16:30:52.736 28413 28413 F DEBUG : pid: 28319, tid: 28409, name: mpegaudioplayer >>> io.github.iamyours.ffmpegaudioplayer <<<
10-26 16:30:52.736 28413 28413 F DEBUG : uid: 10434
10-26 16:30:52.736 28413 28413 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1
10-26 16:30:52.736 28413 28413 F DEBUG : Cause: null pointer dereference
10-26 16:30:52.736 28413 28413 F DEBUG : r0 c327bb6c r1 c2fe7139 r2 00000000 r3 00000000
10-26 16:30:52.736 28413 28413 F DEBUG : r4 c2fe7138 r5 c327bb6c r6 c307b490 r7 00000001
10-26 16:30:52.736 28413 28413 F DEBUG : r8 c69c20f0 r9 00000000 r10 0000000a r11 c327c230
10-26 16:30:52.736 28413 28413 F DEBUG : ip c4116c70 sp c327bb50 lr c4017548 pc c4017228
10-26 16:30:52.736 28413 28413 F DEBUG :
10-26 16:30:52.736 28413 28413 F DEBUG : backtrace:
10-26 16:30:52.736 28413 28413 F DEBUG : #00 pc 0008b228 /data/app/io.github.iamyours.ffmpegaudioplayer-4cK57c6q3O54iHQnFR7Zbw==/lib/arm/libavfilter-6.so

我把代码中,updateFilters上面注释掉的initFilters打开,然后不用updateFilters,就没有崩溃。

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.