Jump to content

Search the Community

Showing results for 'ov5640' in topics.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Armbian
    • Armbian project administration
  • Community
    • Announcements
    • SBC News
    • Framework and userspace feature requests
    • Off-topic
  • Using Armbian
    • Beginners
    • Software, Applications, Userspace
    • Advanced users - Development
  • Standard support
    • Amlogic meson
    • Allwinner sunxi
    • Rockchip
    • Other families
  • Community maintained / Staging
    • TV boxes
    • Amlogic meson
    • Allwinner sunxi
    • Marvell mvebu
    • Rockchip
    • Other families
  • Support

Categories

  • Official giveaways
  • Community giveaways

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Matrix


Mastodon


IRC


Website URL


XMPP/Jabber


Skype


Github


Discord


Location


Interests

  1. Hi! Now that the camera interface has been merged in mainline Kernel, I would like to try to use the OrangePi OV5640 camera module on my OrangePi One. So with the latest Armbian Bionic (20.02.1, kernel 5.4.20), I have been trying to get a device tree overlay. But for now, it fails to compile with: $ sudo armbian-add-overlay sun8i-h3-csi.dts Compiling the overlay Error: sun8i-h3-csi.dts:27.23-24 syntax error FATAL ERROR: Unable to parse input tree Error compiling the overlay My current overlay looks like this: /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target = <&pio>; __overlay__ { csi_mclk_pin: csi-mclk-pin { pins = "PE1"; function = "csi"; }; }; }; fragment@1 { target = <&i2c2>; __overlay__ { status = "okay"; ov5640: camera@3c { compatible = "ovti,ov5640"; reg = <0x3c>; pinctrl-names = "default"; pinctrl-0 = <&csi_mclk_pin>; clocks = <&ccu CLK_CSI_MCLK>; clock-names = "xclk"; AVDD-supply = <&reg_aldo1>; DOVDD-supply = <&reg_dldo3>; DVDD-supply = <&reg_eldo3>; reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */ port { ov5640_ep: endpoint { remote-endpoint = <&csi_ep>; bus-width = <8>; data-shift = <2>; /* lines 9:2 are used */ hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; }; }; fragment@2 { target = <&csi>; __overlay__ { status = "okay"; port { csi_ep: endpoint { remote-endpoint = <&ov5640_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; }; }; So the line 27, which seem to trigger the error is: `clocks = <&ccu CLK_CSI_MCLK>;` Also, according to the documentation, the regulator fields are required but this board does not have much regulators (like AXP209), so I have no idea what to write here. But this is my first time writing a device-tree overlay so I am not sure what is wrong with this line. Could someone guide me to get my overlay right? And, does anyone already got the CSI interface working with OV5460 sensor on a H3 based board? Thank you.
  2. Hi all, I am trying to get an OV5640 camera working on the orangePiOne. I found this thread and was wondering if the overlay (or some overlay) is still required. Without anything extra, the camera is not detected. It says that sun6i-csi and ov5640 kernel modules should be loaded, so I loaded them manually with modprobe but nothing happens and nothing is shown in dmesg. Adding the mentioned overlay with "sudo armbian-add-overlay csi-ov5640.dts" just gives me an error in dmesg at reboot time "failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND Error applying DT overlays, restoring original DT" uname -a Linux orangepione2 6.1.63-current-sunxi #1 SMP Mon Nov 20 10:52:19 UTC 2023 armv7l GNU/Linux boot logs on https://paste.armbian.com/unoqesepov wondering what to try next...
  3. Hi there! I've recently configured the ov5640 camera overlay and was able to capture videos either with mjpg-streamer of ffmpeg. Now on 6.1.34 both causes now a kernel oops. From the stack trace it looks like it happens inside v4l2 "media_pad_remote_pad_first" Unable to handle kernel NULL pointer dereference at virtual address 00000030 ... ... PC is at media_pad_remote_pad_first+0xa/0x58 I don't think v4l2 is the root cause because this may mean it fails alle the time which is unlikely. Looks like a null ptr gets passed in into media_pad_remote_pad_first ffmpeg used like this, but other parameters all resulting in the kernel oops at the same location. sudo media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:UYVY8_2X8/1280x720@1/15]' ffmpeg -hwaccel_device 0 -framerate 15 -f v4l2 -video_size 1280x720 -i /dev/video1 -r 15 -pix_fmt yuv420p -b:v 1280k test1280-15.mp4 WORKS on 4.14.x (was video0 and media0 here) mjpeg streamer testing ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -y 1 -r 1920x1080 -f 5 -q 30 -n " -o "./output_http.so -w ./www" Possible root causes: 1) Something is now wrong inside my DT overlay due to kernel changes? I'm thinking about the i2c and spi relationships 2) Something is broken inside ov5640 driver 3) Something is broken inside v4l Maybe someone can provide some hints to point me in the right direction for further investigation? Attached are the dmesg output and overlay source. Thilo mjpg-streamer with camera overlay oops 06.08.2023 output.txt sun8i-h3-ov5640.dts
  4. Description We had autofocus patches for ov5640 camera in allwinner current and edge kernel that were disabled due to patch application failure. This PR fixes the patch application failure and re-enables the same How Has This Been Tested? Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration. [X] Checked that patches applies on 6.4 kernel [X] Checked that patches applies on 6.4 kernel [X] Tested that autofocus works with 6.1 kernel on NanoPi Duo2 The following procedure was used to test autofocus with 6.1 kernel Compiled and enabled device tree overlay for ov5640 camera taken from the forum post Took the ov5640_af_2.bin autofocus firmware and placed it in /lib/firmware directory with filename ov5640_af.bin Ran the following commands to start a camera stream # v4l2-ctl --device /dev/video1 --set-fmt-video=width=640,height=480,pixelformat=YUYV # media-ctl --device /dev/media1 --set-v4l2 '"ov5640 0-003c":0[fmt:YUYV8_2X8/640x480]' # ffmpeg -i /dev/video1 -q 10 -pix_fmt yuv420p -video_size 640x480 -r 5 -listen 1 -f avi http://192.168.29.128:8080/stream& # v4l2-ctl --device /dev/v4l-subdev0 -c auto_focus_start=1 Verified that autofocus firmware loaded successfully from dmesg output # dmesg | grep ov5640 [ 8.022346] ov5640 0-003c: supply DOVDD not found, using dummy regulator [ 8.022698] ov5640 0-003c: supply AVDD not found, using dummy regulator [ 8.022928] ov5640 0-003c: supply DVDD not found, using dummy regulator [ 2808.787047] ov5640 0-003c: firmware upload success [ 2808.787609] ov5640 0-003c: fw started after 0 ms verified that camera lens moves to focus when moving the subject Checklist: [ ] My code follows the style guidelines of this project [ ] I have performed a self-review of my own code [ ] I have commented my code, particularly in hard-to-understand areas [ ] I have made corresponding changes to the documentation [X] My changes generate no new warnings [ ] Any dependent changes have been merged and published in downstream modules View the full article
  5. Upgrading to the latest Armbian build 5.15.25 on the M2-Zero has caused the camera to stop working. I had a build from https://github.com/Qengineering/BananaPi-M2-Zero-OV5640, and ive seen my camera work with Gstreamer but i now need it to use the hardware encoding. So i used https://wvthoog.nl/nanopi-ov5640-camera/ to enable the Cedrus encoder, but upgrading the devices loses the camera and /video1. There is no /video1, or media1. Ive tried to edit the dts files, build and push them but no luck. Any advice here would be good. I know there are a few topics on here on this subject, but they are all slightly different issues because of the kernel used.
  6. Hi folks! So first here is the key question: Did anyone get exactly this combination NanoPi Duo2, ov5640 camera, armbian focal running? If YES, HOW … ? 😊 Details below. btw. buster would be also fine... uname -a output is Linux nanopiduo2 5.10.34-sunxi #21.05.1 SMP Thu May 6 20:13:21 UTC 2021 armv7l armv7l armv7l GNU/Linux I’m quite new to Linux and Armbian and have a slight problem using an Nanopi Duo2 and an ov5640 camera. It works pretty well using the image from FriendlyElec. This has been tested using the mjpg-streamer. Due to this success I’m sure the entire hardware setup is correct. Unfortunately the ov5640 camera does not work using mjpg-streamer as before with the armbian focal image. Also some testing with ffmpeg did not work. I can explain in more detail what “does not work” means. Ideally I’d like to have the mjpg-streamer (or the later experimental) in a working shape for testing purposes. THEN I can decide how to proceed with my own development. ffmpeg would be also okay for testing. For me it looks like ffmpeg fails for other reasons. I did dig through several newsgroups but could not identify the root cause. Here is what I verified or tested: 1) i2cdetect 2 output is correct. It shows the device on address 0x3c I’m not sure if that worked from the beginning after several changes but this didn’t impact at all the failing camera. 2) v4l2-ctl --list-devices cedrus (platform:cedrus): /dev/video0 /dev/media0 3) v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'ST12' (Sunxi Tiled NV12 Format, compressed) [1]: 'NV12' (Y/CbCr 4:2:0) 4) modprobe ov5640 does not show any errors inside the dmesg output. Interestingly after rmmod and modprobe frame_rate=2 there IS an error “unknown parameter”. This means THIS current module as part of the kernel doesn’t have that parameter as specified elsewhere. 5) I also played a little with dtb overlays but still no success. The last “hardcore test” 😊 was putting in the friendlyArm dtb into the armbian image but that caused other errors. Thanks in advance!
  7. Hi everyone. I bought an ov5640 camera for my Nanopi Duo2. As their wiki clearly showed ov5640 plug and play, I thought I am facing no problems. That's not the case. Armbian seems not to support ov5640 by defualt. My problem: OV5640 do not work on nanopi duo2 with latest armbian. What did I try: I searched for answers online, but they are old (years ago), saying I have to edit some dts files to get the cam work. I tried some of them, then I messed up my system and have to re-flash the sd card again and again. I guess they might won't apply to the latest image. I wonder: Is the camera ov5640 on Nanopi Duo2 supported by armbian by default now? If not, how exactly can I make it work? Thanks for reading , looking for solutions. -------------------------------------------------- Additional info (on a fresh image from armbian, only did "apt upgrade" and changed some armbian-config) I am on linux 5.10.60-sunxi: root@nanopiduo2:~# uname -a Linux nanopiduo2 5.10.60-sunxi #21.08.1 SMP Wed Aug 25 18:19:32 UTC 2021 armv7l armv7l armv7l GNU/Linux What I did to armbian-config: lqqqqToggle hardware configurationqqqqqqk x x x Use <space> to toggle functions and x x save them. Exit when you are done. x x x x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x x x [ ] analog-codec x x x x [*] cir x x x x [ ] cpu-clock-1.2GHz-1.3v x x x x [*] cpu-clock-1.368GHz-1.3v x x x x [ ] cpu-clock-1.3GHz-1.3v x x x x [*] i2c0 x x x x [*] i2c1 x x x x [*] i2c2 x x x x [*] pps-gpio x x x x [*] pwm x x x x [*] spdif-out x x x x [*] spi-add-cs1 x x x x [ ] spi-jedec-nor x x x x [*] spi-spidev x x x x [ ] uart1 x x x x [ ] uart2 x x x x [ ] uart3 x x x x [*] usbhost0 x x x x [ ] usbhost1 x x x x [*] usbhost2 x x x x [*] usbhost3 x x x x [*] w1-gpio x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x x x x x tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu x < Save > < Back > x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj /dev/video0 exists no matter the camera is connected or not, but can't open by ffmpeg or fswebcam. root@nanopiduo2:~# ls /dev/video* /dev/video0 root@nanopiduo2:~# fswebcam a.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Unable to query input 0. VIDIOC_ENUMINPUT: Inappropriate ioctl for device dmesg never mention 5640. root@nanopiduo2:~# dmesg|grep 5640 root@nanopiduo2:~# Some says I need to load vfe_v4l2, but failed: root@nanopiduo2:~# modprobe vfe_v4l2 modprobe: FATAL: Module vfe_v4l2 not found in directory /lib/modules/5.10.60-sunxi
  8. How use csi ov5640 with OrangePi Pc ? I install Armbian Focal mainline based kernel 5.10.y from https://www.armbian.com/orange-pi-pc/. I use board OrangePi PC with H3 soc. How to run camera ov5640 cis. How config kernal files? Thanks for reading and answering.
  9. Hi, I am using OV5640 in Nano PI duo 2 kernal: Linux nanopiduo2 5.10.16-sunxi #21.02.2 SMP Sun Feb 14 21:12:17 CET 2021 armv7l armv7l armv7l GNU/Linux I found that NanoPi Duo2 - FriendlyARM WiKi which is kernal 4.14 supports camera OV5640. Do Armbian Focal (mainline based kernel 5.10.y) have support? if not Please say how to do it? I am new to this armbian kernal Thanks in advance
  10. Dear friends! Please help me! What am I doing wrong? I have Orange Pi Pc Plus. I am using Armbian. 4 months ago I bought a CSI camera OV5640 from Steven Zhao: https://www.aliexpress.com/item/32869355445.html With expansion board! It's working under Android, but /dev/video0 does not appear in Armbian! ~$ sudo uname -a Linux smart 3.4.113-sun8i #2 SMP PREEMPT Wed May 8 15:09:43 CEST 2019 armv7l armv7l armv7l GNU/Linux :~$ sudo modprobe ov5640 :~$ sudo modprobe vfe_v4l2 :~$ dmesg | grep -i ov56 [ 6555.158751] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 6563.092176] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 6563.160043] [OV5640@lex]sensor_init 0x0 [ 6563.160851] [OV5640@lex]sensor read retry=2 [ 6563.160862] [OV5640@lex]error at sensor_detect [ 6563.160870] [OV5640@lex]chip found is not an target chip. [ 6563.160880] [OV5640@lex]CSI_SUBDEV_PWR_OFF! I don't tried to make drivers from source code ... May be need other driver, that not included in the distr? script.fex
  11. I am trying to get an OV5640 camera module to work on a Banana Pi M64 (Allwinner A64). I am running Armbian 20.08.13 Focal with Linux 5.8.16-sunxi64. I have loaded the kernel sources, updated the config to include the ov5640 kernel driver module and updated the device tree, sun50i-a64-bananapi-m64.dts file by copying and adjusting the camera overlay code from sun50i-a64-pinetab.dts, but it is not working: gollumm64% v4l2-ctl --list-devices cedrus (platform:cedrus): /dev/video0 /dev/media0 gollumm64% v4l2-ctl -d 0 --list-formats --list-ctrls Codec Controls mpeg_2_slice_parameters 0x009909fa (unknown): type=103 flags=has-payload mpeg_2_quantization_matrices 0x009909fb (unknown): type=104 flags=has-payload h264_sequence_parameter_set 0x00990ce8 (unknown): type=110 flags=has-payload h264_picture_parameter_set 0x00990ce9 (unknown): type=111 flags=has-payload h264_scaling_matrix 0x00990cea (unknown): type=112 flags=has-payload h264_slice_parameters 0x00990ceb (unknown): type=113 flags=has-payload h264_decode_parameters 0x00990cec (unknown): type=114 flags=has-payload h264_decode_mode 0x00990ced (menu) : min=0 max=0 default=0 value=0 h264_start_code 0x00990cee (menu) : min=0 max=0 default=0 value=0 hevc_sequence_parameter_set 0x00990cf0 (unknown): type=120 flags=has-payload hevc_picture_parameter_set 0x00990cf1 (unknown): type=121 flags=has-payload hevc_slice_parameters 0x00990cf2 (unknown): type=122 flags=has-payload hevc_decode_mode 0x00990cf7 (menu) : min=0 max=0 default=0 value=0 hevc_start_code 0x00990cf8 (menu) : min=0 max=0 default=0 value=0 ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'ST12' (Sunxi Tiled NV12 Format, compressed) [1]: 'NV12' (Y/CbCr 4:2:0) gollumm64% media-ctl --device /dev/media0 -p Media controller API version 5.8.16 Media device information ------------------------ driver cedrus model cedrus serial bus info platform:cedrus hw revision 0x0 driver version 5.8.16 Device topology - entity 1: cedrus-source (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video0 pad0: Source -> "cedrus-proc":0 [ENABLED,IMMUTABLE] - entity 3: cedrus-proc (2 pads, 2 links) type Node subtype Unknown flags 0 pad0: Sink <- "cedrus-source":0 [ENABLED,IMMUTABLE] pad1: Source -> "cedrus-sink":0 [ENABLED,IMMUTABLE] - entity 6: cedrus-sink (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video0 pad0: Sink <- "cedrus-proc":1 [ENABLED,IMMUTABLE] This is the dts code I added to sun50i-a64-bananapi-m64.dts: i2c-csi { compatible = "i2c-gpio"; sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */ scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* PE12 */ i2c-gpio,delay-us = <5>; #address-cells = <1>; #size-cells = <0>; ov5640: camera@3c { compatible = "ovti,ov5640"; reg = <0x3c>; pinctrl-names = "default"; pinctrl-0 = <&csi_mclk_pin>; clocks = <&ccu CLK_CSI_MCLK>; clock-names = "xclk"; AVDD-supply = <&reg_dldo3>; DOVDD-supply = <&reg_aldo1>; DVDD-supply = <&reg_eldo3>; reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ port { ov5640_ep: endpoint { remote-endpoint = <&csi_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; }; &csi { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; csi_ep: endpoint { remote-endpoint = <&ov5640_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; What am I missing?
  12. Environment: (H2+) + linux-sunxi + ov5640 It can be registered by kernel ,but I can't capture any picture from camera . Here is my kernel demsg: ===================================================================================== # dmesg |grep VFE [ 1.720292] [VFE]cci probe start cci_sel = 0! [ 1.720328] [VFE]cci probe end cci_sel = 0! [ 1.720359] [VFE]cci_init end [ 1.720372] [VFE]Welcome to Video Front End driver [ 1.720514] [VFE_DEBUG]vfe_probe [ 1.720638] [VFE]pdev->id = 0 [ 1.720644] [VFE]dev->mipi_sel = 0 [ 1.720650] [VFE]dev->vip_sel = 0 [ 1.720655] [VFE]dev->isp_sel = 0 [ 1.720662] [VFE_DEBUG]fetch sys_config1 [ 1.720670] [VFE_DEBUG]dev->ccm_cfg[0] = d70a0508 [ 1.720678] [VFE_DEBUG]dev->ccm_cfg[1] = d70a0814 [ 1.720690] [VFE_DEBUG]vip0 vip_dev_qty=1 [ 1.720698] [VFE_DEBUG]vip0 vip_define_sensor_list=0 [ 1.720759] [VFE_DEBUG]fetch vip_dev0_flash_en from sys_config failed [ 1.720773] [VFE_DEBUG]fetch vip_dev0_flash_mode from sys_config failed [ 1.720785] [VFE_DEBUG]fetch vip_dev0_af_pwdn from sys_config failed [ 1.720803] [VFE_DEBUG]dev->ccm_cfg[0]->ccm = ov5640 [ 1.720812] [VFE_DEBUG]dev->ccm_cfg[0]->twi_id = 2 [ 1.720821] [VFE_DEBUG]dev->ccm_cfg[0]->i2c_addr = 78 [ 1.720828] [VFE_DEBUG]dev->ccm_cfg[0]->is_isp_used = 1 [ 1.720835] [VFE_DEBUG]dev->ccm_cfg[0]->is_bayer_raw = 1 [ 1.720843] [VFE_DEBUG]dev->ccm_cfg[0]->vflip = 0 [ 1.720850] [VFE_DEBUG]dev->ccm_cfg[0]->hflip = 0 [ 1.720858] [VFE_DEBUG]dev->ccm_cfg[0]->iovdd_str = [ 1.720865] [VFE_DEBUG]dev->ccm_cfg[0]->avdd_str = [ 1.720872] [VFE_DEBUG]dev->ccm_cfg[0]->dvdd_str = [ 1.720879] [VFE_DEBUG]dev->ccm_cfg[0]->afvdd_str = [ 1.720887] [VFE_DEBUG]dev->ccm_cfg[0]->act_used = 1 [ 1.720894] [VFE_DEBUG]dev->ccm_cfg[0]->act_name = ad5820_act [ 1.720902] [VFE_DEBUG]dev->ccm_cfg[0]->act_slave = 0x18 [ 1.726942] [VFE_WARN]vfe vpu clock is null [ 1.726950] [VFE_DEBUG]get io resource num = 3 [ 1.726958] [VFE_DEBUG]get resource, name = csi [ 1.726970] [VFE_DEBUG]dev->regs.csi_regs = f1cb0000 [ 1.726977] [VFE_DEBUG]get resource, name = isp [ 1.726986] [VFE_DEBUG]dev->regs.isp_regs = f1cb8000 [ 1.915506] [VFE_DEBUG]isp load paddr = 5890a000 [ 2.011208] [VFE_DEBUG]isp load dma_addr = 1890a000 [ 2.041942] [VFE_DEBUG]isp load addr = d890a000 [ 2.046967] [VFE_DEBUG]isp saved paddr = 5890b000 [ 2.052205] [VFE_DEBUG]isp saved dma_addr = 1890b000 [ 2.057710] [VFE_DEBUG]isp saved addr = d890b000 [ 2.062843] [VFE_DEBUG]get irq resource [ 2.067119] [VFE_DEBUG]clock resource [ 2.071223] [VFE_DEBUG]vfe core clk = 600000000 [ 2.076259] [VFE_DEBUG]get pin resource [ 2.087109] [VFE]..........................vfe clk open!....................... [ 2.095253] [VFE_DEBUG]vfe dphy clock is null [ 2.100104] [VFE_DEBUG]vfe mipi csi clock is null [ 2.109647] [VFE]vfe_init end [ 2.112973] [VFE]probe_work_handle start! [ 2.117425] [VFE_DEBUG]v4l2_device_register [ 2.130426] [VFE_DEBUG]v4l2 subdev register [ 2.188045] [VFE]v4l2 subdev register input_num = 0 [ 2.193475] [VFE]vfe sensor detect start! input_num = 0 [ 2.199280] [VFE_WARN]Camer detect "YUV" fmt is different from sys_config! [ 2.206924] [VFE_WARN]Apply detect fmt = 0 replace sys_config fmt = 1! [ 2.214300] [VFE]Find sensor name is "ov5640", i2c address is 78, type is "YUV" ! [ 2.231983] [VFE]Sub device register "ov5640" i2c_addr = 0x78 start! [ 2.307854] [VFE_DEBUG]ccm_cfg pt = d70a0508 [ 2.312611] [VFE_DEBUG]ccm_cfg->sd = (null) [ 2.317449] [VFE_DEBUG]module vflip = 0 hflip = 0 [ 2.322678] [VFE_DEBUG]module vflip_thumb = 0 hflip_thumb = 0 [ 2.329052] [VFE_DEBUG]module is_isp_used = 1 is_bayer_raw= 0 [ 2.335444] [VFE_ERR]Error registering v4l2 subdevice No such device! [ 2.342605] [VFE_WARN]vfe sensor register check error at input_num = 0 [ 2.349853] [VFE_DEBUG]dev->ccm_cfg[0] = d70a0508 [ 2.355092] [VFE_DEBUG]dev->ccm_cfg[0]->sd = (null) [ 2.360710] [VFE_DEBUG]dev->ccm_cfg[0]->power.iovdd = (null) [ 2.367186] [VFE_DEBUG]dev->ccm_cfg[0]->power.avdd = (null) [ 2.373575] [VFE_DEBUG]dev->ccm_cfg[0]->power.dvdd = (null) [ 2.379949] [VFE_DEBUG]dev->ccm_cfg[0]->power.afvdd = (null) [ 2.386813] [VFE]V4L2 device registered as video2 [ 2.392083] [VFE]..........................vfe clk close!....................... [ 2.400332] [VFE_DEBUG]vfe dphy clock is null [ 2.405166] [VFE_DEBUG]vfe mipi csi clock is null [ 2.410397] [VFE]probe_work_handle end! =============================================================================================== But there are many error when I capture picture from camera. =============================================================================================== # fswebcam -d /dev/video2 --no-banner -r 320x240 capture.jpg --- Opening /dev/video2... [ 1805.085820] [VFE]vfe_open Trying source module v4l2...[ 1805.091463] [VFE]..........................vfe clk open!....................... [ 1805.102490] [VFE_DEBUG]vfe dphy clock is null [ 1805.107797] [VFE_DEBUG]vfe mipi csi clock is null [ 1805.113473] [VFE_DEBUG]tasklet init ! [ 1805.117708] [VFE]vfe_open ok [ 1805.121105] [VFE_ERR]input index(0) > dev->dev_qty(1)-1 invalid!, device_valid_flag[0] = 0 /dev/video2 opened. No [ 1805.130706] [VFE]vfe_close input was specified, using the f[ 1805.136267] [VFE]vfe select input flag = 0, s_input have not be used . irst. Unable to query [ 1805.146328] [VFE]..........................vfe clk close!....................... input 0. VIDIOC_ENUMIN[ 1805.157302] [VFE_DEBUG]vfe dphy clock is null PUT: Invalid argument [ 1805.164902] [VFE_DEBUG]vfe mipi csi clock is null [ 1805.172467] [VFE]vfe_close end ================================================================================================= How can I fix it ?
  13. Today I had a chance to test OV5640 on mainline kernel 4.17.2 and see the status of OV5640 and CSI drivers, thanks to FE work and the author of the driver (help name here...). I tested on NanoPi K1 Plus (H5) to verify the images in very low light conditions, so don't expect good quality. I could take some images using fswebcam and you should expect basic v4l2 functionality already works if not all. I think motion (did not test / had time to test it) can work with current OV5640 on mainline kernel. Grabbing Image is very fast, currently, Image size I can get are 320x240 and 640x480 pixels, above this i get a dark image. I have not looked at the driver source code to see if it is implemented or not. Basically, you need to add the sun6i_csi and ov5640 drivers to the kernel and adjust DT to have the endpoint. FE has already done it and left H5 for homework, but is the same as H3. To check the functionality, install v4l2-utils and when the driver sun6i_cs loads, it creates the device node /dev/video0 and you can check that: sudo v4l2-ctl -d /dev/video0 -D Driver Info (not using libv4l2): Driver name : sun6i-video Card type : sun6i-csi Bus info : platform:camera Driver version: 4.17.2 Capabilities : 0x84200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format You should see the modules loaded like this: lsmod Module Size Used by sun6i_csi 24576 0 videobuf2_dma_contig 20480 1 sun6i_csi videobuf2_memops 16384 1 videobuf2_dma_contig ov5640 36864 1 videobuf2_v4l2 24576 1 sun6i_csi videobuf2_common 40960 2 videobuf2_v4l2,sun6i_csi v4l2_fwnode 20480 2 ov5640,sun6i_csi v4l2_common 16384 1 ov5640 videodev 196608 6 v4l2_fwnode,v4l2_common,ov5640,videobuf2_v4l2,sun6i_csi,videobuf2_common sunxi_cir 16384 0 media 36864 3 videodev,ov5640,sun6i_csi rc_core 40960 2 sunxi_cir sch_fq_codel 20480 6 8189es 1118208 0 So time to revisit the camera drivers on mainline. Here are some images (remember, low light condition!): *update: All possible window sizes are working for streaming!
  14. Hi Everybody. Can anyone publish step by step guide of building working solution of orange pi PC + ov5640. I mean something like: 1. Buy this ov5640 camera 2. Buy this cable 3. Connect so ... 4. Download this OS image. 5. Change this and that in configuration files Thank you P.S. I spend 2 days reading forum but still don't understand how to get work my Orange Pi PC + ov5640
  15. Hi everyone, I have the OV5640 game ver1 image sensor with ARMBIAN 5.75 stable Debian GNU/Linux 9 (stretch) 4.19.20-sunxi64. Why does the kernel 4.19.* not support the OV5640 driver? How can I add this driver manually to the kernel? I noticed that the Orange Pi Zero Plus2 H3 kernel has OV5640 driver.
  16. This weekend I was revising and testing the OV5640 for some A64 boards. To enable the Camera (OV5640) on NanoPi A64 for the mainline kernel you have to update the following: * DT * GPIO-I2C Here is the excerpt : Kernel config: CONFIG_I2C_GPIO=m CONFIG_VIDEO_OV5640=m CONFIG_VIDEO_SUN6I_CSI=m
  17. Hi everyone, I bought this Orange Pi PC with this OV5640 5MP camera module. I've been following the other threads online for directions on getting it to work, and I'm up to the point where there exists a /dev/video0 entry, but I'm unable to use it through avafinger's cap-v4l2 program, opencv, or fswebcam. The best I can get is a black image from it. What I've done so far: Editted the [twi2] and [csi0] sections of my script.fex file, converted it back to script.bin with fex2bin sudo modprobe ov5640 sudo modprobe vfe_v4l2 this is the output of dmesg following boot, and this is the output of v4l2-ctl --all. Here's a link to my current script.fex. I've tried many different variations of the [csi0] section to no avail so far. cap-v4l2 fails with the error message: v4l2: errno: 22 - check sensor, something wrong. v4l2: failed to retrieve frame. fswebcam gives me: Error setting pixel format. VIDIOC_S_FMT: Operation not permitted and opencv fails with: mmap: Invalid argument munmap: Invalid argument /dev/video0 does not support memory mapping VIDEOIO ERROR: V4L: can't open camera by index 0 munmap: Invalid argument /dev/video0 does not support memory mapping I've been trying for over a week now and I'm basically out of ideas. Does anyone have any suggestions? Thanks in advance.
  18. I haven't had any luck getting the ov5640 camera module working with the nanopi air. I have compiled the latest dev version of bionic and enabled the ov5640 as a module in menuconfig. I currently cannot get it showing up under /dev/video* Any ideas?
  19. Hi, I have libretech all-h3-cc h2+ DIY board booting with armbian image from https://www.armbian.com/tritium-h3/. I have updated overlays in armbianEnv.txt file to add i2c2 overlay which enable CSI in kernel. But even after I connect the camera sensor module, I can't find any `/dev/video0` and morever there is not any log in dmesg as well. Please suggest how can I add get the camera work with the board. I referred to https://forum.armbian.com/topic/7502-ov5640-on-mainline-kernel/ but as according to that, `/dev/video0` should come up automatically. I don't know what I'm missing. Please help Thanks
  20. Hi i try to get a ov5640 camera running on a banana pi m2 plus board. i builded the csi driver and it gets loaded, however i am not able to take picture: root@bananapim2plus:~/cap-v4l2# ./cap 1280 768 4 1 -999 -1 -1 ---- cap parameters ----- width: 1280 height: 768 v4l2 buffers: 4 exposure: -999 hflip: -1 vflip: -1 Mode: V4L2_MODE_VIDEO Driver: "sun6i-video" Card: "sun6i-csi" Bus: "platform:camera" Version: 1.0 Capabilities: 84200001 v4l2: unable to enumerate input. v4l2: failed to init camera. root@bananapim2plus:~/cap-v4l2# dmesg [23141.993618] sun6i-csi 1cb0000.camera: -> sun6i_csi_set_power() [23141.993653] sun6i-csi 1cb0000.camera: -> sun6i_csi_set_power() =>DONE_1 [23142.007416] sun6i-csi 1cb0000.camera: -> sun6i_csi_set_power() [23142.007451] sun6i-csi 1cb0000.camera: -> sun6i_csi_set_power() =>DONE_2 Does anyone know how the video 4 linux call path is for initializing a camera? I loaded the ov6540 module but it never gets probed. i assume the i2c must be somehow linked in the dts file together, but i wasn't able to find a complete working example. my dts file now, which loads at least the sun6i-csi driver but it should be insert i2c section, if i put it there, i does not get loaded. csi { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; // Parallel bus endpoint csi_from_ov5640: endpoint { remote-endpoint = <&ov5640_to_csi>; bus-width = <8>; data-shift = <2>; hsync-active = <1>; // Active high vsync-active = <0>; // Active low data-active = <1>; // Active high pclk-sample = <1>; // Rising }; }; }; camera@1cb0000 { compatible = "allwinner,sun8i-h3-csi", "allwinner,sun6i-a31-csi"; reg = <0x1cb0000 0x1000>; interrupts = <0x0 0x54 0x4>; clocks = <0x3 0x2d 0x3 0x6a 0x3 0x62>; clock-names = "bus", "mod", "ram"; resets = <0x3 0x1e>; pinctrl-names = "default"; pinctrl-0 = <0x27>; status = "okay"; phandle = <0x63>; // powerdown-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; // reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; //powerdown-gpios = <0xc 0x3 0xd 0x0>; // PD14 active high ?? port { ov5640_to_csi: endpoint { remote-endpoint = <&csi_from_ov5640>; bus-width = <8>; data-shift = <2>; hsync-active = <1>; // Active high vsync-active = <0>; // Active low data-active = <1>; // Active high pclk-sample = <1>; // Rising }; }; }; According to the kernel doku: https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/media/video-interfaces.txt it should be a device node from the i2c, but then it doesn't load the camera modul. If i add compatible="ovti,ov5640" the ov5640 modul get loaded but does not to anything. no even a simple print, which modul/function/program should call the i2c probing? when i load i2c normal, the modul works (i2cdetect does probe something on the i2 lines). Next isse i have, the V4L2 looks like changed to a builtin modul, is it somehow possible to change it back to a modul? would like to printk debug the v4l2 async file. When i set it back in the config file to "m" it asks again and says this is a invalid option? Anyone an idea? or have a working dts file for a ovXXXX camera with i2c running with the sun6i-csi modul?
  21. I have the gc2035 camera working on my Orange Pi One running Armbian, but I need a better image sensor. I've had a quick attempt to get an ov5640 working without any luck. It is a popular 5Mpixel module similar to the RPi camera. I know that 'Sitheek' on the Orange Pi forums had it working. However, that place is a ghost town now and Sitheek has not visited since January. So, I wonder if anyone here has got an OV5640 camera working, or failing that, could just offer some pointers on how to go about this? Thanks.
  22. I've got a LeMaker Banana Pi Pro board, with LeMaker Banana Pi Pro Camera V1.0 which is a ov5640 module. I think there are some on-line manuals from official LeMaker, for instance: http://wiki.lemaker.org/BananaPro/Pi:Camera_Module . However, it seems Armbian_5.59_Bananapipro_Ubuntu_bionic_next_4.14.65 hasn't provided such a ov5640 driver module for me to load? Where can I find the ov5640 driver module ? Cheers Pei
  23. Can somebody confirm that this driver work on mainline opi0 kernel? https://github.com/avafinger/ov5640
  24. Quick debugging info, subject says all. Other apps like cap.c or motion or motioneye works perfect and capture and streams live video. Working onliner: ffmpeg -f v4l2 -channel 0 -video_size 640x480 -i /dev/video0 -pix_fmt nv12 -vcodec h264 -preset fast -b:v 2000k -qp 20 ffmpegtest.mkv Working distro Armbian 5.30 root@nanopiair:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=nanopiair BOARD_NAME="NanoPi Air" VERSION=5.30 LINUXFAMILY=sun8i BRANCH=default ARCH=arm IMAGE_TYPE=stable root@nanopiair:~# modinfo vfe_v4l2 filename: /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/vfe_v4l2.ko description: Video front end driver for sunxi license: Dual BSD/GPL author: raymonxiu depends: videobuf-core,vfe_os,vfe_subdev,videobuf-dma-contig,cci intree: Y vermagic: 3.4.113-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: ccm:string parm: i2c_addr:uint parm: act_name:string parm: act_slave:uint parm: define_sensor_list:uint parm: vfe_i2c_dbg:uint parm: isp_log:uint parm: vips:uint root@nanopiair:~# modinfo ov5640 filename: /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/device/ov5640.ko license: GPL description: A low-level driver for ov5640 sensors (H3 / A20) author: @lex author: raymonxiu alias: i2c:ov5640 depends: cci,vfe_subdev intree: Y vermagic: 3.4.113-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: frame_rate:frame_rate=0 (default with no parameters), frame_rate=1 (7.5 FPS), frame_rate=2 (15 FPS), frame_rate=3 (30 FPS) (default=0 - or no parms - default settings) (uint) root@nanopiair:~# ffmpeg -f v4l2 -channel 0 -s 320x240 -i /dev/video0 -c:v libx264 -preset ultrafast -qp 20 ffmpegtest.mkv ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1512652641.063736, bitrate: 27648 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240, 27648 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc File 'ffmpegtest.mkv' already exists. Overwrite ? [y/N] After apt update/upgrade, not working distro: root@NanoPiAir:~# cat /etc/armbian-release # PLEASE DO NOT EDIT THIS FILE BOARD=nanopiair BOARD_NAME="NanoPi Air" BOARDFAMILY=sun8i VERSION=5.36 LINUXFAMILY=sun8i BRANCH=default ARCH=arm IMAGE_TYPE=user-built BOARD_TYPE=conf INITRD_ARCH=arm KERNEL_IMAGE_TYPE=zImage root@NanoPiAir:~# root@NanoPiAir:~# modinfo vfe_v4l2 filename: /lib/modules/3.4.113-sun8i/kernel/drivers/media/video/sunxi-vfe/vfe_v4l2.ko description: Video front end driver for sunxi license: Dual BSD/GPL author: raymonxiu depends: videobuf-core,vfe_os,vfe_subdev,videobuf-dma-contig,cci intree: Y vermagic: 3.4.113-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 parm: ccm:string parm: i2c_addr:uint parm: act_name:string parm: act_slave:uint parm: define_sensor_list:uint parm: vfe_i2c_dbg:uint parm: isp_log:uint parm: vips:uint ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 [video4linux2,v4l2 @ 0xfaf800] Dequeued v4l2 buffer contains 118784 bytes, but 115200 were expected. Flags: 0x00000001. Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, bitrate: 27648 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240, 27648 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc File 'ffmpegtest.mkv' already exists. Overwrite ? [y/N] [libx264 @ 0xfb21c0] using cpu capabilities: ARMv6 NEON [libx264 @ 0xfb21c0] profile Constrained Baseline, level 1.3 [libx264 @ 0xfb21c0] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=20 ip_ratio=1.40 aq=0 Output #0, matroska, to 'ffmpegtest.mkv': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 320x240, q=-1--1, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc56.60.100 libx264 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [video4linux2,v4l2 @ 0xfaf800] Dequeued v4l2 buffer contains 118784 bytes, but 115200 were expected. Flags: 0x00000001. /dev/video0: Invalid data found when processing input frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown The error: [video4linux2,v4l2 @ 0xfaf800] Dequeued v4l2 buffer contains 118784 bytes, but 115200 were expected. Flags: 0x00000001. Debugging test of FFMPEG: root@NanoPiAir# ffmpeg -loglevel debug -f v4l2 -framerate 30 -video_size 1920x1080 -i /dev/video0 -c:v libx264 -preset ultrafast -crf 10 microcorder.mkv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Splitting the commandline. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'. Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'. Reading option '-framerate' ... matched as AVOption 'framerate' with argument '30'. Reading option '-video_size' ... matched as AVOption 'video_size' with argument '1920x1080'. Reading option '-i' ... matched as input url with argument '/dev/video0'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'ultrafast'. Reading option '-crf' ... matched as AVOption 'crf' with argument '10'. Reading option 'microcorder.mkv' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option loglevel (set logging level) with argument debug. Successfully parsed a group of options. Parsing a group of options: input url /dev/video0. Applying option f (force format) with argument v4l2. Successfully parsed a group of options. Opening an input file: /dev/video0. [video4linux2,v4l2 @ 0x1ec1800] fd:4 capabilities:5000001 [video4linux2,v4l2 @ 0x1ec1800] Current input_channel: 0, input_name: , input_std: 0 [video4linux2,v4l2 @ 0x1ec1800] Setting time per frame to 1/30 [video4linux2,v4l2 @ 0x1ec1800] Dequeued v4l2 buffer contains 3112960 bytes, but 3110400 were expected. Flags: 0x00000001. Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, bitrate: 746496 kb/s Stream #0:0, 0, 1/1000000: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 1920x1080 (0x0), 1/1000000, 746496 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc Successfully opened the file. Parsing a group of options: output url microcorder.mkv. Applying option c:v (codec name) with argument libx264. Successfully parsed a group of options. Opening an output file: microcorder.mkv. File 'microcorder.mkv' already exists. Overwrite ? [y/N] Successfully opened the file. detected 4 logical cores [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'pix_fmt' to value '0' [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'time_base' to value '1/1000000' [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'pixel_aspect' to value '0/1' [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x1ec1760] Setting 'frame_rate' to value '30/1' [graph 0 input from stream 0:0 @ 0x1ec1760] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 fr:30/1 sar:0/1 sws_param:flags=2 [format @ 0x1ecea60] compat: called with args=[yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21] [format @ 0x1ecea60] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21' [AVFilterGraph @ 0x1ecde10] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed [libx264 @ 0x1ec4230] using mv_range_thread = 88 [libx264 @ 0x1ec4230] using cpu capabilities: ARMv6 NEON [libx264 @ 0x1ec4230] profile Constrained Baseline, level 4.0 [libx264 @ 0x1ec4230] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=10.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 Output #0, matroska, to 'microcorder.mkv': Metadata: encoder : Lavf56.40.101 Stream #0:0, 0, 1/1000: Video: h264 (libx264), -1 reference frame (H264 / 0x34363248), yuv420p, 1920x1080, 1/30, q=-1--1, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc56.60.100 libx264 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [video4linux2,v4l2 @ 0x1ec1800] Dequeued v4l2 buffer contains 3112960 bytes, but 3110400 were expected. Flags: 0x00000001. /dev/video0: Invalid data found when processing input [output stream 0:0 @ 0x1ece620] EOF on sink link output stream 0:0:default. No more output streams to write to, finishing. [matroska @ 0x1ec2e60] end duration = 0 [matroska @ 0x1ec2e60] stream 0 end duration = 0 frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 (/dev/video0): Input stream #0:0 (video): 0 packets read (0 bytes); 0 frames decoded; Total: 0 packets (0 bytes) demuxed Output file #0 (microcorder.mkv): Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x1ec4b40] Statistics: 15 seeks, 12 writeouts Armbianinfo is here http://sprunge.us/jfKV PS:Also tried to copy boot.cmd and boot.scr from 5.35, there is no image with 5.36 to avoid problem in that way
  25. I've updated to the latest kernel code, rebuilt and I I can now see /dev/video when I call "modprobe ov5640; modprobe vfe_v4l2" after booting into the nanopi. However, when I run the following ffmpeg -re -i /dev/video0 -c:v libx265 -preset ultrafast -x265-params crf=23 -f h264 ./out.mp4 I get the following error error [video4linux2,v4l2 @ 0x1a9a7f0] Dequeued v4l2 buffer contains 40960 bytes, but 38016 were expected. Flags: 0x00000001. The video format is yuv420p, 176x144, so it should be 176*144*1.5 bytes = 38016bytes. However the buffer seems to be slightly larger. I have written a few small c programs of my own and no matter what there seems to be a bit of extra bytes in the buffer. output of dmesg is attached. dmesg.out
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines