How to fix raspivid '* failed to open vchiq instance'
Problem:
You want to capture a video using raspivid, e.g. using a command like
raspivid_vchiq_fix.sh
raspivid -o vid.h264but you only see this error message:
example.txt
* failed to open vchiq instancewith no video being captured.
Quick solution:
Run raspivid using sudo:
example.sh
sudo raspivid -o vid.h264Now either the video will be captured or you will see another error message if there is another issue with your camera setup.
Better solution:
Add your user to the video group so you don’t have to run raspivid as root:
example.sh
sudo usermod -a -G video $USERYou only need to do this once. After that, log out and log back in (or close your SSH session and connect again). If in doubt, restart the Raspberry Pi. See What does ’sudo usermod -a -G group $USER‘ do on Linux? for more details.
Now you will be able to capture video as normal user:
example.sh
raspivid -o vid.h264If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow