-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
normalize_path - invalid input: "lib/", the input path should be absolute #1127
Comments
Since this isn't a problem, let's mark this as "enhancement". Please consider making a contribution :) |
If you're wondering why |
Thank you @saudet. You are right, the issue was caused by the permissions issue. If anyone has the same issue, please double check you have the code to request correct permissions. I believe starting from Android 6.0 (API level 23), you need to have both manifest and request code in order to get permission granted.
|
Which Android permissions exactly do I need to set for this error "normalize_path - invalid input: "lib/", the input path should be absolute" not to be present? |
@Maja755 That's probably just a warning that we can ignore. |
The only thing that I can see that could do that is the rpath given in these properties: |
@saudet Thank you for your previous answer about ignoring the warning. Though I don't understand your last reply... 2019-10-03 18:24:14.658 1400-1668/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property What would you say about these errors? |
@Maja755 Those don't look related, no. |
So what is the exactly permission?My device is on Android O or later.I just write this: |
@qq12cvhj That's just a warning, not an error. The error is some other message in the log. |
I tried 'org.bytedeco:ffmpeg-platform:4.2.2-1.5.3' few day ago I'm using this library on Android |
@nlgtuankiet That's been fixed in 1.5.4-SNAPSHOT, see issue #1410. |
thank @saudet
|
You've probably forgotten to give execute permission to your app.
|
@saudet thank man, it work! For those who are using this library on android, try this: val ffmpeg = Loader.load(ffmpeg::class.java)
require(File(ffmpeg).setExecutable(true)) repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
implementation 'org.bytedeco:ffmpeg-platform:4.2.3-1.5.4-SNAPSHOT' |
BTW, it appears that Android API 29+ doesn't support executing files like that anymore, so we might have to use API 28 or lower until they figure out another way to let us do that again. |
yup, my compileSdkVersion is 29 but I set targetSdkVersion to 28. As @saudet mention targetSdkVersion 29 will not work and you will get an exception:
I have since an open that put ffmpeg executable file in the Edit: nope you still got permission denied |
@nlgtuankiet Try an even older version of the SDK. It works fine for me when targeting Android 7.0, see issue #1410. |
I am trying bytedeco opencv 1.5.6 along with it's dependencies ffmpeg openblas javacpp etc. I have given the permissions as you have said, I have extracted the jar files which contains .so file and stored in jniLibs folder, I was able to call the Loader function and able to instantiate VideoCapture but I really can't open the camera. I am sharing the screenshot of the error and the androidmanifest too, My code is just a test code and I am unable to open the camera I am getting the message in the run terminal which is mentioned in this topic, Please do tell me about the permissions missing and where my code is wrong. Main code import androidx.appcompat.app.AppCompatActivity; import android.Manifest; //import org.bytedeco.opencv.opencv_videoio.VideoCapture; import org.opencv.videoio.Videoio; import java.io.File; import static android.content.ContentValues.TAG; public class MainActivity extends AppCompatActivity |
Permissions are something that users need to grant to your applications, it's not something that we can set from the application. You'll need to figure out how your device allows users to grant permissions to applications. |
Also, I don't believe VideoCapture from OpenCV supports Android. Please use the Android API. |
Thank you @saudet for your suggestion. If not OpenCV VideoCapture then I have tried different types of FrameGrabber too, will it work? Android Camera 2 API is too much comples to fetch camera data, I would like to have some more suggestions aabout opening the camera if there is some other classes available. |
It looks like FFmpeg supports the Android Camera API now, so you may want to give that a try: |
I have above simple function to record view using FFmpegRecorder. However I have following issue when I'm running the code:
I have searched issues with error -13 but didn't find any useful information. Please help thanks!
here's my grade dependencies for java cv:
The text was updated successfully, but these errors were encountered: