Giter Club home page Giter Club logo

Comments (15)

saudet avatar saudet commented on August 24, 2024

Looks great! Do you think you could do the same for the rest of the non-Windows platforms and send that over via a pull request? (Along with a one-liner in the CHANGELOG.md file with your name, if desired.) Thanks!

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

I will do that when i'm done finishing the implementation.
i still need a little help from you.

I'm trying to find a way to include the libspeex.so, libcrypto.so and libssl.so in the generated ffmpeg-android-arm.jar but i cannot find how.

can you provide a hint?

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

The easiest thing would be to compile them as static libraries, but if you really want to use shared libraries, we might as well make a completely separate artifact out of those. Which wouldn't be a bad thing when you think about it. Is this something you'd like to try? I have to write a tutorial about that anyway.

Or if not, are there any reasons to not use use static libraries?

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

trying to compile as static right now... i will let you know if everything went ok. thanks

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

Well i have some issues right know.
still building them as shared libraries, and i get

dlopen("/data/app-lib/xxxx/libjniavformat.so") failed: dlopen failed: cannot locate symbol "avio_find_protocol_name" referenced by "libjniavformat.so"...
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/xxxx.apk"],nativeLibraryDirectories=[/data/app-lib/xxxx, /vendor/lib, /system/lib]]]: findLibrary returned null

edit: i get the same error also when building static libraries.

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

Are you saying that you get that error without your additions? Or does this only happen with your additions? If this happens only with your additions, could you please provide the modifications you made to the files? Thanks

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

after some failed attempts to get my code to work(without luck), i downloaded
JavaCV 0.8 binary package javacv-0.8-bin.zip from
http://search.maven.org/remotecontent?filepath=org/bytedeco/javacv/0.8/javacv-0.8-bin.zip

replaced all the .so files im my armeabi folder,
replaced artoolkitplus.jar, ffmpeg.jar, javacpp.jar, javacv.jar, opencv.jar from the downloaded file
and i get the same error:

dlopen("/data/app-lib/xxxx/libjniavformat.so") failed: dlopen failed: cannot locate symbol "avio_find_protocol_name" referenced by "libjniavformat.so"...

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

So, you are saying that you have issues with the binaries of release 0.8?
If so, could you provide the problematic sample code so I can reproduce the
problem here? Thanks!

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

Finally, it works. There is nothing wrong on your side, i had to System.loadLibrary my extra libraries.
on the 0.7 they are loading fine without the System.loadLibrary.
Weird.

So sorry for the trouble.
Right know my enhancement works, but you have to cp libcrypto.so,libssl.so and libspeex.so by hand in the armeabi-v7a folder and do:

System.loadLibrary("crypto");
System.loadLibrary("ssl");
System.loadLibrary("speex");
rec = new FFmpegFrameRecorder(rtmps_link,width,height,1);
...
rec.setFormat("flv");
rec.setVideoCodec(avcodec.AV_CODEC_ID_H264);
rec.setAudioCodec(avcodec.AV_CODEC_ID_SPEEX);
...

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

So, are you saying those cannot be linked statically?

from javacpp-presets.

ratmole avatar ratmole commented on August 24, 2024

Samuel, right know i cannot test it due time issues,have to finish some tests at work :)
I will try to build them as static libraries, and when succeed i will let you know.
Thanks again.

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

Be sure to let me know how that goes, thanks!

from javacpp-presets.

lu-zero avatar lu-zero commented on August 24, 2024

I just added speex support on my branch, probably even that can be ported back.

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

Great! Clean it up and send a PR, thanks!

from javacpp-presets.

saudet avatar saudet commented on August 24, 2024

@ratmole @lu-zero I've added those in version 0.10, thanks for helping out with this!

from javacpp-presets.

Related Issues (20)

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.