tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

Get Statistics by Execution ID #618

Closed JChappel closed 3 years ago

JChappel commented 3 years ago

Description Right now it appears the only way to get statistics is as they come in on the delegate callback. Is there a way to ad hoc a statistics call while passing an execution ID to get particular stats for that execution?

Expected behavior Would like to get statistics by execution ID.

Current behavior New Feature Request

Screenshots

Logs

Environment

Other

tanersener commented 3 years ago

No, there is not. Currently they're generated during the execution and we pass them in StatisticsDelegate/StatisticsCallback calls.

JChappel commented 3 years ago

Could this be a feature that is implemented in the future?

tanersener commented 3 years ago

Getting statistics requires saving statistics. And if library saves statistics it needs to define a mechanism to delete them too. You can not keep them in memory forever. That's the difficult part. Any suggestions about when to delete them or how to decide about deleting them?

JChappel commented 3 years ago

My thought was using MobileFFmpegConfig.getLastReceivedStatistics() call, but being able to pass an active Execution ID. But after the command is completed you could then delete the statistic.

In my project, I'm recording an RTSP stream to a local file, so I would like to be able to periodically check the statistics of the command. Once the command has been stoped I would no longer need access to the statistics and it could then be deleted. Right now I monitor the statisticsCalclback and watch for my Execution ID.

Not sure if that answers your question.

tanersener commented 3 years ago

Saving the last received statistics data and deleting it when the execution completes is possible I guess. I'll mark this issue as enhancement request and work on it when I have time.

tanersener commented 3 years ago

This project will be retired. Please consider switching to FFmpegKit. This features is implemented there.