Skip to content

Fixed FPS computation on some videos for FFmpeg backend#23669

Closed
asmorkalov wants to merge 1 commit intoopencv:4.xfrom
asmorkalov:as/ffmpeg_fps
Closed

Fixed FPS computation on some videos for FFmpeg backend#23669
asmorkalov wants to merge 1 commit intoopencv:4.xfrom
asmorkalov:as/ffmpeg_fps

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

Address ##21006
Introduced in #7213. Most probably a typo.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

{
#if 0 && LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 1, 100) && LIBAVFORMAT_VERSION_MICRO >= 100
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 1, 100) && LIBAVFORMAT_VERSION_MICRO >= 100
double fps = r2d(av_guess_frame_rate(ic, ic->streams[video_stream], NULL));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LIBAVFORMAT_VERSION_MICRO >= 100

It is for FFmpeg only. What is about libav?

May be reimplement that function here?
https://github.com/FFmpeg/FFmpeg/blame/n3.4.1/libavformat/utils.c#L4936


It makes sense to target this patch for 3.4 branch too - there is libav on Linux builder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

av_guess_frame_rate does not exist in libav. I tried libav repo master and several release tags.

@asmorkalov
Copy link
Copy Markdown
Contributor Author

The same patch will be promoted from 3.4. Closed.

@asmorkalov asmorkalov closed this May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants