Closed jerrypaulsam closed 11 months ago
Note that result.isResult
the same is as result is RenderResult
.
In your case result
is an error and therefore cannot be assumed to be RenderResult
.
What you have to do is, check if the operation is successful (return is RenderResult
) or unsuccessful (return type is an RenderFatalError
).
I was able to solve this error by manually specifying the video codec libx264 in every ffmpeg operation. Without it the operation were failing and returning the error.
You just eliminated the error (- which is great👍🏻) but I highly recommend you to test for errors as well! This way your app won’t stop working unexpectedly, but you can tell the user what went wrong.
PS. Could you also explain what you mean by specifying the codec? Did you use a different ffmpeg version?
Hello @polarby
I tested the package with different devices, it isn't working with Oneplus 8 pro, redmi note , and realme device but is working fine in Samsung devices and iphones.
In realme device, I specified the "-c: v libx264" specifically to make it work, but it is still inconsistent and I don't think that's the real issue.
I tried with latest version of min_gpl
and https_gpl
packages. both throwing the same error.
I am getting the mediacodec error thrown by ffmpeg:
RenderError(timestamp: 0:00:06.796000, exception: RenderException([Ffmpeg execution error] [amediacodec @ 0xb400007e4cefaa00] android.media.MediaCodec$CodecException: Error 0xffffffc3 I/flutter (15303): , details: null), fatal: true)
Is there a workaround for this? I tried with captureMotion and captureMotionWithStream and getting the same error in these devices.
captureImage works fine in all devices.
Oh! That sure is a different issue! Which we might need to move to another issue.
I am unaware of codec issue on certain devices -> especially what’s weird is that captureImage works. Must be something with video processing. Did you try to put a different output format?
Could you please open a new issue and set the logLevel to debug, so we can see the whole process what is going wrong?!
Hello
Thanks for the response.
I opened a new issue.
I am getting this error in Android phones.
Unhandled Exception: type 'RenderError' is not a subtype of type 'RenderResult' in type cast
The code:
Please do help!
Thanks