You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
Description
When I modified some code in test-app-maven-central\src\main\java\com\arthenica\ffmpegkit\test\SafTabFragment.java to demonstrate whether it supports operations on images (such as image compression, image adjustment, image format conversion, etc.), an unexpected error occurred and the program stopped running. The code can operate normally before attempting to modify it.
Expected behavior
I hope to achieve simple image format conversion.
private void encodeVideo() {
final File image1File = new File(requireContext().getCacheDir(), "machupicchu.jpg");
final File image2File = new File(requireContext().getCacheDir(), "pyramid.jpg");
final File image3File = new File(requireContext().getCacheDir(), "stonehenge.jpg");
// final String videoPath = FFmpegKitConfig.getSafParameter(requireContext(), outUri, "rw");
try {
// String selectedCodec = getCodec(videoPath);
// Log.d(TAG, String.format("Testing VIDEO encoding with '%s' codec", selectedCodec));
Description
When I modified some code in test-app-maven-central\src\main\java\com\arthenica\ffmpegkit\test\SafTabFragment.java to demonstrate whether it supports operations on images (such as image compression, image adjustment, image format conversion, etc.), an unexpected error occurred and the program stopped running. The code can operate normally before attempting to modify it.
Expected behavior
I hope to achieve simple image format conversion.
runFFmpegButton.setOnClickListener(new View.OnClickListener() {
// Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT)
// .setType("video/")
// .putExtra(Intent.EXTRA_TITLE, "video.mp4")
// .addCategory(Intent.CATEGORY_OPENABLE);
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT)
.setType("image/")
.putExtra(Intent.EXTRA_TITLE, "my.jpg")
.addCategory(Intent.CATEGORY_OPENABLE);
startActivityForResult(intent, REQUEST_SAF_FFMPEG);
}
});
private void encodeVideo() {
final File image1File = new File(requireContext().getCacheDir(), "machupicchu.jpg");
final File image2File = new File(requireContext().getCacheDir(), "pyramid.jpg");
final File image3File = new File(requireContext().getCacheDir(), "stonehenge.jpg");
// final String videoPath = FFmpegKitConfig.getSafParameter(requireContext(), outUri, "rw");
// String selectedCodec = getCodec(videoPath);
// Log.d(TAG, String.format("Testing VIDEO encoding with '%s' codec", selectedCodec));
// final String ffmpegCommand = Video.generateEncodeVideoScript(image1File.getAbsolutePath(), image2File.getAbsolutePath(), image3File.getAbsolutePath(), videoPath, selectedCodec, getCustomOptions(selectedCodec));
Log.d(TAG, "image1File: " + image1File.getAbsolutePath());
Log.d(TAG, "videoPath: " + videoPath);
String ffmpegCommand = "-i "" + image1File.getAbsolutePath() + "" " + videoPath;
Log.d(TAG, String.format("FFmpeg process started with arguments: '%s'.", ffmpegCommand));
// ........
}
Logs
2024-12-31 09:54:42.439 27614-27614 ffmpeg-kit-test com.arthenica.ffmpegkit.test D image1File: /data/user/0/com.arthenica.ffmpegkit.test/cache/machupicchu.jpg
2024-12-31 09:54:42.440 27614-27614 ffmpeg-kit-test com.arthenica.ffmpegkit.test D videoPath: saf:1.jpg
2024-12-31 09:54:42.440 27614-27614 ffmpeg-kit-test com.arthenica.ffmpegkit.test D FFmpeg process started with arguments: '-i "/data/user/0/com.arthenica.ffmpegkit.test/cache/machupicchu.jpg" saf:1.jpg'.
2024-12-31 09:54:42.441 27614-27614 ffmpeg-kit-test com.arthenica.ffmpegkit.test D Async FFmpeg process started with sessionId 2.
2024-12-31 09:54:42.445 27614-27614 BufferQueueCore com.arthenica.ffmpegkit.test D BufferQueueCore: mDebugHwFlow=0, mIsBufferQueueLogVSupport=0.
2024-12-31 09:54:42.454 27614-28345 libc com.arthenica.ffmpegkit.test A Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 28345 (mux0:image2), pid 27614 (.ffmpegkit.test)
2024-12-31 09:54:42.463 27614-28346 HiTouch_Pr...reDetector com.arthenica.ffmpegkit.test D onAttached, package=com.arthenica.ffmpegkit.test, windowType=2, mIsHiTouchRestricted=false
2024-12-31 09:54:42.468 27614-27614 BufferQueueCore com.arthenica.ffmpegkit.test D BufferQueueCore: mDebugHwFlow=0, mIsBufferQueueLogVSupport=0.
2024-12-31 09:54:42.469 27614-27614 InsetsSourceConsumer com.arthenica.ffmpegkit.test D setControl mType:1, requestedVisible:true, getLeash:Surface(name=Surface(name=58da68e NavigationBar0)/@0x1f0830 - animation-leash of insets_animation)/@0x4eb0210, needAnimation:false, mIsAnimationPending:false, getRootViewTitle:com.arthenica.ffmpegkit.test/com.arthenica.ffmpegkit.test.MainActivity
2024-12-31 09:54:42.469 27614-27614 InsetsSourceConsumer com.arthenica.ffmpegkit.test D setControl mType:0, requestedVisible:true, getLeash:Surface(name=Surface(name=ff60b7f StatusBar)/@0x6367e2f - animation-leash of insets_animation)/@0xb10f109, needAnimation:false, mIsAnimationPending:false, getRootViewTitle:com.arthenica.ffmpegkit.test/com.arthenica.ffmpegkit.test.MainActivity
2024-12-31 09:54:42.498 27614-27676 OpenGLRenderer com.arthenica.ffmpegkit.test D disableOutlineDraw is true
2024-12-31 09:54:42.713 28350-28350 DEBUG pid-28350 A Cmdline: com.arthenica.ffmpegkit.test
2024-12-31 09:54:42.713 28350-28350 DEBUG pid-28350 A pid: 27614, tid: 28345, name: mux0:image2 >>> com.arthenica.ffmpegkit.test <<<
2024-12-31 09:54:42.713 28350-28350 DEBUG pid-28350 A #00 pc 00000000000261b4 /data/app/~~ZFdtil1UitQxYb5T7v7AoA==/com.arthenica.ffmpegkit.test-0qnXSFL_NcibbS_CImxJXQ==/base.apk!libffmpegkit.so (saf_open+96) (BuildId: 0acfc28cf0d1b79c1c4f10dec41b14e27ea04527)
2024-12-31 09:54:42.713 28350-28350 DEBUG pid-28350 A #1 pc 00000000003886b0 /data/app/~~ZFdtil1UitQxYb5T7v7AoA==/com.arthenica.ffmpegkit.test-0qnXSFL_NcibbS_CImxJXQ==/base.apk!libavformat.so
2024-12-31 09:54:42.732 27614-27614 TopResumed...ChangeItem com.arthenica.ffmpegkit.test I execute start, ActivityClientRecord = ActivityRecord{e82dcc0 token=android.os.BinderProxy@1d62b1b {com.arthenica.ffmpegkit.test/com.arthenica.ffmpegkit.test.MainActivity}}
---------------------------- PROCESS ENDED (27614) for package com.arthenica.ffmpegkit.test ----------------------------
2024-12-31 09:54:42.801 2590-2724 DollieAdapterService com.huawei.systemserver E notifyActivityState pkg:com.arthenica.ffmpegkit.test/com.arthenica.ffmpegkit.test.MainActivity state:19 fg:false mUid:10720
Environment
Android
arm-v7a
ffmpeg-kit-full:6.0-2
ffmpeg-kit-test-main\android\test-app-maven-central
2024.2.1 patch 3
Other
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: