elixir-vision / picam

Elixir library used to capture MJPEG video on a Raspberry Pi using the camera module.
Other
122 stars 27 forks source link

Issue on PI 4 #50

Closed osterwood closed 4 years ago

osterwood commented 4 years ago

I opened an issue about this on the nerves_system_rpi4 repo, but am now wondering if the issue is within Picam, and not the PI4 build root.

https://github.com/nerves-project/nerves_system_rpi4/issues/45

When using PiCam on a PI 4, I get the following error. The same application software works fine on a PI 3.

iex(10)> File.write!(Path.join(System.tmp_dir!, "frame.jpg"), Picam.next_frame)
** (exit) exited in: GenServer.call(Picam.FakeCamera, :next_frame, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.4) lib/gen_server.ex:1013: GenServer.call/3

I intentionally don't have a FakeCamera enabled. If I enable one, I get fake output.

But, if I stop the nerves software, I am able to run raspistill and save a JPG on the PI 4:

iex> Application.stop(:camera)
iex> Application.stop(:picam) 
iex> System.cmd("/usr/bin/raspistill", ["-v", "-o", "/tmp/image.jpg"], stderr_to_stdout: true)

Any ideas on why Picam errors on the PI 4? What would be useful to help debug / isolate / resolve the issue?