How to use camera and microphone on CrowPi L?

edited December 2022 in Raspberry Pi & CrowPi

Question:

Can you suggest any program that I can install to test the camera and microphone please?

Answer:

Install Mplayer first.
1. Upgrade the installer
sudo apt update
sudo apt upgrade
2. Install VLC (CrowPi L has already installed VLC, you can skip this step)
sudo apt install vlc
3. Install MPlayer
sudo apt install mplayer mplayer-gui alsa-base alsa-utils pulseaudio mpg123
4. Reboot the system
sudo reboot



Take a photograph.
1. Open the camera.
sudo mplayer tv://
Then you will see the camera window

2. Take pictures
fswebcam -r 640x480 -S 45 --jpeg 85 --save /home/pi/photo.jpg

The name of the picture is photo.jpg and the picture will be saved in the /home/pi directory. Press enter and then you can find a picture named photo.jpg in the /home/pi directory.




Record audio through microphone.
1. Record the audio.
sudo arecord -D "plughw:1,0" -d 5 test.wav
This is to record a digital audio in wav format for 5 seconds.
Parameter - D refers to the specified recording device. Here, the USB sound card plughw: 1,0 is used.

2. Play the record.
sudo mplayer test.wav
Sign In or Register to comment.