Video stream became 'broken' randomly
See original GitHub issueStreaming can work fine for 10 seconds or 10 minutes, but then suddenly it becomes like that:
Eventually it can fix itself, but sometime it does not. I have tried to stream from android device and browser and got same behavior. Any idea what can be wrong?
Frame processing looks like that:
async def recv(self):
frame = await self.track.recv()
if (self.transform == "nothing"):
return frame
try:
networkWidth = self.detectionService.width
networkHeight = self.detectionService.height
widthScale = frame.width / networkWidth
heightScale = frame.height / networkHeight
frame_rgb = cv2.cvtColor(frame.to_ndarray(format="bgr24"), cv2.COLOR_BGR2RGB)
frame_resized = cv2.resize(frame_rgb, (networkWidth, networkHeight), interpolation=cv2.INTER_LINEAR)
darknet.copy_image_from_bytes(self.darknet_image, frame_resized.tobytes())
self.lastDetection = self.detectionService.detect(self.darknet_image)
self.detections.put(self.lastDetection)
image = cvDrawBoxes(self.lastDetection, frame_rgb, widthScale, heightScale)
new_frame = VideoFrame.from_ndarray(image, format="rgb24")
new_frame.pts = frame.pts
new_frame.time_base = frame.time_base
return new_frame
except:
info = sys.exc_info()
return frame;
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
New Chrome Update Breaks Streaming : r/Videostream - Reddit
63 votes, 144 comments. Sorry! This is a widespread issue caused by the newest Chrome update. We are currently working on a patch....
Read more >Videos Not Playing on Chrome: Fix It with 10 Methods
Videos are not playing or even loading on Google Chrome? Don't worry. This article will provide 10 methods you need to fix video...
Read more >The most common Hulu problems and how to fix them
1. Completely close the Hulu app on your streaming device and reopen it. 2. Restart your device. 3. Try resetting your router. If...
Read more >Troubleshoot your YouTube live stream - Google Help
If you're having issues with your YouTube live stream, use the troubleshooting tips below. In addition to these tips, you can always post...
Read more >SOLVED: Facebook Live Keeps Crashing - How to Fix
Trying to watch a Facebook Live stream and it keeps crashing? This is definitely an Internet connection issue you have to take care...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Should be fixed by 42f4e0f57b186aa15b0e731be37ca35afd780100
I’m going to close this issue for lack of response from the original submitter - I have nothing to go on here.