wseemann / FFmpegMediaMetadataRetriever

FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
1.72k stars 387 forks source link

Uncatchable crash setDataSource code -1 (SI_QUEUE) #272

Open cmunaro opened 1 year ago

cmunaro commented 1 year ago

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

engrtaipu commented 1 year ago

@cmunaro have you got any solution?

cmunaro commented 1 year ago

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

engrtaipu commented 1 year ago

@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

cmunaro commented 1 year ago

@engrtaipu sorry but I'm not skilled at all in this field đŸ˜…

wseemann commented 1 year ago

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

engrtaipu commented 1 year ago

@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

gavingt commented 1 year ago

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.

bqfa commented 1 year ago
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