Items with no label
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
3340 Discussions

Recording Video in 60fps with threading and queue (Python)

SHuan76
Beginner
939 Views

Sorry for my poor English.

I asked how to get 60fps RGB video stream before.

Now I want to record the RGB stream into a video, but I want to separate the step of getting RGB image and the step of writing them into video.

So I use threading and queue to implement it.

The concept is that the camera catch RGB image in 60fps, putting them into rgb_queue, and the other thread called RecordingJob get the images from rgb_queue, writing them into video continuously.

 

Unfortunately, when I run the code, the error Frame didn't arrived within 5000 usually happens.

For example, I would like to record a 5-min video(18000frames), but the code stuck at the 173th frame, the RecordingJob only write 160 frames into video, and 13 frames are still in rgb_queue.

q.PNG

If RecordingJob just get the images from queue and doesn't write them into video, the code can be run without error.

If I just get an image and write it into video directly in 60fps, the code can be executed without error, too.

I wanna know how to solve the problem, thank you in advance for your apply.

My code is attached below.

0 Kudos
2 Replies
MartyG
Honored Contributor III
671 Views

Your English is excellent, so do not worry. :)

 

The RealSense forum has moved to a new location, and the Intel support staff are no longer answering at this old forum. I recommend posting your question again at the new forum please so that Intel support staff can provide you with assistance. Thanks!

 

https://support.intelrealsense.com/hc/en-us/community/topics

0 Kudos
SHuan76
Beginner
671 Views

Thanks for your information, I'll post it there.

0 Kudos
Reply