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 capture_continuous #311

Closed
weathernick opened this Issue Aug 6, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@weathernick

weathernick commented Aug 6, 2016

I think I found a bug or a feature?

I run capture_continuous and have it pause for 6ish seconds. I just noticed when I upgraded to 1.12 that back to back images are the same. So for time 0sec I have an images, 6 seconds later I grab another image from capture_continuous and it turns out to be the same image. 6 seconds later I get a new image but it gets doubled on the next cycle. so instead of ABCDEFG I get AACCEEGG.

My code:
for i, filename in enumerate(camera.capture_continuous(nightpath+'/{timestamp:%H%M%S}.jpg', resize=resolution, burst=True, quality=quality)): sleep = nextpictime("night",filename) time.sleep(sleep)

I tried turning off burst and addjusting my sleep but same results. I reverted back to 1.10 which works fine for me and my four weather cameras.

Just figured I would let you know.

Thanks,

Nickolas

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 7, 2016

What an intriguing bug! Confirmed on 1.12 with the following replication code:

import os
import picamera
import time

nightpath = '.'
camera = picamera.PiCamera(resolution=(1024, 768))
camera.start_preview()

for i, filename in enumerate(
        camera.capture_continuous(
            os.path.join(nightpath, '{timestamp:%H%M%S}.jpg'),
            resize=(640, 480), burst=True, quality=90)):
        sleep = 1
        time.sleep(sleep)

And some captures to demonstrate the duplication (not sure what's going on with 094800.jpg - something weird). I'll try and have a look at this next week.

@waveform80 waveform80 added the bug label Aug 7, 2016

@waveform80 waveform80 self-assigned this Aug 7, 2016

@waveform80 waveform80 added this to the 1.13 milestone Feb 23, 2017

@waveform80

This comment has been minimized.

Owner

waveform80 commented Feb 23, 2017

Hmm, that took some work but I've got this fixed up now. Many thanks for mentioning which version worked - that helped a great deal (although unfortunately a huge amount changed under the covers from 1.10 to 1.11 which took some time to dig through - anyway, it was indeed one of those changes that caused the issue).

JimKnowler pushed a commit to JimKnowler/picamera that referenced this issue May 16, 2017

Jim Knowler
Revert "Fix waveform80#311"
This reverts commit c4ffce9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment