-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems on compile decoder_ffmpeg extension #2071
Comments
These errors indicate the compileSdk in your project is set to less than 35. That's the reason it can't find the symbols. I haven't looked into your ffmpeg build problems, but if your goal is to bundle support for OPUS specifically, I'd recommend to use the opus extension directly without going through ffmpeg. Our instructions also don't include downloading libopus specifically. Did you follow the steps in the README exactly and did they work? |
Hi @tonihei and everyone here ! Thanks for your answer...
Then I took those in a
then I added in
and I added also under
and when I run on debug I see in
but it looks like that opus audio I am receiving through RTSP doesn't play even if I added in the code of exoplayer :
where if it uses defaultRenderersFactory it should prefer ffmpeg elaborating the opus decoder.... maybe is there a way to check if it is really elaborating the audio using the ffmpeg ? |
Just to reiterate - could you please follow the steps in the ffmpeg readme instead of wiring up the classes yourself via some aar logic? This will ensure the issue is not related to your special build setup.
This should be visible in logcat or you attach a debugger to see which renderer class is used. |
hello again @tonihei , thanks for your answer .... you mean using anyway trying another test, in Logcat I see now :
where should mean it would call the ffmpeg renderer... but once RTSP stream starts it returns instead :
should maybe that Investigating more on logcat result, which I report here, I see there are probably some parameters that aren't recognized... eventually is there a way to pass some parameters to ffmpegdecoder / libopus?...
And the screen remains black without shownig any video... Thanks again to all! |
Doing another little investigation , this time changing audio format to
which it doesn't make playing audio either, even in this decoding seems it is not using Thanks again! |
Glad you solved the build problem.
This indicates the stream doesn't set up the initialization data correctly. This is different from your original issue though, so if you have reproduction steps and want us to have a look, please file a new issue and attach the media file causing the problem. (I'll close this issue given the original problem was resolved) |
Hello everyone,
I am trying to compile decoder_ffmpeg extension to obtain a
libffmpegJNI.so
in all architectures or even alibffmpegJNI.aar
, to include in my android java project on Ubuntu 20.04LTS platform but I encounter some problems....Ubuntu 20.04LTS
3.31.4
(I even tried before with version3.22.6
)NDK r26b
as suggested by README.md (26.1.10909125
) and I downloaded and installed also the latestr27c
(27.2.12479018
) due I encountered during Android Studio "Make Module androidx.media3.lib-decoder-ffmpeg" a problem abouticonv
library not found...Opus 1.5.2
from opus-codec.org (I did ./configure , sudo make , sudo make install) to have latest libopus which could decode pure opus audio.git checkout release/6.0
(running ffmpeg -version I obtained a 6.0.2 version compiled by native gcc 9 of Ubuntu 9.4.0-1ubuntu1-20.04.2 ) but once encountering problems, maybe because CMake 3.31.4 is quite new, then I reinstalled latest Ffmpeg 7.1 (ffmpeg version N-118350-ge20ee9f9ae Copyright (c) 2000-2025 the FFmpeg developers) , both versions applying--enable-libopus
parameter;ANDROID_ABI
to28
so I setminSdk
in gradle files to28
because having most recent opus and ffmpeg should be more compatible with recent Android app versionsIn both cases with NDK
r26b
andr27c
if I ranbuild_ffmpeg.sh
(sudo ./build_ffmpeg.sh "${FFMPEG_MODULE_PATH}" "${NDK_PATH}" "${HOST_PLATFORM}" "${ANDROID_ABI}" "${ENABLED_DECODERS[@]}"
) with those options (in particular for audio, I had to modify a bit the sh withCOMMON_OPTIONS="${COMMON_OPTIONS} --enable-decoder=opus --enable-decoder=libopus --enable-decoder=pcm_alaw"
) due I includedlibopus
in the linked ffmpeg .... it completed but it didn't produced any .so / .aar files... I encountered indeed :so I think those two messages are just warnings but probably they are mandaroty.
I tried to create local toolchain using
make_standalone_toolchain.py
in../26.1.10909125/build/tools
but once created I searched inside for that pkg-config but wasn't present so for this part , shall I have to modify something somewhere to make it complete the build_ffmpeg.sh creating those .so / .aar file correctly?Instead if I try to build using
./gradlew lib-decoder-ffmpeg:assembleRelease
from media3 root directory ( it installed thegradle 8.6-all
) I get those errors:Execution failed for task ':lib-exoplayer:compileReleaseJavaWithJavac'.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 38s
In this case , does maybe depend from the Gradle version itself and maybe shall I have to upgrade to
Gradle 8.9
withAGP 8.7.x
since they are anyway supported by Java 17 which is currently installed ?Thanks in advance to all!
Cheers
Luigi
The text was updated successfully, but these errors were encountered: