Video Webcam Stream

Rund um die Hardware des Revolution Pi
cjaeck
Posts: 8
Joined: 24 Oct 2022, 13:31

Video Webcam Stream

Post by cjaeck »

Hallo community,

ich möchte einen simplen WebcamStream starten, um einen Prozess zu überwachen. Zuerst habe ich alles auf einem Raspberry Pi 4 mit 2GB RAM getestet und es hat reibungslos funktioniert. Für den Aufbau des Streams habe ich ganz klassisch den mjpg-streamer auf dem aktuellsten PiOS verwendet.
Da nun alles auf dem Pi 4 funktioniert hat und das Ganze in eine Maschine eingebaut werden sollte, habe ich direkt 3 RevPi Core S Module 8GB gekauft. Leider funktioniert hier jedoch nichts mehr. Ich habe verschiedene Streaming Libraries (ustreamer + mjpg-streamer) ausprobiert und jedes mal bricht nach wenigen Sekunden der Stream ab. In den paar Sekunden, in denen man etwas sieht, wird trotz geringer 640x480 Auflösung nur ein sehr Verzögertes und ruckeliges Bild gezeigt. Ich habe sogar zwischen mehreren RevPi Core-Modulen gewechselt, um ein Hardwarefehler auszuschließen.
Nun frag ich mich, ob ich irgendetwas übersehen habe, was man auf dem RevPi konfigurieren/installieren muss?! Außerdem würde mich interessieren, ob ich ohne weiteres ein Image des neusten PiOS aufzuspielen kann? Ich könnte mir vorstellen, dass es daran liegt. Oder ist das Compute Modul einfach deutlich schwächer als der "normale" Raspberry Pi 4?
Ich hoffe, dass mir hier jemand helfen kann und freue mich auf die Antworten.

Viele Grüße
Christian
User avatar
nicolaiB
KUNBUS
Posts: 901
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Video Webcam Stream

Post by nicolaiB »

Hallo Christian,

Die CPU auf dem Compute Module und Pi4 ist identisch (BCM2711). Um der Ursache auf den Grund zu gehen würde ich einmal folgendes versuchen:

- testen ob es auf dem Pi4 auch mit dem letzten Buster Image der Foundation funktioniert. So kannst du ausschließen, dass es an einer älteren Bibliothek oder Kernel liegt
- /boot/config.txt vergleichen. Ggf. ist es erforderlich den KMS Video Treiber zu aktivieten
- piControl deaktivieren ( damit gehen dann keine IO Module mehr). Hintergrund ist, dass PiControl mit hoher RT Priorität läuft und so ggf. mit deinem Stream kollidiert.
- schauen ob in dem Kernel log etwas zu sehen ist (dmesg)

Gruß Nicolai
cjaeck
Posts: 8
Joined: 24 Oct 2022, 13:31

Re: Video Webcam Stream

Post by cjaeck »

Hi Nicolai,

danke für deine schnell Antwort.
- testen ob es auf dem Pi4 auch mit dem letzten Buster Image der Foundation funktioniert. So kannst du ausschließen, dass es an einer älteren Bibliothek oder Kernel liegt
Gerade getestet. Mjpg-Streamer funktioniert auf meinem Raspberry Pi 4 auch mit buster. Interessanterweise merklich ruckeliger, obwohl selbe Hardware. Es muss also am RevPi liegen.
- /boot/config.txt vergleichen. Ggf. ist es erforderlich den KMS Video Treiber zu aktivieten
Quasi identisch. Am Ende gibt es ein paar unterschiede. Das "[all]" hab ich bereits hinzugefügt gehabt:
config.png
config.png (18.68 KiB) Viewed 12126 times
Könnte hier das Problem liegen?
- piControl deaktivieren ( damit gehen dann keine IO Module mehr). Hintergrund ist, dass PiControl mit hoher RT Priorität läuft und so ggf. mit deinem Stream kollidiert.
Hab keinen Prozess gefunden, der so heißt. Wie kann ich PiControl deaktivieren?
- schauen ob in dem Kernel log etwas zu sehen ist (dmesg)
Tatsächlich ist hier etwas zu sehen, was sehr verdächtig wirkt. Allerdings hab ich dieselbe Fehlermeldung auch bei meinem Raspberry Pi. Also eher nicht der Grund.
dmesg.png
dmesg.png (7.63 KiB) Viewed 12126 times
Das komplette log-File ist hier:

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.120-rt70-v7l (support@kunbus.com) (arm-linux-gnueabihf-gcc (Debian 8.3.0-2) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT_RT Thu, 28 Jul 2022 10:36:48 +0200
[    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Compute Module 4S Rev 1.0
[    0.000000] random: crng init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x000000002ac00000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  [mem 0x0000000030000000-0x000000003b3fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003b3fffff]
[    0.000000] On node 0 totalpages: 242688
[    0.000000]   DMA zone: 1728 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 46080 pages, LIFO batch:15
[    0.000000] percpu: Embedded 16 pages/cpu s36448 r8192 d20896 u65536
[    0.000000] pcpu-alloc: s36448 r8192 d20896 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 240960
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:1D:7A:C2 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait nosplash plymouth.ignore-serial-consoles
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 874576K/970752K available (12288K kernel code, 1400K rwdata, 3272K rodata, 2048K init, 881K bss, 30640K reserved, 65536K cma-reserved, 184320K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 35170 entries in 104 pages
[    0.000000] ftrace: allocated 104 pages with 3 groups
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU priority boosting: priority 1 delay 500 ms.
[    0.000000] rcu:     RCU_SOFTIRQ processing moved to rcuc kthreads.
[    0.000000]  No expedited grace period (rcu_normal_after_boot).
[    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 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000001] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000026] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000089] bcm2835: system timer (irq = 25)
[    0.000781] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000798] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000815] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000829] Switching to timer-based delay loop, resolution 18ns
[    0.001149] Console: colour dummy device 80x30
[    0.001169] printk: console [tty1] enabled
[    0.001202] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=540000)
[    0.001219] pid_max: default: 32768 minimum: 301
[    0.001384] LSM: Security Framework initializing
[    0.001564] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001587] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002652] cgroup: Disabling memory control group subsystem
[    0.002932] CPU: Testing write buffer coherency: ok
[    0.002976] CPU0: Spectre BHB: using loop workaround
[    0.003431] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004989] Setting up static identity map for 0x200000 - 0x200060
[    0.005209] rcu: Hierarchical SRCU implementation.
[    0.006961] smp: Bringing up secondary CPUs ...
[    0.008685] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.008700] CPU1: Spectre BHB: using loop workaround
[    0.010729] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.010744] CPU2: Spectre BHB: using loop workaround
[    0.012730] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.012744] CPU3: Spectre BHB: using loop workaround
[    0.013069] smp: Brought up 1 node, 4 CPUs
[    0.013082] SMP: Total of 4 processors activated (432.00 BogoMIPS).
[    0.013093] CPU: All CPU(s) started in HYP mode.
[    0.013099] CPU: Virtualization extensions available.
[    0.014034] devtmpfs: initialized
[    0.033671] VFP support v0.3: implementor 41 architecture 3 part 40 variant 8 rev 0
[    0.034017] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.034043] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.036068] pinctrl core: initialized pinctrl subsystem
[    0.037439] NET: Registered protocol family 16
[    0.040970] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.042071] audit: initializing netlink subsys (disabled)
[    0.042363] audit: type=2000 audit(0.040:1): state=initialized audit_enabled=0 res=1
[    0.043171] thermal_sys: Registered thermal governor 'step_wise'
[    0.044075] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.044087] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.044500] Serial: AMBA PL011 UART driver
[    0.082542] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.100988] raspberrypi-firmware soc:firmware: Attached to firmware from 2021-12-01T15:01:54, variant start
[    0.110998] raspberrypi-firmware soc:firmware: Firmware hash is 71bd3109023a0c8575585ba87cbb374d2eeb038f
[    0.163506] Kprobes globally optimized
[    0.170150] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.174982] vgaarb: loaded
[    0.175519] SCSI subsystem initialized
[    0.175796] usbcore: registered new interface driver usbfs
[    0.175866] usbcore: registered new interface driver hub
[    0.175938] usbcore: registered new device driver usb
[    0.176274] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.176551] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.178898] clocksource: Switched to clocksource arch_sys_counter
[    1.208180] VFS: Disk quotas dquot_6.6.0
[    1.208271] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.208629] FS-Cache: Loaded
[    1.208935] CacheFiles: Loaded
[    1.224084] NET: Registered protocol family 2
[    1.224402] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    1.226607] tcp_listen_portaddr_hash hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.226662] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.226732] TCP bind hash table entries: 8192 (order: 5, 229376 bytes, linear)
[    1.227046] TCP: Hash tables configured (established 8192 bind 8192)
[    1.227344] UDP hash table entries: 512 (order: 3, 32768 bytes, linear)
[    1.227410] UDP-Lite hash table entries: 512 (order: 3, 32768 bytes, linear)
[    1.227930] NET: Registered protocol family 1
[    1.228969] RPC: Registered named UNIX socket transport module.
[    1.228979] RPC: Registered udp transport module.
[    1.228987] RPC: Registered tcp transport module.
[    1.228994] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.229009] PCI: CLS 0 bytes, default 64
[    1.233304] Initialise system trusted keyrings
[    1.233603] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    1.245837] zbud: loaded
[    1.248146] FS-Cache: Netfs 'nfs' registered for caching
[    1.249338] NFS: Registering the id_resolver key type
[    1.249370] Key type id_resolver registered
[    1.249384] Key type id_legacy registered
[    1.249599] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.249608] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.251257] Key type asymmetric registered
[    1.251272] Asymmetric key parser 'x509' registered
[    1.251412] bounce: pool size: 64 pages
[    1.251463] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.251711] io scheduler mq-deadline registered
[    1.251720] io scheduler kyber registered
[    1.257385] bcm2708_fb soc:fb: FB found 1 display(s)
[    1.264109] Console: switching to colour frame buffer device 80x30
[    1.266239] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 640x480
[    1.272176] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.275159] iproc-rng200 fe104000.rng: hwrng registered
[    1.275397] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.291571] brd: module loaded
[    1.311629] loop: module loaded
[    1.313556] Loading iSCSI transport class v2.0-870.
[    1.319057] usbcore: registered new interface driver r8152
[    1.319148] usbcore: registered new interface driver lan78xx
[    1.319215] usbcore: registered new interface driver smsc95xx
[    1.319755] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.319997] dwc_otg: FIQ enabled
[    1.320003] dwc_otg: NAK holdoff enabled
[    1.320009] dwc_otg: FIQ split-transaction FSM enabled
[    1.320020] Module dwc_common_port init
[    1.346286] dwc2 fe980000.usb: supply vusb_d not found, using dummy regulator
[    1.346560] dwc2 fe980000.usb: supply vusb_a not found, using dummy regulator
[    1.399434] dwc2 fe980000.usb: DWC OTG Controller
[    1.399468] dwc2 fe980000.usb: new USB bus registered, assigned bus number 1
[    1.399763] dwc2 fe980000.usb: irq 39, io mem 0xfe980000
[    1.400186] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.400202] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.400214] usb usb1: Product: DWC OTG Controller
[    1.400224] usb usb1: Manufacturer: Linux 5.10.120-rt70-v7l dwc2_hsotg
[    1.400233] usb usb1: SerialNumber: fe980000.usb
[    1.401174] hub 1-0:1.0: USB hub found
[    1.401242] hub 1-0:1.0: 1 port detected
[    1.403303] usbcore: registered new interface driver uas
[    1.403396] usbcore: registered new interface driver usb-storage
[    1.403667] mousedev: PS/2 mouse device common for all mice
[    1.406319] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.413946] sdhci: Secure Digital Host Controller Interface driver
[    1.413950] sdhci: Copyright(c) Pierre Ossman
[    1.414140] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.415755] hid: raw HID events driver (C) Jiri Kosina
[    1.415836] usbcore: registered new interface driver usbhid
[    1.415839] usbhid: USB HID core driver
[    1.418725] Initializing XFRM netlink socket
[    1.418749] NET: Registered protocol family 17
[    1.418987] Key type dns_resolver registered
[    1.419192] Registering SWP/SWPB emulation handler
[    1.419323] printk: console [tty1]: printing thread started
[    1.419448] registered taskstats version 1
[    1.419459] Loading compiled-in X.509 certificates
[    1.419798] Key type ._fscrypt registered
[    1.419804] Key type .fscrypt registered
[    1.419809] Key type fscrypt-provisioning registered
[    1.428684] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.430550] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.434418] of_cfs_init
[    1.434519] of_cfs_init: OK
[    1.466619] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    1.466941] Waiting for root device /dev/mmcblk0p2...
[    1.534420] mmc0: new DDR MMC card at address 0001
[    1.534919] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB
[    1.535166] mmcblk0boot0: mmc0:0001 8GTF4R partition 1 4.00 MiB
[    1.535430] mmcblk0boot1: mmc0:0001 8GTF4R partition 2 4.00 MiB
[    1.535583] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (246:0)
[    1.536695]  mmcblk0: p1 p2
[    1.552328] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
[    1.552336] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    1.620146] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
[    1.620516] EXT4-fs (mmcblk0p2): 1 orphan inode deleted
[    1.620523] EXT4-fs (mmcblk0p2): recovery complete
[    1.625459] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.625516] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.625871] devtmpfs: mounted
[    1.630955] Freeing unused kernel memory: 2048K
[    1.659022] Run /sbin/init as init process
[    1.659026]   with arguments:
[    1.659028]     /sbin/init
[    1.659031]     nosplash
[    1.659033]   with environment:
[    1.659035]     HOME=/
[    1.659038]     TERM=linux
[    1.748889] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.881467] systemd[1]: System time before build time, advancing clock.
[    1.930092] NET: Registered protocol family 10
[    1.931001] Segment Routing with IPv6
[    1.960551] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    1.961033] systemd[1]: Detected architecture arm.
[    1.999174] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcdDevice= 2.00
[    1.999184] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.999598] hub 1-1:1.0: USB hub found
[    1.999684] hub 1-1:1.0: 5 ports detected
[    2.015143] systemd[1]: Set hostname to <RevPi1-05>.
[    2.318904] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    2.449259] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, bcdDevice= 2.00
[    2.449271] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.451886] smsc95xx v2.0.0
[    2.475842] systemd[1]: /lib/systemd/system/teamviewer-iot-mon-agent.service:7: PIDFile= references path below legacy directory /var/run/, updating /var/run/teamviewer-iot-mon-agent.pid → /run/teamviewer-iot-mon-agent.pid; please update the unit file accordingly.
[    2.571984] systemd[1]: Listening on Journal Socket (/dev/log).
[    2.573391] systemd[1]: Listening on Journal Socket.
[    2.574400] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    2.579034] systemd[1]: Mounting POSIX Message Queue File System...
[    2.583521] systemd[1]: Listening on Syslog Socket.
[    2.584795] systemd[1]: Listening on Journal Audit Socket.
[    2.600903] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=usb-001:003:01, irq=MAC)
[    2.601657] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-fe980000.usb-1.1, smsc95xx USB 2.0 Ethernet, c8:3e:a7:10:25:d8
[    2.692477] i2c /dev entries driver
[    2.888361] piControl: loading out-of-tree module taints kernel.
[    2.895409] piControl: built: Thu 28 Jul 2022 11:16:42 AM CEST
[    2.895453] piControl: RevPi Core
[    2.895458] piControl: MAJOR-No.  : 242
[    2.896725] piControl: MAJOR-No.  : 242  MINOR-No.  : 0
[    2.907656] piControl: read file finished, f_pos=1313
[    2.907701] piControl: 1 devices found
[    2.907705] piControl: 8 entries in total
[    2.907721] piControl: cl-comp:  0 addr  6  bit ff  len   8
[    2.909743] uart-pl011 fe201000.serial: no DMA platform data
[    2.909777] piControl: filp_open -1020372736
[    2.909837] piControl: set priority of spi0 to 54
[    2.910039] piControl: piIO thread started
[    2.910045] piControl: RevPiDevice_init()
[    2.910049] piControl: Enter Init State
[    2.910494] piControl: PADS 0 = 0xfefffff7   slew=1  hyst=0  drive=7
[    2.910501] piControl: PADS 1 = 0xfffffefb   slew=1  hyst=1  drive=3
[    2.910505] piControl: PADS 2 = 0xfffffdfd   slew=1  hyst=1  drive=5
[    2.910516] piControl: piControlInit done
[    2.910642] piControl: Enter PresentSignalling1 State
[    2.949386] piControl: Enter InitialSlaveDetectionRight State
[    2.949918] piControl: Enter InitialSlaveDetectionLeft State
[    2.950445] piControl: Enter EndOfConfig State

[    2.950448] piControl: Device  0: Addr  0 Type  95  Act 1  In   6 Out   5
[    2.950454] piControl:            input offset      0  len   6
[    2.950458] piControl:            output offset     6  len   5
[    2.950461] piControl:            serial number 1  version 1.2
[    2.950465] piControl:
[    2.950471] piControl: Adjust: base 0 in 0 out 6 conf 0
[    2.950475] piControl: After Adjustment
[    2.950478] piControl: Device  0: Addr  0 Type  95  Act 1  In   6 Out   5
[    2.950482] piControl:            input offset      0  len   6
[    2.950485] piControl:            output offset     6  len   5
[    2.950488] piControl:
[    2.980737] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    3.063911] systemd-journald[153]: Received request to flush runtime journal from PID 1
[    3.068935] piControl: start data exchange
[    3.308936] piControl: set BridgeState to running
[    3.558902] usb 1-1.3: new high-speed USB device number 4 using dwc2
[    3.727199] usb 1-1.3: New USB device found, idVendor=046d, idProduct=08e5, bcdDevice= 0.0c
[    3.727211] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    3.727217] usb 1-1.3: Product: HD Pro Webcam C920
[    4.647129] ks8851 spi0.1: supply vdd-io not found, using dummy regulator
[    4.748918] ks8851 spi0.1: message enable is 0
[    4.752394] ks8851 spi0.1 eth1: revision 1, MAC 9a:08:d0:ac:92:c0, IRQ 0 (polling), no EEPROM
[    4.752731] ks8851 spi0.0: supply vdd-io not found, using dummy regulator
[    4.764111] ks8851 spi0.0: message enable is 0
[    4.767589] ks8851 spi0.0 eth2: revision 1, MAC 9a:d5:36:8c:11:93, IRQ 0 (polling), no EEPROM
[   11.584343] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[   11.584841] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[   11.585717] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[   11.586342] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[   12.482044] mc: Linux media interface: v0.10
[   12.495840] videodev: Linux video capture interface: v2.00
[   12.561132] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   12.562109] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[   12.562117] [vc_sm_connected_init]: start
[   12.569657] [vc_sm_connected_init]: installed successfully
[   12.589996] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   12.590234] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   12.619219] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   12.622616] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[   12.622636] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[   12.624375] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[   12.624399] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[   12.626877] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[   12.626896] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[   12.628568] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[   12.628582] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[   12.629293] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   12.640360] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   12.675476] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[   12.678566] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[   12.679352] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[   12.679616] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[   12.679786] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[   12.679797] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[   12.679804] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[   12.679810] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[   12.679815] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[   12.682029] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[   12.682263] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[   12.682471] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[   12.682632] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[   12.682642] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[   12.682648] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[   12.682654] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[   12.682660] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[   12.682759] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[   12.812438] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[   12.813482] bcm2835_audio bcm2835_audio: there is not valid maps for state default
[   12.816978] bcm2835_audio bcm2835_audio: card created with 8 channels
[   14.873371] rtc-pcf2127-i2c 1-0051: registered as rtc0
[   14.876367] rtc-pcf2127-i2c 1-0051: setting system clock to 2022-10-24T13:52:32 UTC (1666619552)
[   16.676131] 8021q: 802.1Q VLAN Support v1.8
[   16.787220] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   16.914622] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   17.804146] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   17.807637] smsc95xx 1-1.1:1.0 eth0: Link is Down
[   19.374536] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[   19.374616] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   24.702300] ks8851 spi0.1 piright: renamed from eth1
[   24.825953] ks8851 spi0.0 pileft: renamed from eth2
[   25.296110] usb 1-1.3: current rate 16000 is different from the runtime rate 24000
[   25.301287] usb 1-1.3: current rate 16000 is different from the runtime rate 32000
[   25.433208] usbcore: registered new interface driver snd-usb-audio
[   25.439204] uvcvideo: Found UVC 1.00 device HD Pro Webcam C920 (046d:08e5)
[   25.461938] uvcvideo: Failed to set UVC probe control : -32 (exp. 26).
[   25.462773] input: HD Pro Webcam C920 as /devices/platform/soc/fe980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
[   25.463009] usbcore: registered new interface driver uvcvideo
[   25.463013] USB Video Class driver (1.1.1)
[   28.709229] usb 1-1.3: reset high-speed USB device number 4 using dwc2
[   31.838891] cam-dummy-reg: disabling
Ich hoffe damit gelingt die Fehlersuche! Vielen Dank schonmal.

Grüße
Christian
Last edited by cjaeck on 24 Oct 2022, 16:20, edited 1 time in total.
User avatar
nicolaiB
KUNBUS
Posts: 901
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Video Webcam Stream

Post by nicolaiB »

Dein Rapsberry nutzt den FKMS Video Treiber (dtoverlay=vc4-fkms-v3d), der RevPi den legacy (kein Eintrag). Versuche bitte mal ob es einen Unterschied macht wenn du a) auf dem RevPi den KMS Treiber aktivierst (Kommentarzeichnen in /boot/config.txt vor dtoverlay=vc4-kms-v3d und darauf folgender Zeile entfernen) bzw. b) das gleiche mit dem FKMS Treiber (fkms anstatt kms im dtoverlay).

Ansonsten kannst du mal versuchen ob es besser wird wenn du den XHCI USB Treiber auf dem Revpi verwendest. Hierzu musst du eine Zeile mit otg_mode=1 in der /boot/config.txt ergänzen. Bitte beachte, dass sich hierdurch die MAC Adresse deines RevPis verändert, da die Zuordnung zum Adapter dann nicht mehr passt. Das ist normalerweise kein großes Problem. Sollte dein RevPi eine IP per DHCP bekommen musst du diese ggf. im Router neu nachschauen.

Gruß Nicolai
cjaeck
Posts: 8
Joined: 24 Oct 2022, 13:31

Re: Video Webcam Stream

Post by cjaeck »

Hallo Nicolai,

es funktioniert!
Abhilfe hat in meinem Fall tatsächlich die Verwendung des XHCI USB Treibers geschaffen.

Zur Doku hier meine funktionierende config.txt, welche sich über

Code: Select all

sudo nano /boot/config.txt
bearbeiten lässt:

Code: Select all

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Enable DRM VC4 V3D driver
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[pi4]
[cm4s]
[all]
dtoverlay=dwc2,dr_mode=host

[all]
dtoverlay=revpi-core
dtparam=eth0_mac_hi=0xc83ea710
dtparam=eth0_mac_lo=0x25d8
Grüße
Christian
Last edited by cjaeck on 25 Oct 2022, 09:13, edited 1 time in total.
User avatar
nicolaiB
KUNBUS
Posts: 901
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Video Webcam Stream

Post by nicolaiB »

Hallo Christian,

danke für deine Rückmeldung. Es freut mich zu hören, dass es nun bei dir läuft.

Gruß Nicolai
cjaeck
Posts: 8
Joined: 24 Oct 2022, 13:31

Re: Video Webcam Stream

Post by cjaeck »

Hallo,

nachdem das mjpg-streamer Projekt so gut auf den neuen RevPi Core S Modulen funktioniert hat, wollte ich auch die Webcam-Streams auf dem Core 3+ Modulen updaten (diese laufen bis dato noch auf maximal 480p).
Leider dort wieder dasselbe Problem.
Ich habe alle von Dir, Nicolai, beschriebenen Maßnahmen ausprobiert. Leider ohne Erfolg. Was beim Core S Modul funktionierte, läuft beim Core 3+ Modul leider nicht.
Ich habe das aktuellste buster-Image von Eurer Webseite aufgspielt.
Gibt es noch irgendwelche Ideen dazu?

Viele Grüße
Christian
User avatar
nicolaiB
KUNBUS
Posts: 901
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Video Webcam Stream

Post by nicolaiB »

Hallo Christian,

der XHCI Treiber funktioniert leider nur auf dem Core S, da ältere Compute Module eine andere CPU verwenden, welche keinen XHCI Controller mitbringt. Auf CM4 / CM4S ist der XHCI Controller jedoch neben dem legacy DWC2 Controller und kann daher genutzt werden.

Gruß Nicolai
cjaeck
Posts: 8
Joined: 24 Oct 2022, 13:31

Re: Video Webcam Stream

Post by cjaeck »

Hi,

Ich habe mal die Konfigurationen in den RevPi's mit:

Code: Select all

v4l2-ctl --all
gecheckt.

Dabei kam folgendes für den RevPi3 heraus:
RevPi3+.png
RevPi3+.png (8.53 KiB) Viewed 10534 times
Und folgendes für den RevPi4s:
RevPi4s.png
RevPi4s.png (8.68 KiB) Viewed 10534 times
Liegt das auch an den Treibern? Ich habe nämlich einen normalen RaspberryPi 3+ mit mjpg-Stream in FullHD laufen. Es muss doch irgendwie einen Möglichkeit geben, mit dem RevPi und C920 Webcam einen Stream > 640x480 px aufzubauen?!
Danke für die Hilfe!

Grüße
Christian
User avatar
nicolaiB
KUNBUS
Posts: 901
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Video Webcam Stream

Post by nicolaiB »

Hi Christian,

schau mal bitte was der "normale" Raspberry für einen USB Treiber verwendet (dwc_otg oder dwc2) und der RevPi 3. Ggf. liegt das Problem / unterschiedliche Verhalten hier. Verwendest du auf beiden die selbe Kernel Version?

Gruß Nicolai
Post Reply