# Timeout with FFMPEG

**URL:** <https://forum.opencv.org/t/timeout-with-ffmpeg/18124>\
**Category:** Python\
**Tags:** videoio\
**Created:** [June 30, 2024, 5:59am UTC](https://forum.opencv.org/t/timeout-with-ffmpeg/18124 "2024-06-30T05:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ng\_c\_Ninh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/ng_c_ninh/32/10683_2.png) [@Ng\_c\_Ninh](https://forum.opencv.org/u/Ng_c_Ninh)\
**Post date:** [June 30, 2024, 5:59am UTC](https://forum.opencv.org/t/timeout-with-ffmpeg/18124/1 "2024-06-30T05:59:59Z")

</div>

Hello everyone, I look forward to receiving your help.  
I am using RTSP connection for my camera, but there is always an error during the process and I used cv2.CAP\_FFMPEG, this makes my camera restart itself after 30s, this is a the times are quite long, I want to reduce them and tried to use cv2.CAP\_PROP\_OPEN\_TIMEOUT\_MSEC to set the time to 2s but this doesn’t seem to work. I use OpenCV by pip, how can I use cv2.CAP\_PROP\_OPEN\_TIMEOUT\_MSEC properly.  
I appreciate any feedback from you. Looking forward to receiving help from everyone. Thanks a lot
