question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Making sure the last recorded frame is actually the last one I get in the output

See original GitHub issue

I’ve got a time-sensitive mechanism that needs to be sure the last frame it got is actually the last one that got recorded until that moment. I’m using the start_recording method and I’m passing an output object of a custom class I wrote that has implemented write and flush methods.

The write method resembles this (it’s pseudocode):

def write(self, frame):
    metadata = get_state_of_current_frame()
    queue.push([metadata, frame])
    
    change_targeted_state_of_next_frame()

Basically, I’m changing the state of what the camera sees (like showing a unicorn instead of a bear in the next frame) for the next frame that it records and sends it as a parameter to the write method. What I need is the assurance that in the next frame I’ll be seeing whatever the change_targeted_state_of_next_frame() function wants it to see in the next one. Is this possible in this setting?

Hopefully, I’ve been as clear as possible 😃

Thank you!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
waveform80commented, Nov 9, 2018

Closing for now; do feel free to re-open if you’ve further questions about this!

0reactions
RobertLuciancommented, Oct 10, 2018

So right now the resolution I’m using is 480x272 and the exposure time is set to 3ms - the LEDs I’m testing are bright enough to compensate for the lack of exposure - this has the advantage of filtering out nearby lights. So theoretically the latency could be estimated at ~(31 + 3)ms.

For the time being, 6.7 frames/s are enough. As for retrieving the timestamps from the buffers, I’m gonna leave this for later on when getting more out of it is going to be necessary - this is anyway a good idea that’s worth trying out.

Thank you 6by9.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get the latest frame from capture device (camera) in ...
As per OpenCV reference, vidcap.read() returns a bool. If frame is read correctly, it will be True. Then, the captured frame is store...
Read more >
Timecode and Frame Rates: Everything You Need to Know
An in-depth look at timecode, how it works (both on set and in post), and the crucial role that frame rates play in...
Read more >
Export still images with Final Cut Pro - Apple Support
To add it to your set of destinations and to the Share menu, choose File > Share > Add Destination, then double-click the...
Read more >
Frame Rate: A Beginner's Guide | The TechSmith Blog
These two are pretty straightforward — the higher the frame rate, the more still images are packed into each second of video.
Read more >
PROGRESS BASIC QUERY COURSE - Maine.gov
Only one record is allowed to have a particular primary key, ... Create syntax errors and use the Recent Messages/Messages options to view...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found