I'm running Arch Linux ARM on my RPi 1B. I'm trying to pipe raspividyuv
's output to a program that I've written and it seems that I can't run raspividyuv
without root privileges.
raspivid
works fine without preceding it with sudo
:
❯ /opt/vc/bin/raspivid -w 640 -h 480 -o - -t 0 -n
prints data to stdout as expected.
But when I run
❯ /opt/vc/bin/raspividyuv -w 640 -h 480 -o - -t 0 -n
I get
usrvcsm: [vcsm_malloc_cache]: [757] [mmal_vc_port buffer]: NULL size or invalid device!
usrvcsm: [vcsm_vc_hdl_from_hdl]: [757]: invalid device or handle!
usrvcsm: [vcsm_lock]: [757]: invalid device or invalid handle!
mmal: mmal_vc_shm_alloc: could not allocate 460800 bytes of shared memory (handle 0)
mmal: mmal_vc_port_payload_alloc: vc.ril.camera:out:1(I420): failed to
allocate 460800 bytes of shared memory
mmal: mmal_pool_initialise_buffer_headers: failed to allocate payload 0/3
mmal: Failed to create buffer header pool for camera still port vc.ril.camera:out:2(OPQV)
fish: '/opt/vc/bin/raspividyuv -w 64...' terminated by signal SIGSEGV (Address boundary error)
and I don't really understand why the memory couldn't be allocated in this case.
However, running
❯ sudo /opt/vc/bin/raspividyuv -w 640 -h 480 -o - -t 0 -n
dumps expected data to stdout.
Any ideas why raspividyuv
behaves like that and how to fix it?