Comments (15)
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.
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.
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.
trying to compile as static right now... i will let you know if everything went ok. thanks
from javacpp-presets.
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.
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.
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.
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.
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.
So, are you saying those cannot be linked statically?
from javacpp-presets.
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.
Be sure to let me know how that goes, thanks!
from javacpp-presets.
I just added speex support on my branch, probably even that can be ported back.
from javacpp-presets.
Great! Clean it up and send a PR, thanks!
from javacpp-presets.
@ratmole @lu-zero I've added those in version 0.10, thanks for helping out with this!
from javacpp-presets.
Related Issues (20)
- Can Java use the OpenCV library bound by JavaCPP for CUDA-accelerated decoding of RTSP streams HOT 1
- Project management with javacpp HOT 9
- Consider enable libdav1d HOT 3
- android-arm and android-x86 binaries are missing for latest ffmpeg HOT 7
- [TensorRT] How to save engine to disk HOT 2
- 1.5.9: Could not initialize class org.bytedeco.opencv.opencv_core.Mat HOT 10
- How to rely on the org.bytedeco:ffmpeg library in Android development HOT 1
- PyTorch AdaptiveAvgPool2dImpl constructor HOT 2
- Missing Py*_Check Methods in JavaCPP Preset for CPython HOT 1
- [PyTorch] How to check if a tensor is None HOT 5
- arpack-ng-platform adds macosx-arm64 support HOT 3
- NegativeArraySizeException when building native image with cuda-redist using (flandmark-demo) HOT 3
- [PyTorch 2.2.2-1.5.11-SNAPSHOT] Exception java.lang.UnsatisfiedLinkError: no jnitorch in java.library.path on WIndows HOT 15
- Error trying to build android-arm HOT 3
- [PyTorch 2.2.2-1.5.11-SNAPSHOT] Training produces poor MNIST model on Windows HOT 7
- [PyTorch] Training is very slow on Linux. HOT 9
- Shaka-Packager Preset HOT 3
- [PyTorch] torch.cuda.is_bf16_supported() is missing HOT 8
- [PyTroch] torch_cuda.set_device() and torch.manual_seed() hang HOT 5
- UnsatisfiedLinkError with tesseract-platform after upgrade to 5.3.4-1.5.10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacpp-presets.