Viewing a remote camera stream in Scratch - raspberry-pi

I'm doing a project for my son where we're going to have a remote Pi Zero with a camera and various sensors and actuators, connected via wired Ethernet to a Pi 3 as a controller with a Scratch GUI.
Seems like I can get a local camera to send video to the background of the Scratch project, or I can get a remote camera to stream back to e.g. VLC Player using RTSP.
Being as how I want to teach my son how to build a scratch GUI on the Pi3 to remote control the sensors and actuators on the Pi Zero, I'd really like the rtsp video stream to show up as the Scratch project background so I don't have to have a separate VLC window open.
So... how to pick up an RTSP video stream and send it to the Scratch backdrop?
Anyone got any ideas as to where I could start? I have intermediate raspbian, python and Scratch skills.
Thanks in advance,
Ben

Just a wild suggestion. Maybe it is possible to access your USB camera on the remote pi zero as a local camera using remote USB (I admit I have never tried it).
This functionality is provided by the package usbip
https://packages.debian.org/jessie/usbip
You can install this package using the following command on both raspberry pi devices:
sudo apt-get install usbip
For more information about the setup enter the command:
man usbip.

Related

It is either cec-ctl or VLC, not both on Raspberry Pi 3 B+ Bullseye

My Node.js project utilizes CEC control and VLC where the app turns on the TV and chooses the HDMI port that the VLC video stream will be viewed on at a scheduled time.
Everything worked on Buster except that too many indeterminate crashes with segmentation faults occur with cec-client.
Since I am nearing a 'production' release, I thought it best to upgrade the OS to Bullseye and find a cec-client replacement. I found cec-ctl and made it asynchronous - ctl-cec works perfectly, everytime, no crashes. BUT, now VLC does not render anything, not even a black screen. Doing a 'ps' command during a time that a video should be playing, I can see that VLC is running.
What I tried: It turns out that changing the /boot/config.txt dtoverlay=vc4-fkms-v3d (Buster) to dtoverlay=vc4-kms-v3d (Bullseye) causes the problem. The Buster version of dtoverlay seems to be required for VLC to run, and The Bullseye version of dtoverlay is required for a /dev/cec0 to be created and used by ctl-cec.
All I can see from my inexperienced view is mutual exclusivity, but this doesn't feel like this is the final answer. Using both dtoverlay version (Buster/Bullseye) will brick the pi (speaking from the very recent experience of one not well-versed in dtoverlays).
I also tried: I Googled this problem to the extent of my search skills and have not been able to resolve this problem.
Any help is greatly appreciated!
Raspbian OS: Bullseye (Desktop)
Raspberry Pi 3 B+
App: Node.js based with ability to make config changes and set schedules via an external browser within the LAN.
The solution for my project, after days of Googling, turned out to be TOO simple (found here: https://www.reddit.com/r/archlinuxarm/comments/lg4z5u/no_hdmi_audio_via_alsa_on_raspberry_pi_400/):
sudo apt install pulseaudio
along with:
dtoverlay=vc4-kms-v3d
VLC and cec-ctl now work together perfectly on Raspberry Pi 3B+/Bullseye

How to enable the sound via audio cable on raspberry pi running on FullPageOS?

I’m using a raspberry pi to display my geckoboard dashboard on TV but there is no sound.
Any help will be appreciated.
Go to raspi-config (sudo raspi-config) using your terminal.
System Options (1 for now)
Audio then option 1 (for audio jack)
Check out the Raspberry pi Documentation for more infos.

Raspberry Pi 3 A+ distorted/screeching audio when using ALSA + Jackd2 through on-board headphone jack

I am trying to set up Supercollider on my Raspberry Pi 3 A+ on Raspbian Lite using this guide. Jackd2 and Supercollider both compile fine, and there are no errors when I try to run Supercollider or the jack_simple_client test. However, regardless of different sample rates, buffer sizes, number of periods etc. used in booting the jack server the audio always comes out heavily distorted, with loud high pitched squealing and low popping noises.
Using the speaker-test command from ALSA creates a clean, non distorted test tone. Previously trying pyo as a DSP module would also suffer from the same issue if I used Jack, but would work fine otherwise. This leads me to believe that there is some issue in the communication between jack and ALSA. Power supply is likely not the problem as well. My installed jack version is 1.9.17 and ALSA is k5.4.83-v7+. I am new to working with Linux audio/Jack, so any help is much appreciated!
Things I would try:
Try jack2
Get a fresh SD card, and use the version of jack that comes with raspbian and then either try building again or just trying to also get SuperCollider via apt.
sudo apt-get install cmake libasound2-dev libsamplerate0-dev libsndfile1-dev libavahi-client-dev libicu-dev libreadline-dev libfftw3-dev libxt-dev libcwiid1 libcwiid-dev subversion libqt4-dev libqtwebkit-dev libjack-jackd2-dev
Check how it sounds out of the HDMI port or a USB audio adaptor or a hat. The headphone jack tends to sound terrible anyway on raspberry pis, so if something else works, that's you answer.
I've been working with Alsa around 4 years ago, but remember I had the problem.
First I thought that my device was the reason, and it turned out to be that the noise was coming from wrong channel, and I had to force set alsa channels manually with cli commands and later in config files.
Try to check that alsa does not assign wrong channel when Jack is up.

raspberry full noobs installation from network

I am looking for a way to install noobs raspbian from network. I mean i do not want to connect an hdmi TV, mouse or keyboard.
What i read in documentation is to download noobs (full version) and copy files into sd card. I have read i need to change something in recovery.cmdline file (Adding vncinstall word).
This works for the first raspberry boot: I can see installation screen through VNC. I have choose "Raspbian + pixel" installation. Then, I can see the progress bar.
But at the end of the installation, when the raspberry reboots, i have no VNC, neither ssh or telnet server and at this time i need to plug an HDMI TV, mouse and keyboard.
Do you know how i can automaticly launch a VNC or SSH server without having to plug a TV and keyboard ?
Thanks

Raspberry Pi Pianobar PulseAudio

I have been trying to get pianobar working on my Raspberry Pi. I built version 2013.05.19-dev from Github and it works when I have /etc/libao.conf default_driver=alsa. The problem is that this gives horrible quality audio. I followed the instructions for installing PulseAudio and MPD on dbader's blog. Now when I set default_driver=pulse, pianobar tells me /!\ Cannot open audio device. I have been looking for a solution to this so any tips or help would be great!