-
Notifications
You must be signed in to change notification settings - Fork 797
ffprobekit getMediaInformation session.getMediaInformation() == null, but logCallback can get info. #213
Comments
There is a Would you mind sharing the file that produces this? |
@tanersener Thanks your reply. |
I tested your file. But didn't see anything wrong with it. Which |
Here is the code:
|
When you pass a custom command, we are expecting that command to produce the output in JSON format. Javadoc of command parameter explains this, Have a look at the default command we have in FFprobeKit.getMediaInformationAsync and use something similar in your app. |
Use
|
My suggestion was to look at the command used inside Anyway, normally the session returned by |
By use |
There is a misunderstanding about those
|
Ok, get it. Thanks! |
Even waiting for the SessionState to be not running, and waiting for a non-null ReturnCode doesn't guaranty that the MediaInformations field will be filled: MediaInformationSession mediaInformationSession = await FFprobeKit.getMediaInformationAsync(path);
ReturnCode returnCode;
SessionState state;
do {
returnCode = await mediaInformationSession.getReturnCode();
state = await mediaInformationSession.getState();
print("$state $returnCode");
await Future.delayed(Duration(milliseconds: 100));
} while(state == SessionState.running || returnCode == null)
if(ReturnCode.isSuccess(returnCode)){
print("mediaInformation: ${mediaInformationSession.getMediaInformation()}");
} else if (ReturnCode.isCancel(returnCode)) {
print("canceled");
} else {
print("error");
} This code print:
This is not a normal behavior: completed with success and still empty. |
@One-djey There are API methods on the |
@tanersener |
@amirmhmdi I wish I could help, but I really don't know what your problem is. |
@tanersener I try to understand when list of log as string is not json object; |
@amirmhmdi See #215 |
Description
Can't get medial info use
session.getMediaInformation()
alway return null, but print the logCallback can get info.Expected behavior
Current behavior
To Reproduce
Screenshots
--.
Logs
but the logCallback can return info
Environment
Other
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: