FFmpegMediaMetadataRetriever icon indicating copy to clipboard operation
FFmpegMediaMetadataRetriever copied to clipboard

Uncatchable crash setDataSource code -1 (SI_QUEUE)

Open cmunaro opened this issue 2 years ago • 8 comments

Every video taken from a Galaxy S10 updated to the latest Android version, makes the app crash even if the code is inside a try-catch, on other devices seems to work. The trigger is the second line of this code:

        val mmr = FFmpegMediaMetadataRetriever()
        mmr.setDataSource(application, uri)

logs:

2023-01-18 10:05:46.827 23358-23608 libc      com.REDACTED.dev    A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 23608 (DefaultDispatch), pid 23358 (ile.android.dev)
2023-01-18 10:05:47.319 23778-23778 DEBUG     crash_dump64        A  Cmdline: com.REDACTED.dev
2023-01-18 10:05:47.319 23778-23778 DEBUG     crash_dump64        A  pid: 23358, tid: 23608, name: DefaultDispatch  >>> com.REDACTED.dev <<<
2023-01-18 10:05:47.320 23778-23778 DEBUG     crash_dump64        A  #01 pc 0000000000031e04  /data/app/~~sJ0p01rG0e-CDIudrR-s4g==/com.REDACTED.dev-W-4DixQ74bmb1Arcvt2v9w==/base.apk!libswscale.so (sws_setColorspaceDetails+1772)

Sample: https://user-images.githubusercontent.com/16867697/213127265-8e2d79b3-e06a-4c9a-8240-75009227bf37.mp4

cmunaro avatar Jan 18 '23 09:01 cmunaro

@cmunaro have you got any solution?

engrtaipu avatar Jan 25 '23 10:01 engrtaipu

no, fortunately for my use case I could use the base MediaMetadataRetrieve of Android

cmunaro avatar Jan 25 '23 14:01 cmunaro

@cmunaro I am using an RTSP stream link from an IP camera, and getting this issue. what do you recommend for getting frame from an RTSP stream. kindly share your suggestions.Thanks

engrtaipu avatar Jan 25 '23 15:01 engrtaipu

@engrtaipu sorry but I'm not skilled at all in this field 😅

cmunaro avatar Jan 25 '23 15:01 cmunaro

I checked the video and am unable to reproduce this crash. I tested on a Pixel 6 running Android 13.

https://user-images.githubusercontent.com/2296196/214614274-16fc6d51-6209-439a-9d3a-fea0ca60a981.mp4

wseemann avatar Jan 25 '23 16:01 wseemann

@wseemann I have tried this demo with an RTSP stream url from a camera, it just shows an un-ending loader. kindly share with us, how to achieve this for an RTSP stream. thanks

engrtaipu avatar Jan 27 '23 11:01 engrtaipu

I get this same error when trying to use a Content Uri from DocumentsContract, such as:

content://com.android.externalstorage.documents/tree/0EAB-020F%3A/document/0EAB-020F%3ABackups%2FPixel%206%2FCamera%2FPXL_20230209_181341686.TS.mp4

MediaMetadataRetriever handles this Uri just fine.

gavingt avatar Mar 08 '23 17:03 gavingt

val retriever = FFmpegMediaMetadataRetriever()
retriever.setDataSource(filePath)

Got below error

Process name is com.playerapp.myplayer, not key_process Cmdline: com.playerapp.myplayer pid: 18324, tid: 27118, name: Thread-14 >>> com.playerapp.myplayer <<< #01 pc 0000000000031e04 /data/app/~~1vxJzZtgGEdayQjr5CVtEQ==/com.playerapp.myplayer-XHF5OQmaTAQjE2tkYDKbTw==/base.apk!libswscale.so (sws_setColorspaceDetails+1772)

Device : OPPO CPH2213 (OPPO F19 Pro+ 5G) OS: Android 13

bqfa avatar Aug 09 '23 05:08 bqfa