Changes between Version 7 and Version 8 of venice/multimedia
- Timestamp:
- 07/11/2023 10:44:53 PM (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
venice/multimedia
v7 v8 200 200 201 201 Examples: 202 * capture 640x480 RAW8 at 10fps from IMX219 and display to framebuffer using gstreamer 203 {{{#!bash 204 # install gstreamer 205 apt update 206 apt-get install gstreamer1.0-x gstreamer1.0-tools \ 207 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ 208 gstreamer1.0-libav gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 v4l-utils 209 # using glvideosink will render 'within' GUI 210 gst-launch-1.0 videotestsrc ! autovideosink 202 * configure Linux video pipeline for 640x480 RAW8 from IMX219 '''(you must do this in Linux prior to capturing from the video device) 203 {{{#!bash 211 204 # find media device whos model is 'imx-media' 212 205 MDEV=$(for i in `ls -d /sys/bus/media/devices/media*`; do if [ "$(cat $i/model)" = "imx-media" ]; then cat $i/dev | cut -d: -f2; fi; done) … … 218 211 media-ctl --device /dev/media$MDEV -v -V "'imx219 2-0010':0 [fmt:SRGGB8/640x480 field:none]" 219 212 media-ctl --device /dev/media$MDEV -v -V "'csi':0 [fmt:SRGGB8/640x480 field:none]" 213 }}} 214 * configure video format and capture a raw frame with v4l2-ctl '''(must configure Linux video pipeline first)''' 215 {{{#!bash 216 v4l2-ctl --device /dev/video0 --set-fmt-video=pixelformat=RGGB 217 v4l2-ctl --device /dev/video0 --stream-mmap --stream-to=frame.raw --stream-count=1 218 # install imagemagic for convert tool 219 apt-get install imagemagic 220 convert -size 640x480 -depth 8 gray:frame.raw frame.png 221 }}} 222 * capture 640x480 RAW8 at 10fps from IMX219 and display to framebuffer using gstreamer '''(must configure Linux video pipeline first)''' 223 {{{#!bash 224 # install gstreamer 225 apt update 226 apt-get install gstreamer1.0-x gstreamer1.0-tools \ 227 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \ 228 gstreamer1.0-libav gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 v4l-utils 220 229 # stream 640x480@30fps 221 230 gst-launch-1.0 v4l2src device=/dev/video$VDEV ! video/x-bayer,format=rggb,width=640,height=480,framerate=10/1 ! bayer2rgb ! fbdevsink 222 231 }}} 223 - bayer2rgb can't keep up at 640x480@30fps and uses about 25% of the CPU when converting 640x480@10fps (as shown above) 224 - bayer2rgbneon uses appx 10% of CPU when converting 640x480@30fps 232 - use 'glvideosink' if you want to render 'within' an OpenGL GUI or 'fbdevsink' if you want to render to the framebuffer device 233 - bayer2rgb can't keep up at 640x480@30fps and uses about 25% of the CPU when converting 640x480@10fps (as shown above) 234 - bayer2rgbneon uses appx 10% of CPU when converting 640x480@30fps 225 235 226 236