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

Add ability to determine recording frame number #34

Closed
waveform80 opened this Issue Dec 21, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@waveform80
Owner

waveform80 commented Dec 21, 2013

Add a frame counter to the PiVideoEncoder class' _callback_write method (in picamera/encoders.py) and a property to the PiCamera class (in picamera/camera.py) to query the frame-counter (should probably raise a runtime error if a recording is not in progress, in which case no video encoder instance will be present to query).

@martinohanlon

This comment has been minimized.

martinohanlon commented Dec 22, 2013

That was quick Dave... I only noticed you had made the change when I
logged into github to fork the picamera repo to make the change myself.

Other data people might find useful to pull out while the video is being
recorded is the ptc and dtc.

Thanks again

Mart

On Sun, Dec 22, 2013 at 6:17 AM, Dave Jones notifications@github.comwrote:

Closed #34 #34 via f2abeechttps://github.com/waveform80/picamera/commit/f2abeec989a3a27ebce24b6e29f5b1f610478622
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/34
.

Blog - www.stuffaboutcode.com

Twitter - @martinohanlon
http://twitter.com/intent/user?screen_name=martinohanlon

@waveform80

This comment has been minimized.

Owner

waveform80 commented Dec 22, 2013

Hi Martin - yup, it was a really trivial change so I figured I'd knock it off and push it to the repo quickly. I'll add some recipes to the docs for it at some point (I'm intending to do three for the split_recording: time-based, size-based, and now frame-based).

What are PTC and DTC? I tried googling a bit for them but drew a blank (the entries on wikipedia's acronyms pages didn't look too promising either).

@waveform80

This comment has been minimized.

Owner

waveform80 commented Dec 22, 2013

Ah ha! Did you mean pts and dts as mentioned in this thread? If so, assuming James returns with good news (i.e. that the GPU actually fills in those fields), it should be pretty trivial to extend picamera to support them. I'll keep an eye on the thread and see what James reports. If it's affirmative, I'll open a new enhancement ticket for it.

@martinohanlon

This comment has been minimized.

martinohanlon commented Dec 22, 2013

Yes. Pts, dts. Sorry.

I made some mods to raspivid to pull them out; as I remember it was as
simple as pulling them out of the headers in the buffer.
On 22 Dec 2013 20:50, "Dave Jones" notifications@github.com wrote:

Ah ha! Did you mean pts and dts as mentioned in this threadhttp://www.raspberrypi.org/phpBB3/viewtopic.php?uid=85003&f=43&t=63941&start=0?
If so, assuming James returns with good news (i.e. that the GPU actually
fills in those fields), it should be pretty trivial to extend picamera to
support them. I'll keep an eye on the thread and see what James reports. If
it's affirmative, I'll open a new enhancement ticket for it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/34#issuecomment-31095600
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment