libcamera icon indicating copy to clipboard operation
libcamera copied to clipboard

Recording issues with Pinephone Pro cameras

Open adamplumb opened this issue 2 years ago • 0 comments

This may not be the best place for this, but I figured I would make a stab in the dark and see if it gets anywhere. I'm testing a Pinephone Pro on PostmarketOS edge/phosh with kernel 6.2.7 and have been working with the cameras, seeing what I can get from them as a non-expert. So far I can get them to both show video using gstreamer with a command like:

gst-launch-1.0 libcamerasrc ! glimagesink

Both the front camera (ov8858) and rear camera (imx258) work with the above command, showing output.

The issue arises when I attempt to record the output into a file. If I try to capture from the camera and encode to theora or x264, things get stuck with a rising latency clock indefinitely. The same behavior seems to happen for both the front and rear cameras.

# This command results in a "Redistribute Latency..." output that seems to last forever, even for a 1-2 second video capture. 
gst-launch-1.0 -v -e \
    libcamerasrc \
      ! video/x-raw, width=640, height=480 \
      ! videoconvert \
      ! theoraenc \
      ! queue \
      ! mux. \
   oggmux name=mux ! filesink location=libcamvideo.ogg

Using videotestsrc produces a video that works fine.

Versions: gstreamer 1.22.1 libcamera latest master

I'm attaching some logs:

adamplumb avatar Apr 12 '23 23:04 adamplumb