The idea was to use my RBP as a baby monitor that would stream over the network so that I could watch from any computer/TV at home.
1.To begin with, I was trying to stream a video from my raspberry pi to be access from another PC using VLC Network Stream.
It worked using this command line :
raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout'#standard{access=http,mux=ts,dst=:8160}' :demux=h264
from subprocess import call
call(["raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264"])
mkdir /home/pi/.config/autostart
nano /home/pi/.config/autostart/autostartCamStream.desktop
autostartCamStream.desktop :
[Desktop Entry]
Type=Application
Name=AutostartCam
Exec=/usr/bin/python3 /home/pi/startCamStream.py
Everything is doing exactly what it is supposed to do! On reboot, the startCamStream.py start streaming and I can access it over my VLC player on my PC on port 8160.
But the problem is that on the Raspberry pi, the stream is full screen and I cant close it or do anything else... Ive try CRTL+Q, ATL+F4 etc. Nothing is working (I cant even see a terminal, the recording seems to be in front of every other programs) Before the autostart, I was closing the stream using CTRL-C since it was running in a terminal.
As I only have basic knowledge in linux environment, I was wondering if anyone has a pretty obvious solution I wouldn't know about... Thank you !
just adding -n to the raspivid command solved the problem.
-n stops the video being previewed.