반응형

라즈베리 파이 카메라를 이용해 실시간 영상 스트리밍을 해 보자.


실시간 영상 스트리밍은 기본 설치되어 있는 cvlc(command-line vlc)를 이용한다. 만약 vlc가 설치되어 있지 않다면 설치하고 위 명령어를 입력한다.


위와 같이 대기 상태가 된다. (명령어 끝에 &를 붙여주면 백그라운드로 실행 할 수 있다)


다른 컴퓨터(우분투)에서 VLC를 실행한다. Media - Open Network Stream... 을 선택하고 '라즈베리파이 IP 주소:9000/'을 입력하면 스트리밍된 영상이 플레이 된다.


윈도우에서도 VLC를 설치하면 영상을 플레이 할 수 있다.


■ raspivid 옵션

  • -t, --timeout: Time (in ms) to capture for. If not specified, set to 5s. Zero to disable

  • -d, --demo: Run a demo mode (cycle through range of camera options, no capture)

  • -fps, --framerate: Specify the frames per second to record

  • -k, --keypress: Cycle between capture and pause on ENTER

  • -w, --width: Set image width <size>

  • -h, --height: Set image height <size>

  • -o, --output: Output filename <filename> (to write to stdout, use '-o -'). If not specified, no file is saved

  • -v, --verbose: Output verbose information during run

  • -cs, --camselect: Select camera <number>. Default 0

  • -p, --preview: Preview window settings <'x,y,w,h'>

  • -f, --fullscreen: Fullscreen preview mode

  • -op, --opacity: Preview window opacity (0-255)

  • -n, --nopreview: Do not display a preview window

  • -dn, --dispnum: Display on which to display the preview window (dispmanx/tvservice numbering)

  • -sh, --sharpness: Set image sharpness (-100 to 100)

  • -co, --contrast: Set image contrast (-100 to 100)

  • -br, --brightness: Set image brightness (0 to 100)

  • -sa, --saturation: Set image saturation (-100 to 100)

  • -ISO, --ISO: Set capture ISO

  • -rot, --rotation: Set image rotation (0, 90, 180, or 270)

  • -hf, --hflip: Set horizontal flip

  • -vf, --vflip: Set vertical flip

  • -roi, --roi: Set region of interest (x,y,w,d as normalised coordinates [0.0-1.0])

  • -a, --annotate: Enable/Set annotate flags or text

  • -ae, --annotateex: Set extra annotation parameters (text size, text colour(hex YUV), bg colour(hex YUV), justify, x, y)


반응형
Posted by J-sean
: