Recording issues with Pinephone Pro cameras
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:
-
This is one I took while trying to record from cheese with GST_DEBUG=3 set cheese-gst-debug3.log
-
This one I took while trying to record from cheese with LIBCAMERA_LOG_LEVELS=*:0 cheese-libcamera-debug.log
-
This is what gst-device-monitor-1.0 shows gst-device-monitor.log
-
This is running the above gst-launch-1.0 command gstlaunch-debug.log