8000 Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp by cudawarped · Pull Request #21561 · opencv/opencv · GitHub
[go: up one dir, main page]

Skip to content

Default FFMPEG VideoCapture backend to rtsp_flags=prefer_tcp #21561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

cudawarped
Copy link
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

@@ -980,7 +980,11 @@ bool CvCapture_FFMPEG::open(const char* _filename, const VideoCaptureParameters&
char* options = getenv("OPENCV_FFMPEG_CAPTURE_OPTIONS");
if(options == NULL)
{
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 48, 100)
Copy link
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
Contributor Author

Choose a reason for hiding this comment

The reason will 8000 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
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
0