这个想法是用我的RBP作为一个婴儿监视器,它可以在网络上流动,这样我就可以在家里的任何电脑/电视上观看。
1.首先,我尝试用VLC网络流从另一台PC上播放一段来自我的覆盆子皮的视频。
它使用这个命令行工作:
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.desktopautostartCamStream.desktop:
[Desktop Entry]
Type=Application
Name=AutostartCam
Exec=/usr/bin/python3 /home/pi/startCamStream.py一切都在做它应该做的事!在重启时,startCamStream.py开始流,我可以通过我的PC 8160端口上的VLC播放器访问它。
但问题是,在覆盆子π,流是全屏,我不能关闭它或做任何其他.我尝试过CRTL+Q、ATL+F4等。在自动启动之前,什么都没有工作(我甚至看不到终端,录音似乎就在所有其他程序前面),我使用CTRL关闭了流,因为它在一个终端中运行。
由于我在linux环境中只有基本知识,我想知道是否有人有一个我不知道的非常明显的解决方案.谢谢!
发布于 2020-11-01 02:24:02
将-n添加到raspivid命令就解决了这个问题。
-n停止预览视频。
https://stackoverflow.com/questions/64407624
复制相似问题