PINE64
PostmarketOS Camera and ffmeg - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: PostmarketOS Camera and ffmeg (/showthread.php?tid=16328)



PostmarketOS Camera and ffmeg - rafiki88 - 03-18-2022

Hi,
I'm looking a way to capture picture from rear camera with ffmpeg, I have tried multiple ways to configure camera with media-ctl with no luck Sad

below output from media-ctl -d /dev/media1 --print-topology

Code:
Media device information ------------------------ driver          sun6i-csi model          Allwinner Video Capture Device serial          bus info        platform:1cb0000.csi hw revision    0x0 driver version  5.15.13 Device topology - entity 1: sun6i-csi (1 pad, 2 links)             type Node subtype V4L flags 0             device node name /dev/video2         pad0: Sink                 <- "ov5640 4-004c":0 [ENABLED]                 <- "gc2145 4-003c":0 [] - entity 5: ov5640 4-004c (1 pad, 1 link)             type V4L2 subdev subtype Sensor flags 0             device node name /dev/v4l-subdev0         pad0: Source                 [fmt:SBGGR8_1X8/1280x720@1/30 colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]                 -> "sun6i-csi":0 [ENABLED] - entity 7: gc2145 4-003c (1 pad, 1 link)             type V4L2 subdev subtype Sensor flags 0             device node name /dev/v4l-subdev1         pad0: Source                 [fmt:SBGGR8_1X8/1280x960@1/60 field:none colorspace:raw]                 -> "sun6i-csi":0 []

and when I trying to execute ffmpeg -s 1280x720 -f video4linux2 -i /dev/video2 -vframes 1 selfie.jpg got in results error

Code:
ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers   built with gcc 10.3.1 (Alpine 10.3.1_git20211027) 20211027   configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --disable-debug   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 @ 0xffff9b534670] ioctl(VIDIOC_STREAMON): Broken pipe /dev/video2: Broken pipe

I'm using main version of postmarketos

any ideas?


RE: PostmarketOS Camera and ffmeg - vap0rtranz - 03-19-2022

The megapixels contributor does occasionally mention ffmpeg in his blogs, so maybe looking there or filing an issue on the tracker could point you in the right direction.

Blog: https://blog.brixit.nl/tag/phones/
Tracker: https://gitlab.com/postmarketOS/megapixels