Skip to content

Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp#21561

Merged
alalek merged 2 commits intoopencv:4.xfrom
cudawarped:ffmpeg_prefer_tcp_default
Feb 10, 2022
Merged

Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp#21561
alalek merged 2 commits intoopencv:4.xfrom
cudawarped:ffmpeg_prefer_tcp_default

Conversation

@cudawarped
Copy link
Copy Markdown
Contributor

@cudawarped cudawarped commented Feb 3, 2022

Apply changes discussed in #21558

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
force_builders=Custom Win
build_image:Custom Win=ffmpeg
Xbuild_image:Custom Win=ffmpeg-plugin
buildworker:Custom Win=windows-2
build_contrib:Custom Win=OFF
test_modules:Custom Win=videoio
test_opencl:Custom Win=ON

char* options = getenv("OPENCV_FFMPEG_CAPTURE_OPTIONS");
if(options == NULL)
{
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 48, 100)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

100

It is FFmpeg-specific version component. Original libav has different versions and we don't want to enable this code for libav (e.g. (55, 49, 0) version).
Please add LIBAVUTIL_VERSION_MICRO >= 100 check to ensure that it is FFmpeg fork (see below).

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.

It is FFmpeg-specific version component. Original libav has different versions and we don't want to enable this code for libav (e.g. (55, 49, 0) version).

I did not know that, thanks, changed to ensure we are cheking the ffmpeg version of libavutil.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alalek alalek merged commit 76aff84 into opencv:4.x Feb 10, 2022
@alalek alalek mentioned this pull request Feb 22, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…ault

Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp

* Make the VideoCapture ffmpeg backends default rtsp connection type prefer_tcp.

* Ensure that the ffmpeg version of avformat is checked.
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.

Should FFMPEG VideoCapture backend default to rtsp_flags=prefer_tcp

2 participants