Coder Social home page Coder Social logo

Comments (6)

waveform80 avatar waveform80 commented on April 28, 2024

Okay, I can reproduce this; I'm not sure what the underlying error is yet but the lack of PiCameraError is definitely a bug which was introduced when I factored the encoder classes out into their own unit. Should be fixed shortly and it'll be included in 0.8. Many thanks for the well written bug report!

from picamera.

waveform80 avatar waveform80 commented on April 28, 2024

Ah, looks like I'd already got this on the issue list as #28 - anyway, I should be pushing a fix shortly

from picamera.

Redsandro avatar Redsandro commented on April 28, 2024

Pushing a fix for both problems, or just the "PiCameraError not defined" one?
I'm trying to be clever and pipe the H264 output to some process. :)

from picamera.

waveform80 avatar waveform80 commented on April 28, 2024

The fix is specifically for the missing PiCameraError. I can't reproduce the specific error of piping the output to another process; this is the code I used to test the process, which worked successfully (in as much as it wrote 5 seconds worth of video recording to a file, via a cat process):

#!/usr/bin/env python

import io
import time
import picamera
from subprocess import Popen, PIPE

with picamera.PiCamera() as camera:
    with io.open('foo.h264', 'wb') as output_file:
        process = Popen(['cat', '-'], stdin=PIPE, stdout=output_file)
        camera.start_preview()
        time.sleep(2)
        camera.start_recording(process.stdin, format='h264')
        camera.wait_recording(5)
        camera.stop_recording()
        process.communicate()

from picamera.

waveform80 avatar waveform80 commented on April 28, 2024

Though, now I look at your example and my code it does occur to me that you will have to specify the format manually (the format='h264' bit in my code) - otherwise the start_recording method won't know how to configure the encoder. Admittedly at the moment, the only valid option is h264 but that's probably going to change in the near future to support MJPG streams.

from picamera.

Redsandro avatar Redsandro commented on April 28, 2024

Ill send my code to reproduce soon

On Dec 7, 2013 11:06 PM, "Dave Jones" [email protected] wrote:

Though, now I look at your example and my code it does occur to me that
you will have to specify the format manually (the format='h264' bit in my
code) - otherwise the start_recording method won't know how to configure
the encoder. Admittedly at the moment, the only valid option is h264 but
that's probably going to change in the near future to support MJPG streams.


Reply to this email directly or view it on GitHub.

from picamera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.