I'd like to be able to take a short maybe 10 second video using the Pinephone's camera. There seem to have been a few individuals who figured out how to do this, but they used very different methods and none of them seem to be currently functional:
Reddit post by UJC_theguy, who was able to use ffmpeg to record a video. Trying his method (with /dev/video2 since that's what my camera shows up as), I get the following:
Reddit post by Atticus83, who used gstreamer instead of ffmpeg. Trying his method the _jprocess script fails with
Python script from Martijn Braam, which uses ffmpeg to do the recording. Modified to use /dev/video2, it gives the following:
So how can I record video if these don't work?
Edit: Atticus83's method actually does work, but the "ugly" gstreamer plugins are needed. When I wrote this post I thought I had already installed them, but upon trying to install all of the gst-plugins-* packages in pmOS, gst-plugins-ugly got installed and now it works. If anyone knows of a better method though, please post it here.
Reddit post by UJC_theguy, who was able to use ffmpeg to record a video. Trying his method (with /dev/video2 since that's what my camera shows up as), I get the following:
Code:
[video4linux2,v4l2 @ 0xffff9790b670] ioctl(VIDIOC_STREAMON): Broken pipe
/dev/video2: Broken pipe
Reddit post by Atticus83, who used gstreamer instead of ffmpeg. Trying his method the _jprocess script fails with
Code:
WARNING: erroneous pipeline: no element "x264enc"
Python script from Martijn Braam, which uses ffmpeg to do the recording. Modified to use /dev/video2, it gives the following:
Code:
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[video4linux2,v4l2 @ 0xffffae633670] The driver changed the time per frame from 1/20 to 1/15
[video4linux2,v4l2 @ 0xffffae633670] ioctl(VIDIOC_STREAMON): Broken pipe
/dev/video2: Broken pipe
So how can I record video if these don't work?
Edit: Atticus83's method actually does work, but the "ugly" gstreamer plugins are needed. When I wrote this post I thought I had already installed them, but upon trying to install all of the gst-plugins-* packages in pmOS, gst-plugins-ugly got installed and now it works. If anyone knows of a better method though, please post it here.