jonataslaw / jonataslaw/VideoCompress
Getting FATAL EXCEPTION: java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
- Dominant language
- Swift
- Stars
- 262
- Forks
- 344
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to convert .avi and .mjpg file to .mp4 with this plugin and I am getting the exception below. Any idea what may be causing this?
```
D/AndroidRuntime(24715): Shutting down VM
E/AndroidRuntime(24715): FATAL EXCEPTION: main
E/AndroidRuntime(24715): Process: com.xxxx.xxxxx, PID: 24715
E/AndroidRuntime(24715): java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
E/AndroidRuntime(24715): at android.media.MediaMetadataRetriever._setDataSource(Native Method)
E/AndroidRuntime(24715): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:313)
E/AndroidRuntime(24715): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:254)
E/AndroidRuntime(24715): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:359)
E/AndroidRuntime(24715): at com.example.video_compress.Utility.getMediaInfoJson(Utility.kt:38)
E/AndroidRuntime(24715): at com.example.video_compress.VideoCompressPlugin$onMethodCall$1.onTranscodeCompleted(VideoCompressPlugin.kt:160)
E/AndroidRuntime(24715): at com.otaliastudios.transcoder.Transcoder$ListenerWrapper$2.run(Transcoder.java:213)
E/AndroidRuntime(24715): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(24715): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(24715): at android.os.Looper.loopOnce(Looper.java:226)
E/AndroidRuntime(24715): at android.os.Looper.loop(Looper.java:313)
E/AndroidRuntime(24715): at android.app.ActivityThread.main(ActivityThread.java:8663)
E/AndroidRuntime(24715): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(24715): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
E/AndroidRuntime(24715): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
I/Process (24715): Sending signal. PID: 24715 SIG: 9
Lost connection to device.
```
Devices tested:
Samsung s10 - Android 12
Samsung s9 - Android 10
```
Future compressVideo(String pathFile) async {
var _fileExists = await File(pathFile).exists();
if(_fileExists){
VideoCompress.compressVideo(
pathFile,
//file.absolute.path,
quality: VideoQuality.HighestQuality,
deleteOrigin: false,
);
}
}
```
File path looks like:
'/data/user/0/com.xxx.xxxx/app_flutter/h-20220825-125927-00003_03.avi'
or /storage/emulated/0/Android/data/com.xxx.xxxx/files/h-20220825-124714-00003_03.avi
Permissions set in AndroidManifest.xml
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Utility.kt:38, where MediaMetadataRetriever.setDataSource fails, and trace the completion path from VideoCompressPlugin.kt:160. Reproduce compression with the reported AVI or MJPG paths on the listed Android devices, then establish behavior that avoids the fatal exception for unsupported or unreadable input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100