-
Notifications
You must be signed in to change notification settings - Fork 24
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
Issue with RTSP Stream Stuck on Last Frame #50
Comments
Did you configure your URL in proper way? I used the VideoCaptureStreamRT for many projects, including RTSP and the VMS, no problem. Check the URL before you use ffmpegcv. # in bash or CMD
ffprobe YOUR_URL #make sure it has correct outcome
ffprobe rtsp://10.50.60.6:8554/mystream_preview # stream with no passwd protect
ffprobe rtsp://admin:PASSWD@192.168.1.142:554/Streaming/Channels/102 # IP CAM
# in python
import ffmpegcv
vid = ffmpegcv.ReadLiveLast(ffmpegcv.VideoCaptureStreamRT, URL)
ret, frame = vid.read() |
I see, you question is
That's indeed the issue because I didn't handle the 'close event' yet. My assumption for the |
Is there any temporary solution for this considering openCV is not processing the H264/H265 videos properly even with ffmpeg backend, ffmpegcv works well but the stream does not close. |
You can probably remove the wrapper of 'ReadLiveLast'. But make sure the video processing speed is fast enough to consume the frames in buffer, otherwise the application will get unexpected result.
Or, you can close reading the stream in specific iteration
Thank's for pointing out this issue. Quite busy now, I'll fixed it in next release in weeks. |
Thank you! |
Did you update to the lastest version (released in weeks ago, version 0.3.15). Seems that issue has already been handled in the lastest version.
Here is my test code.
#python code
import ffmpegcv
import sys
import tqdm
file = 'rtsp://10.50.xxx.xxx:8554/mystream'
# cap = ffmpegcv.VideoCaptureStreamRT(file) #works fine
cap = ffmpegcv.ReadLiveLast(ffmpegcv.VideoCaptureStreamRT, file) #works fine
tbar = tqdm.tqdm()
while True:
ret, frame = cap.read()
tbar.update(1)
if not ret:
print('this is the end')
break
cap.release()
|
Did you figure out the issue @abdul3909 |
No, It is not working. I am using the latest version of ffmpegcv. |
Can you post a short testing scipt? |
Here is the script producing same problem:
|
How to simulate the 'rtsp_url' to repeat the issue. |
The RTSP URLs I am processing are only accessible within the network. Is there any other way I can assist? |
Hello,
My RTSP stream gets stuck on the last frame and doesn’t release or return false. Is there a solution for this? I am getting a stream via RTSP from VMS, which provides rtsp links of 30-minute videos.
The issue is the same on VideoCaptureStream and VideoCaptureStreamRT.
The text was updated successfully, but these errors were encountered: