본문 바로가기

Computer/Linux

라즈베리파이 웹스트리밍 Motion + VLC



sudo apt-get install vlc

raspivid -o - -t 0 -w 640 -h 480 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8081}' :demux=h264


미디어플레이어로(MX Player) Network stream을 열어서 http://ipaddress:8081 로 접속




최신상태로 업데이트 및 업그레이드

sudo apt-get update

sudo apt-get upgrade


모션 설치

sudo apt-get install motion


아래와 같이 환경설정

sudo nano /etc/motion/motion.conf

• daemon on

• webcam_localhost off -> stream_localhost off 로 변경

• Optional (Don’t include the text in brackets)

• webcam_maxrate 100 (This will allow for real-time streaming but requires more bandwidth)

• framerate 100 (This will allow for 100 frames to be captured per second allowing for smooth video)

• width 640 (This changes the width of the image displayed)

• height 480 (This changes the height of the image displayed)


아래와 같이 환경설정

sudo nano /etc/default/motion

start_motion_daemon=yes


모션기능 시작 정지

sudo service motion start

sudo service motion stop


웹사이트 8081 포트로 접속하여 스트리밍 확인

192.x.x.x:8081



unable to open video device 이라고 뜰 경우 참조 (출처: https://www.raspberrypi.org/forums/viewtopic.php?p=864996#p864996 )