Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compress YUYV to h264 out #47

Open
Tormund1985 opened this issue May 18, 2022 · 8 comments
Open

Compress YUYV to h264 out #47

Tormund1985 opened this issue May 18, 2022 · 8 comments

Comments

@Tormund1985
Copy link

Describe the bug
I am trying to make a rtsp workflow from a libcamera sensor (IMX519 with autofocus).

To Reproduce
sudo modprobe v4l2loopback video_nr=3

v4l2compress -fH264 /dev/video0 /dev/video3

root@raspberrypi:/# v4l2compress -fH264 /dev/video0 /dev/video3
log level:500

[NOTICE] src/V4l2Device.cpp:133
        driver:unicam capabilities:a5a00001 mandatory:4000001
[NOTICE] src/V4l2Device.cpp:136
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video0 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video0:YUYV size:640x480 bufferSize:614400
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video0
[NOTICE] src/V4l2MmapDevice.cpp:73
VIDIOC_STREAMON: Invalid argument
        Device /dev/video0 nb buffer:10
[NOTICE] src/V4l2MmapDevice.cpp:141
        Device /dev/video0
[WARN] src/v4l2compress.cpp:215
        Cannot create V4L2 capture interface for device:/dev/video0

Expected behavior
Cannot create the v4l2 capture for proceed qith rtsp workflow.

Desktop (please complete the following information):
Raspberry Pi Zero 2w Bullseye

Additional context

I follow the steps to install v4l2tools, v4l2loopback and v4l2rtspserver without errors.

@mpromonet
Copy link
Owner

Hi,

You may increase log level to get more information.

Best Regards,
Michel.

@Tormund1985
Copy link
Author

Tormund1985 commented May 19, 2022

I am sorry, I am gonna try to supply more info.

Journalctl give me next message:

may 19 08:04:53 raspberrypi kernel: unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
may 19 08:04:53 raspberrypi kernel: unicam 3f801000.csi: Failed to start media pipeline: -22
root@raspberrypi:/# uname -a
Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
root@raspberrypi:/# v4l2-ctl --list-devices
unicam (platform:3f801000.csi):
        /dev/video0
        /dev/video1
        /dev/media3

bcm2835-codec-decode (platform:bcm2835-codec):
        /dev/video10
        /dev/video11
        /dev/video12
        /dev/video18
        /dev/video31
        /dev/media2

bcm2835-isp (platform:bcm2835-isp):
        /dev/video13
        /dev/video14
        /dev/video15
        /dev/video16
        /dev/video20
        /dev/video21
        /dev/video22
        /dev/video23
        /dev/media0
        /dev/media1

Dummy video device (0x0000) (platform:v4l2loopback-000):
        /dev/video3
root@raspberrypi:/# v4l2-ctl -d /dev/video0 --all
Driver Info:
        Driver name      : unicam
        Card type        : unicam
        Bus info         : platform:3f801000.csi
        Driver version   : 5.15.32
        Capabilities     : 0xa5a00001
                Video Capture
                Metadata Capture
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x25200001
                Video Capture
                Read/Write
                Streaming
                Extended Pix Format
Media Driver Info:
        Driver name      : unicam
        Model            : unicam
        Serial           : 
        Bus info         : platform:3f801000.csi
        Media version    : 5.15.32
        Hardware revision: 0x00000000 (0)
        Driver version   : 5.15.32
Interface Info:
        ID               : 0x03000008
        Type             : V4L Video
Entity Info:
        ID               : 0x00000006 (6)
        Name             : unicam-image
        Function         : V4L2 I/O
        Flags         : default
        Pad 0x01000007   : 0: Sink
          Link 0x0200000a: from remote pad 0x1000002 of entity 'imx519 10-001a': Data, Enabled, Immutable
Priority: 2
Video input : 0 (unicam-image: ok)
Format Video Capture:
        Width/Height      : 640/480
        Pixel Format      : 'YUYV' (YUYV 4:2:2)
        Field             : None
        Bytes per Line    : 1280
        Size Image        : 614400
        Colorspace        : SMPTE 170M
        Transfer Function : Rec. 709
        YCbCr/HSV Encoding: ITU-R 601
        Quantization      : Limited Range
        Flags             : 

Any log in particular?

Many thanks for your support .

@mpromonet
Copy link
Owner

Hi,

I was speaking about increasing log verbosity of the application v4l2compress, from the log you provide, we just see /dev/video0 cannot be openned.

Best Regards,
Michel.

@Tormund1985
Copy link
Author

Tormund1985 commented May 19, 2022

Hi,

I was speaking about increasing log verbosity of the application v4l2compress, from the log you provide, we just see /dev/video0 cannot be openned.

Best Regards, Michel.

I change resolution to 4656x3496 but still not working. With -vv command show:

root@raspberrypi:/# v4l2compress -vv -fH264 /dev/video0 /dev/video3
log level:700

[NOTICE] src/V4l2Device.cpp:133
        driver:unicam capabilities:a5a00001 mandatory:4000001
[NOTICE] src/V4l2Device.cpp:136
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video0 support streaming
[DEBUG] src/V4l2Device.cpp:71
        /dev/video0:YUYV size:4656x3496 bufferSize:32554752
[NOTICE] src/V4l2Device.cpp:225
        /dev/video0:YUYV size:4656x3496 bufferSize:32554752
[DEBUG] src/V4l2Device.cpp:71
        /dev/video0:YUYV size:4656x3496 bufferSize:32554752
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video0
[NOTICE] src/V4l2MmapDevice.cpp:73
        Device /dev/video0 nb buffer:7
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:0 size:32554752 offset:0
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:1 size:32554752 offset:32555008
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:2 size:32554752 offset:65110016
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:3 size:32554752 offset:97665024
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:4 size:32554752 offset:130220032
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:5 size:32554752 offset:162775040
[INFO] src/V4l2MmapDevice.cpp:92
VIDIOC_STREAMON: Invalid argument
        Device /dev/video0 buffer idx:6 size:32554752 offset:195330048
[NOTICE] src/V4l2MmapDevice.cpp:141
        Device /dev/video0
[WARN] src/v4l2compress.cpp:215
        Cannot create V4L2 capture interface for device:/dev/video0

And kernel show:

may 19 08:39:08 raspberrypi kernel: cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
may 19 08:39:08 raspberrypi kernel: unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
may 19 08:39:08 raspberrypi kernel: unicam 3f801000.csi: Failed to start media pipeline: -22
root@raspberrypi:/# dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022
[    0.000000] random: fast init done
[    0.000000] Machine model: Raspberry Pi Zero 2 W Rev 1.0
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000007c00000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000017ffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000017ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000017ffffff]
[    0.000000] percpu: Embedded 28 pages/cpu s77144 r8192 d29352 u114688
[    0.000000] pcpu-alloc: s77144 r8192 d29352 u114688 alloc=28*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 96768
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=B8:27:EB:08:1C:6D vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=9d09ee08-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 100272K/393216K available (11456K kernel code, 1962K rwdata, 4144K rodata, 3776K init, 964K bss, 30800K reserved, 262144K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 37889 entries in 149 pages
[    0.000000] ftrace: allocated 149 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: bcm2836_arm_irqchip_handle_irq
[    0.000000] random: get_random_bytes called from start_kernel+0x510/0x6f8 with crng_init=1
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000320] Console: colour dummy device 80x25
[    0.000390] printk: console [tty1] enabled
[    0.000469] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=76800)
[    0.000505] pid_max: default: 32768 minimum: 301
[    0.000692] LSM: Security Framework initializing
[    0.000887] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.000922] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.002649] cgroup: Disabling memory control group subsystem
[    0.006282] rcu: Hierarchical SRCU implementation.
[    0.007753] EFI services will not be available.
[    0.008647] smp: Bringing up secondary CPUs ...
[    0.010195] Detected VIPT I-cache on CPU1
[    0.010296] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.012162] Detected VIPT I-cache on CPU2
[    0.012233] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.013945] Detected VIPT I-cache on CPU3
[    0.014004] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.014215] smp: Brought up 1 node, 4 CPUs
[    0.014246] SMP: Total of 4 processors activated.
[    0.014264] CPU features: detected: 32-bit EL0 Support
[    0.014278] CPU features: detected: 32-bit EL1 Support
[    0.014295] CPU features: detected: CRC32 instructions
[    0.054978] CPU: All CPU(s) started at EL2
[    0.055103] alternatives: patching kernel code
[    0.057030] devtmpfs: initialized
[    0.079649] Enabled cp15_barrier support
[    0.079704] Enabled setend support
[    0.080002] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.080045] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.097512] pinctrl core: initialized pinctrl subsystem
[    0.098788] DMI not present or invalid.
[    0.099494] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.110595] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.111073] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.112502] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.112712] audit: initializing netlink subsys (disabled)
[    0.113157] audit: type=2000 audit(0.112:1): state=initialized audit_enabled=0 res=1
[    0.114020] thermal_sys: Registered thermal governor 'step_wise'
[    0.114387] cpuidle: using governor menu
[    0.115025] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.115321] ASID allocator initialised with 65536 entries
[    0.115582] Serial: AMBA PL011 UART driver
[    0.131604] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.164843] raspberrypi-firmware soc:firmware: Attached to firmware from 2022-03-24T13:21:51, variant start_x
[    0.168869] raspberrypi-firmware soc:firmware: Firmware hash is e5a963efa66a1974127860b42e913d2374139ff5
[    0.227629] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
[    0.233509] vgaarb: loaded
[    0.234175] SCSI subsystem initialized
[    0.234511] usbcore: registered new interface driver usbfs
[    0.234607] usbcore: registered new interface driver hub
[    0.234715] usbcore: registered new device driver usb
[    0.235280] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.235954] pps_core: LinuxPPS API ver. 1 registered
[    0.235972] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.236010] PTP clock support registered
[    0.238461] clocksource: Switched to clocksource arch_sys_counter
[    0.375160] VFS: Disk quotas dquot_6.6.0
[    0.375317] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.375571] FS-Cache: Loaded
[    0.375885] CacheFiles: Loaded
[    0.377500] simple-framebuffer 1e402000.framebuffer: framebuffer at 0x1e402000, 0x7f8000 bytes
[    0.377528] simple-framebuffer 1e402000.framebuffer: format=a8r8g8b8, mode=1920x1080x32, linelength=7680
[    0.378207] Console: switching to colour frame buffer device 240x67
[    0.413653] simple-framebuffer 1e402000.framebuffer: fb0: simplefb registered!
[    0.426745] NET: Registered PF_INET protocol family
[    0.427016] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.428789] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.428843] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.428927] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.429053] TCP: Hash tables configured (established 4096 bind 4096)
[    0.429277] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.429327] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.429671] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.430966] RPC: Registered named UNIX socket transport module.
[    0.430989] RPC: Registered udp transport module.
[    0.431005] RPC: Registered tcp transport module.
[    0.431020] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.431049] PCI: CLS 0 bytes, default 64
[    0.433945] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.434309] kvm [1]: IPA Size Limit: 40 bits
[    0.436108] kvm [1]: Hyp mode initialized successfully
[    1.900886] Initialise system trusted keyrings
[    1.901410] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    1.912277] zbud: loaded
[    1.915172] FS-Cache: Netfs 'nfs' registered for caching
[    1.916194] NFS: Registering the id_resolver key type
[    1.916251] Key type id_resolver registered
[    1.916268] Key type id_legacy registered
[    1.916430] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.916450] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.918229] Key type asymmetric registered
[    1.918249] Asymmetric key parser 'x509' registered
[    1.918365] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.918835] io scheduler mq-deadline registered
[    1.918858] io scheduler kyber registered
[    1.931893] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.935353] bcm2835-rng 3f104000.rng: hwrng registered
[    1.936474] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.938529] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    1.939069] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.955823] brd: module loaded
[    1.970798] loop: module loaded
[    1.971838] Loading iSCSI transport class v2.0-870.
[    1.978966] usbcore: registered new interface driver r8152
[    1.979076] usbcore: registered new interface driver lan78xx
[    1.979159] usbcore: registered new interface driver smsc95xx
[    1.979866] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.708479] Core Release: 2.80a
[    2.708520] Setting default values for core params
[    2.708554] Finished setting default values for core params
[    2.909033] Using Buffer DMA mode
[    2.909049] Periodic Transfer Interrupt Enhancement - disabled
[    2.909065] Multiprocessor Interrupt Enhancement - disabled
[    2.909080] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.909102] Dedicated Tx FIFOs mode

[    2.913597] WARN::dwc_otg_hcd_init:1074: FIQ DMA bounce buffers: virt = ffffffc009a51000 dma = 0x00000000c8000000 len=9024
[    2.913645] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    2.913690] dwc_otg: Microframe scheduler enabled

[    2.913741] WARN::hcd_init_fiq:497: MPHI regs_base at ffffffc00962d000
[    2.913839] dwc_otg 3f980000.usb: DWC OTG Controller
[    2.913885] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    2.913953] dwc_otg 3f980000.usb: irq 74, io mem 0x00000000
[    2.914018] Init: Port Power? op_state=1
[    2.914034] Init: Power Port (0)
[    2.914630] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[    2.914659] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.914682] usb usb1: Product: DWC OTG Controller
[    2.914703] usb usb1: Manufacturer: Linux 5.15.32-v8+ dwc_otg_hcd
[    2.914723] usb usb1: SerialNumber: 3f980000.usb
[    2.915744] hub 1-0:1.0: USB hub found
[    2.915836] hub 1-0:1.0: 1 port detected
[    2.917107] dwc_otg: FIQ enabled
[    2.917125] dwc_otg: NAK holdoff enabled
[    2.917140] dwc_otg: FIQ split-transaction FSM enabled
[    2.917161] Module dwc_common_port init
[    2.917992] usbcore: registered new interface driver uas
[    2.918123] usbcore: registered new interface driver usb-storage
[    2.918572] mousedev: PS/2 mouse device common for all mice
[    2.924098] sdhci: Secure Digital Host Controller Interface driver
[    2.924122] sdhci: Copyright(c) Pierre Ossman
[    2.924938] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.927539] ledtrig-cpu: registered to indicate activity on CPUs
[    2.928355] hid: raw HID events driver (C) Jiri Kosina
[    2.928596] usbcore: registered new interface driver usbhid
[    2.928616] usbhid: USB HID core driver
[    2.929059] ashmem: initialized
[    2.937452] Initializing XFRM netlink socket
[    2.937531] NET: Registered PF_PACKET protocol family
[    2.937723] Key type dns_resolver registered
[    2.939758] registered taskstats version 1
[    2.939797] Loading compiled-in X.509 certificates
[    2.940722] Key type ._fscrypt registered
[    2.940740] Key type .fscrypt registered
[    2.940756] Key type fscrypt-provisioning registered
[    2.961197] uart-pl011 3f201000.serial: cts_event_workaround enabled
[    2.961436] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 99, base_baud = 0) is a PL011 rev2
[    2.965471] bcm2835-aux-uart 3f215040.serial: there is not valid maps for state default
[    2.966529] printk: console [ttyS0] disabled
[    2.966709] 3f215040.serial: ttyS0 at MMIO 0x3f215040 (irq = 71, base_baud = 50000000) is a 16550
[    2.967017] printk: console [ttyS0] enabled
[    2.969203] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    2.969900] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    2.972660] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    2.972686] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
[    2.999915] sdhost: log_buf @ (____ptrval____) (c236c000)
[    3.026752] Indeed it is in host mode hprt0 = 00021501
[    3.068170] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    3.073025] of_cfs_init
[    3.073212] of_cfs_init: OK
[    3.074795] Waiting for root device PARTUUID=9d09ee08-02...
[    3.106290] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.109034] mmc0: new high speed SDHC card at address 0001
[    3.111203] mmcblk0: mmc0:0001 00000 29.8 GiB 
[    3.117330]  mmcblk0: p1 p2
[    3.118404] mmcblk0: mmc0:0001 00000 29.8 GiB
[    3.139806] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    3.139956] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    3.141139] devtmpfs: mounted
[    3.154352] Freeing unused kernel memory: 3776K
[    3.154696] Run /sbin/init as init process
[    3.154749]   with arguments:
[    3.154764]     /sbin/init
[    3.154779]     splash
[    3.154794]   with environment:
[    3.154806]     HOME=/
[    3.154820]     TERM=linux
[    3.155047] mmc1: new high speed SDIO card at address 0001
[    3.218524] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    3.218783] Indeed it is in host mode hprt0 = 00001101
[    3.427401] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[    3.427453] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    3.427478] usb 1-1: Product: USB 2.0 Hub
[    3.428810] hub 1-1:1.0: USB hub found
[    3.428994] hub 1-1:1.0: 4 ports detected
[    3.796564] systemd[1]: System time before build time, advancing clock.
[    3.838528] usb 1-1.1: new low-speed USB device number 3 using dwc_otg
[    3.961458] NET: Registered PF_INET6 protocol family
[    3.964044] Segment Routing with IPv6
[    3.964116] In-situ OAM (IOAM) with IPv6
[    4.032772] systemd[1]: systemd 247.3-7 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[    4.034206] systemd[1]: Detected architecture arm64.
[    4.041972] systemd[1]: Set hostname to <raspberrypi>.
[    4.065482] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c018, bcdDevice=43.00
[    4.065532] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.065556] usb 1-1.1: Product: Logitech USB Optical Mouse
[    4.065577] usb 1-1.1: Manufacturer: Logitech
[    4.077275] input: Logitech Logitech USB Optical Mouse as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C018.0001/input/input0
[    4.077956] hid-generic 0003:046D:C018.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech Logitech USB Optical Mouse] on usb-3f980000.usb-1.1/input0
[    4.091569] random: crng init done
[    4.258583] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    4.508862] usb 1-1.2: New USB device found, idVendor=03f0, idProduct=0036, bcdDevice= 1.24
[    4.508914] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=7
[    4.508938] usb 1-1.2: Product: HP USB CCID Smartcard Keyboard
[    4.508960] usb 1-1.2: Manufacturer: Hewlett-Packard Company
[    4.508980] usb 1-1.2: SerialNumber: 12110500000935
[    4.528278] input: Hewlett-Packard Company HP USB CCID Smartcard Keyboard as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:03F0:0036.0002/input/input1
[    4.587629] hid-generic 0003:03F0:0036.0002: input,hidraw1: USB HID v1.10 Keyboard [Hewlett-Packard Company HP USB CCID Smartcard Keyboard] on usb-3f980000.usb-1.2/input0
[    4.606373] hid-generic 0003:03F0:0036.0003: hiddev96,hidraw2: USB HID v1.10 Device [Hewlett-Packard Company HP USB CCID Smartcard Keyboard] on usb-3f980000.usb-1.2/input2
[    4.790548] usb 1-1.4: new full-speed USB device number 5 using dwc_otg
[    4.854322] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    5.021858] usb 1-1.4: New USB device found, idVendor=08bb, idProduct=2902, bcdDevice= 1.00
[    5.021901] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.021926] usb 1-1.4: Product: USB PnP Sound Device
[    5.021946] usb 1-1.4: Manufacturer: C-Media Electronics Inc.      
[    5.028448] input: C-Media Electronics Inc.       USB PnP Sound Device as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.2/0003:08BB:2902.0004/input/input2
[    5.091082] hid-generic 0003:08BB:2902.0004: input,hidraw3: USB HID v1.00 Device [C-Media Electronics Inc.       USB PnP Sound Device] on usb-3f980000.usb-1.4/input2
[    5.237239] systemd[1]: Queued start job for default target Multi-User System.
[    5.244783] systemd[1]: Created slice system-getty.slice.
[    5.247126] systemd[1]: Created slice system-modprobe.slice.
[    5.248854] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    5.250588] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    5.251935] systemd[1]: Created slice User and Session Slice.
[    5.252829] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    5.254736] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    5.255492] systemd[1]: Reached target Slices.
[    5.255676] systemd[1]: Reached target Swap.
[    5.257212] systemd[1]: Listening on Syslog Socket.
[    5.258273] systemd[1]: Listening on fsck to fsckd communication Socket.
[    5.258982] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    5.260937] systemd[1]: Listening on Journal Audit Socket.
[    5.262058] systemd[1]: Listening on Journal Socket (/dev/log).
[    5.263776] systemd[1]: Listening on Journal Socket.
[    5.266564] systemd[1]: Listening on udev Control Socket.
[    5.267910] systemd[1]: Listening on udev Kernel Socket.
[    5.269461] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    5.275871] systemd[1]: Mounting POSIX Message Queue File System...
[    5.283596] systemd[1]: Mounting RPC Pipe File System...
[    5.292148] systemd[1]: Mounting Kernel Debug File System...
[    5.301051] systemd[1]: Mounting Kernel Trace File System...
[    5.301825] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[    5.311700] systemd[1]: Starting Restore / save the current clock...
[    5.322347] systemd[1]: Starting Set the console keyboard layout...
[    5.331629] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    5.340346] systemd[1]: Starting Load Kernel Module configfs...
[    5.350183] systemd[1]: Starting Load Kernel Module drm...
[    5.359940] systemd[1]: Starting Load Kernel Module fuse...
[    5.368934] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    5.377369] systemd[1]: Starting File System Check on Root Device...
[    5.400695] systemd[1]: Starting Journal Service...
[    5.431493] fuse: init (API version 7.34)
[    5.439893] systemd[1]: Starting Load Kernel Modules...
[    5.448900] systemd[1]: Starting Coldplug All udev Devices...
[    5.484178] systemd[1]: Mounted POSIX Message Queue File System.
[    5.485737] systemd[1]: Mounted RPC Pipe File System.
[    5.487643] systemd[1]: Mounted Kernel Debug File System.
[    5.489427] systemd[1]: Mounted Kernel Trace File System.
[    5.493436] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    5.498920] systemd[1]: Finished Restore / save the current clock.
[    5.502963] systemd[1]: [email protected]: Succeeded.
[    5.505609] systemd[1]: Finished Load Kernel Module configfs.
[    5.509500] systemd[1]: [email protected]: Succeeded.
[    5.520173] systemd[1]: Finished Load Kernel Module fuse.
[    5.533685] systemd[1]: Mounting FUSE Control File System...
[    5.544855] systemd[1]: Mounting Kernel Configuration File System...
[    5.563130] systemd[1]: Started File System Check Daemon to report status.
[    5.578672] systemd[1]: Mounted FUSE Control File System.
[    5.588352] systemd[1]: [email protected]: Succeeded.
[    5.591802] systemd[1]: Finished Load Kernel Module drm.
[    5.605518] systemd[1]: Mounted Kernel Configuration File System.
[    5.611314] i2c_dev: i2c /dev entries driver
[    5.622136] systemd[1]: Finished Load Kernel Modules.
[    5.643980] systemd[1]: Starting Apply Kernel Variables...
[    5.737506] systemd[1]: Finished Apply Kernel Variables.
[    5.830866] systemd[1]: Finished File System Check on Root Device.
[    5.838319] systemd[1]: Starting Remount Root and Kernel File Systems...
[    5.936998] systemd[1]: Started Journal Service.
[    6.080387] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: none.
[    6.168221] systemd-journald[132]: Received client request to flush runtime journal.
[    8.834276] mc: Linux media interface: v0.10
[    8.879146] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    8.881646] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    8.881700] [vc_sm_connected_init]: start
[    8.887543] videodev: Linux video capture interface: v2.00
[    8.895397] [vc_sm_connected_init]: installed successfully
[    8.933882] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    8.970769] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    8.974873] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    8.983619] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    8.986561] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    8.987326] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    8.987975] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    8.988566] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    8.988626] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    8.988664] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    8.988694] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    8.988721] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    9.000788] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    9.000928] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    9.001894] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    9.002816] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    9.003559] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    9.004544] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    9.004607] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    9.004642] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    9.004671] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    9.004720] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    9.005094] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    9.020739] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    9.020829] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    9.051228] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    9.051331] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    9.060197] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    9.060294] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    9.063141] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    9.067390] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    9.067473] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    9.069308] bcm2835_audio bcm2835_audio: there is not valid maps for state default
[    9.266292] i2c i2c-11: Added multiplexed i2c bus 0
[    9.268963] i2c 10-001a: Fixing up cyclic dependency with 3f801000.csi
[    9.269661] i2c i2c-11: Added multiplexed i2c bus 10
[    9.697339] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.768787] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.835852] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[    9.965028] brcmfmac: F1 signature read @0x18000000=0x1542a9a6
[    9.996086] usbcore: registered new interface driver snd-usb-audio
[   10.007230] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2
[   10.008557] usbcore: registered new interface driver brcmfmac
[   10.008898] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43436-sdio.raspberrypi,model-zero-2-w.bin failed with error -2
[   10.047572] checking generic (1e402000 7f8000) vs hw (0 ffffffffffffffff)
[   10.047625] fb0: switching to vc4 from simple
[   10.115269] Console: switching to colour dummy device 80x25
[   10.128313] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[   10.138921] Registered IR keymap rc-cec
[   10.139247] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[   10.139619] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input3
[   10.203261] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2
[   10.203490] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43436-sdio for chip BCM43430/2
[   10.232808] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/2 wl0: Oct  9 2020 14:44:32 version 9.88.4.65 (test) (f149b32@shgit)  (r679549) FWID 01-f40f3270
[   11.541360] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[   11.545803] Registered IR keymap rc-cec
[   11.546108] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
[   11.546538] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input4
[   11.608763] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[   11.609434] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[   11.609919] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[   11.610363] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[   11.610960] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[   11.611377] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[   11.631252] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[   11.717972] Console: switching to colour frame buffer device 240x67
[   11.718053] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[   12.226608] ak7375: loading out-of-tree module taints kernel.
[   12.277049] imx519 10-001a: Device found is imx519
[   12.284558] imx519 10-001a: Consider updating driver imx519 to match on endpoints
[   12.316086] uart-pl011 3f201000.serial: no DMA platform data
[   12.499524] 8021q: 802.1Q VLAN Support v1.8
[   12.565640] Adding 102396k swap on /var/swap.  Priority:-2 extents:4 across:135164k SSFS
[   13.273847] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   15.052939] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   18.545937] Bluetooth: Core ver 2.22
[   18.546093] NET: Registered PF_BLUETOOTH protocol family
[   18.546105] Bluetooth: HCI device and connection manager initialized
[   18.546136] Bluetooth: HCI socket layer initialized
[   18.546154] Bluetooth: L2CAP socket layer initialized
[   18.546185] Bluetooth: SCO socket layer initialized
[   18.560181] Bluetooth: HCI UART driver ver 2.3
[   18.560216] Bluetooth: HCI UART protocol H4 registered
[   18.560345] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   18.560702] Bluetooth: HCI UART protocol Broadcom registered
[   18.956873] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   18.956905] Bluetooth: BNEP filters: protocol multicast
[   18.956932] Bluetooth: BNEP socket layer initialized
[   18.983578] NET: Registered PF_ALG protocol family
[   33.758554] cam-dummy-reg: disabling
[   57.319272] Bluetooth: RFCOMM TTY layer initialized
[   57.319327] Bluetooth: RFCOMM socket layer initialized
[   57.319370] Bluetooth: RFCOMM ver 1.11
[  305.022353] unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
[  305.022402] unicam 3f801000.csi: Failed to start media pipeline: -22
[  339.583268] v4l2loopback driver version 0.12.5 loaded
[  342.205502] unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
[  342.205536] unicam 3f801000.csi: Failed to start media pipeline: -22
[  712.144247] unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
[  712.144282] unicam 3f801000.csi: Failed to start media pipeline: -22
[  756.631540] unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
[  756.631586] unicam 3f801000.csi: Failed to start media pipeline: -22
[71016.955409] unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
[71016.955445] unicam 3f801000.csi: Failed to start media pipeline: -22
[72837.289080] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[72837.289148] ------------[ cut here ]------------
[72837.289153] WARNING: CPU: 2 PID: 2603 at mm/page_alloc.c:5380 __alloc_pages+0x2d0/0x330
[72837.289180] Modules linked in: v4l2loopback(O) rfcomm cmac algif_hash aes_arm64 algif_skcipher af_alg bnep hci_uart btbcm bluetooth ecdh_generic ecc 8021q garp stp llc imx519(O) ak7375(O) snd_soc_hdmi_codec vc4 snd_usb_audio cec snd_hwdep snd_usbmidi_lib brcmfmac snd_rawmidi brcmutil snd_seq_device drm_kms_helper cfg80211 snd_soc_core snd_compress rfkill snd_pcm_dmaengine syscopyarea raspberrypi_hwmon sysfillrect i2c_mux_pinctrl i2c_mux sysimgblt fb_sys_fops bcm2835_unicam snd_bcm2835(C) v4l2_dv_timings v4l2_fwnode v4l2_async snd_pcm bcm2835_codec(C) snd_timer bcm2835_v4l2(C) bcm2835_isp(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_dma_contig snd videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common vc_sm_cma(C) videodev mc i2c_bcm2835 uio_pdrv_genirq uio i2c_dev drm drm_panel_orientation_quirks backlight fuse ip_tables x_tables ipv6
[72837.289489] CPU: 2 PID: 2603 Comm: v4l2compress Tainted: G         C O      5.15.32-v8+ #1538
[72837.289500] Hardware name: Raspberry Pi Zero 2 W Rev 1.0 (DT)
[72837.289507] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[72837.289518] pc : __alloc_pages+0x2d0/0x330
[72837.289528] lr : __dma_direct_alloc_pages+0x168/0x1b0
[72837.289541] sp : ffffffc00a7eb880
[72837.289546] x29: ffffffc00a7eb880 x28: ffffff8004553060 x27: ffffffc00a7ebb58
[72837.289563] x26: 0000000000000001 x25: ffffffc008115144 x24: 0000000000000000
[72837.289580] x23: 0000000001f0c000 x22: 0000000000000cc1 x21: ffffffc008e8a9c8
[72837.289596] x20: ffffff80020b1c10 x19: ffffffc008e8a9c8 x18: 0000000000000001
[72837.289613] x17: 72202c7365676170 x16: 2038343937203a65 x15: 7a69732d71657220
[72837.289631] x14: 2c64656c69616620 x13: 32312d203a746572 x12: ffffffc0093a6670
[72837.289648] x11: 0000000000000003 x10: ffffffc00938e630 x9 : ffffffc008115788
[72837.289664] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : ffffff8017ec3908
[72837.289681] x5 : 0000000000000001 x4 : 000000000000003f x3 : 0000000000000000
[72837.289697] x2 : 0000000000000000 x1 : 000000000000000d x0 : 0000000000000cc1
[72837.289713] Call trace:
[72837.289718]  __alloc_pages+0x2d0/0x330
[72837.289729]  __dma_direct_alloc_pages+0x168/0x1b0
[72837.289740]  dma_direct_alloc+0x7c/0x330
[72837.289750]  dma_alloc_attrs+0xac/0xc0
[72837.289759]  vb2_dc_alloc+0x70/0x130 [videobuf2_dma_contig]
[72837.289778]  __vb2_queue_alloc+0x220/0x488 [videobuf2_common]
[72837.289814]  vb2_core_reqbufs+0x288/0x480 [videobuf2_common]
[72837.289842]  vb2_ioctl_reqbufs+0x8c/0xc8 [videobuf2_v4l2]
[72837.289868]  v4l_reqbufs+0x54/0x68 [videodev]
[72837.289965]  __video_do_ioctl+0x188/0x410 [videodev]
[72837.290041]  video_usercopy+0x310/0x7d0 [videodev]
[72837.290118]  video_ioctl2+0x20/0x38 [videodev]
[72837.290196]  v4l2_ioctl+0x48/0x68 [videodev]
[72837.290272]  __arm64_sys_ioctl+0xb0/0xf0
[72837.290283]  invoke_syscall+0x4c/0x110
[72837.290296]  el0_svc_common.constprop.3+0xfc/0x120
[72837.290307]  do_el0_svc+0x2c/0x90
[72837.290317]  el0_svc+0x24/0x60
[72837.290328]  el0t_64_sync_handler+0x90/0xb8
[72837.290339]  el0t_64_sync+0x1a0/0x1a4
[72837.290349] ---[ end trace aa974b5e21c49768 ]---
[72837.290428] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[72838.232825] unicam 3f801000.csi: Failed to start media pipeline: -22
[72944.238775] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[72944.238848] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[72944.290040] unicam 3f801000.csi: Failed to start media pipeline: -22
[73000.438165] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[73000.438238] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[73000.500981] unicam 3f801000.csi: Failed to start media pipeline: -22
[73026.519661] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[73026.519746] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[73026.530298] unicam 3f801000.csi: Failed to start media pipeline: -22
[73033.916987] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[73033.917069] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[73033.979383] unicam 3f801000.csi: Failed to start media pipeline: -22
[73071.542100] cma: cma_alloc: linux,cma: alloc failed, req-size: 7948 pages, ret: -12
[73071.542176] unicam 3f801000.csi: dma_alloc_coherent of size 32555008 failed
[73071.544799] unicam 3f801000.csi: Failed to start media pipeline: -22

@mpromonet
Copy link
Owner

Hi,

It seems the req buffers to the v4l2 kernel module fails, maybe a bug there. You can try with '-r' to use the read interface instead of mmap.

Best Regards,
Michel.

@Tormund1985
Copy link
Author

Tormund1985 commented May 19, 2022

Executing:
modprobe v4l2loopback video_nr=3
And then:

v4l2compress -r -v -fH264 /dev/video0 /dev/video3 & v4l2rtspserver -F 10 -S -P 8554 /dev/video3 &

root@raspberrypi:/# v4l2compress -r -v -fH264 /dev/video0 /dev/video3 & v4l2rtspserver -F 10 -S -P 8554 /dev/video3 &
[4] 809
[5] 810
root@raspberrypi:/# log level:500

[NOTICE] /home/pi/v4l2rtspserver/main.cpp:297
        Version: 0.3.3-2-g0c63d58 live555 version:2022.04.26
[ERROR] /home/pi/v4l2rtspserver/main.cpp:304
        Failed to create RTSP server: IPv6 bind() error (port number: 8554): Address already in uselog level:600

[NOTICE] src/V4l2Device.cpp:133
        driver:unicam capabilities:a5a00001 mandatory:1000001
[NOTICE] src/V4l2Device.cpp:136
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video0 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video0:YUYV size:640x480 bufferSize:614400
[NOTICE] src/V4l2Device.cpp:133
        driver:v4l2 loopback capabilities:85208003 mandatory:4000002
[NOTICE] src/V4l2Device.cpp:135
        /dev/video3 support output
[NOTICE] src/V4l2Device.cpp:136
        /dev/video3 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video3 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video3 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video3:H264 size:640x480 bufferSize:1228800
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video3
[NOTICE] src/V4l2MmapDevice.cpp:73
        Device /dev/video3 nb buffer:2
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:0 size:1228800 offset:0
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:1 size:1228800 offset:1228800
[NOTICE] src/v4l2compress.cpp:74

getting this error throught journal:

may 19 12:30:34 raspberrypi kernel: unicam 3f801000.csi: Wrong width or height 640x480 (remote pad set to 4656x3496)
may 19 12:30:34 raspberrypi kernel: unicam 3f801000.csi: Failed to start media pipeline: -22

It works but video not showing on rtsp streaming.

Of course camera with libcamera commands works fine.

@mpromonet
Copy link
Owner

Hi,

v4l2compress doesnot change the resolution, it takes capture size and compress with same size. You may set resolution with v4l2-ctl before running v4l2compress.

Best Regards,
Michel.

@Tormund1985
Copy link
Author

HI Michel,

Nothing change for me:

root@raspberrypi:/# v4l2compress -v -r -fH264 /dev/video0 /dev/video3
log level:600

[NOTICE] src/V4l2Device.cpp:133
        driver:unicam capabilities:a5a00001 mandatory:1000001
[NOTICE] src/V4l2Device.cpp:136
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video0 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video0:pRAA size:1920x1080 bufferSize:2592000
[NOTICE] src/V4l2Device.cpp:133
        driver:v4l2 loopback capabilities:85208003 mandatory:4000002
[NOTICE] src/V4l2Device.cpp:135
        /dev/video3 support output
[NOTICE] src/V4l2Device.cpp:136
        /dev/video3 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video3 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video3 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video3:H264 size:1920x1080 bufferSize:8294400
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video3
[NOTICE] src/V4l2MmapDevice.cpp:73
        Device /dev/video3 nb buffer:2
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:0 size:8294400 offset:0
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:1 size:8294400 offset:8294400
[NOTICE] src/v4l2compress.cpp:74
**Violación de segmento**
root@raspberrypi:/# v4l2compress -v -fH264 /dev/video0 /dev/video3
log level:600

[NOTICE] src/V4l2Device.cpp:133
        driver:unicam capabilities:a5a00001 mandatory:4000001
[NOTICE] src/V4l2Device.cpp:136
        /dev/video0 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video0 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video0 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video0:pRAA size:1920x1080 bufferSize:2592000
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video0
[NOTICE] src/V4l2MmapDevice.cpp:73
        Device /dev/video0 nb buffer:10
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:0 size:2592000 offset:0
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:1 size:2592000 offset:2592768
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:2 size:2592000 offset:5185536
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:3 size:2592000 offset:7778304
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:4 size:2592000 offset:10371072
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:5 size:2592000 offset:12963840
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:6 size:2592000 offset:15556608
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:7 size:2592000 offset:18149376
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:8 size:2592000 offset:20742144
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video0 buffer idx:9 size:2592000 offset:23334912
[NOTICE] src/V4l2Device.cpp:133
        driver:v4l2 loopback capabilities:85208003 mandatory:4000002
[NOTICE] src/V4l2Device.cpp:135
        /dev/video3 support output
[NOTICE] src/V4l2Device.cpp:136
        /dev/video3 support capture
[NOTICE] src/V4l2Device.cpp:138
        /dev/video3 support read/write
[NOTICE] src/V4l2Device.cpp:139
        /dev/video3 support streaming
[NOTICE] src/V4l2Device.cpp:225
        /dev/video3:H264 size:1920x1080 bufferSize:8294400
[NOTICE] src/V4l2MmapDevice.cpp:49
        Device /dev/video3
[NOTICE] src/V4l2MmapDevice.cpp:73
        Device /dev/video3 nb buffer:2
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:0 size:8294400 offset:0
[INFO] src/V4l2MmapDevice.cpp:92
        Device /dev/video3 buffer idx:1 size:8294400 offset:8294400
[NOTICE] src/v4l2compress.cpp:74
V**iolación de segmento**

Any ideas?

Thanks you so much for your help, I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants