embeded/raspberry pi2015. 8. 9. 00:52

/usr/share/X11/xorg.conf.d/99-fbturbo.conf

파일의 출력 프레임버퍼를 수정하던


FRAMEBUFFER-/dev/fb1 start

를 하던

HDMI를 통해서만 raspivid 영상이 출력된다 -_ㅠ


tvservice를 해줘도.. 여전히 HDMI로만 ㅠㅠ
config.txt가 아닌 cmdline.txt를 통해 커널에게 fb를 0이 기본이 아닌 1로 해줘야 할지도? ㅠㅠ

pi@raspberrypi ~/src/v4l-utils $ tvservice -p

Powering on HDMI with preferred settings


/boot/cmdline.txt

fbcon=map:1


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=81150]

fbcon=map:1으로 해줘도 raspivid는 fb0으로만 출력 ㅠㅠ


FRAMEBUFFER=dev/fb1 startx

[링크 : http://rudas5594.tistory.com/272] 


fbtft

Linux Framebuffer drivers for small TFT LCD display modules.


Test

X Windows

FRAMEBUFFER=/dev/fb1 startx

Note: You might need to move an xorg config out of the way if X doesn't start:


sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~

[링크 : https://github.com/notro/fbtft/wiki]


+

아몰랑 현재 포기중..

일다은 cmdline을 통해서 기본 프레임 버퍼를 바꾸는 법만 테스트 완료


+

2017.09.04

2015/08/12 - [embeded/raspberry pi] - 라즈베리 파이 xorg.conf 설정으로 SPI/HDMI 모니터 연결


Posted by 구차니
embeded/raspberry pi2015. 8. 8. 19:39

아쉽게도 라즈베리 파이에 있는 DSI 인터페이스는 아니고

[링크 : https://en.wikipedia.org/wiki/Display_Serial_Interface]


SPI를 이용한 터치 + 320x480 해상도의 LCD 이다.

DVD 하나가 들어있는데 라즈베리 img 파일이 거의 대부분의 용량을 차지하는데..

microSD의 용량이 참.. 많이도 커졌구나 싶은느낌...



이렇게 깔끔하게 장착된다 +_+


[링크 : http://eleparts.co.kr/EPXDR9TM]

    [링크 : http://cafe.naver.com/pipc/11690]


┌──────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                               │

│    1 Expand Filesystem              Ensures that all of the SD card s         │

│    2 Change User Password           Change password for the default u         │

│    3 Enable Boot to Desktop/Scratch Choose whether to boot into a des         │

│    4 Internationalisation Options   Set up language and regional sett         │

│    5 Enable Camera                  Enable this Pi to work with the R         │

│    6 Add to Rastrack                Add this Pi to the online Raspber         │

│    7 Overclock                      Configure overclocking for your P         │

│    8 Advanced Options               Configure advanced settings               │

│    9 About raspi-config             Information about this configurat         │

│                                                                               │

│                                                                               │

│                                                                               │

│                     <Select>                     <Finish>                     │

│                                                                               │

└───────────────────────────────────────────────────────────────────────────────┘


┌──────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                               │

│    A1 Overscan                      You may need to configure oversca         │

│    A2 Hostname                      Set the visible name for this Pi          │

│    A3 Memory Split                  Change the amount of memory made          │

│    A4 SSH                           Enable/Disable remote command lin         │

│    A5 Device Tree                   Enable/Disable the use of Device          │

│    A6 SPI                           Enable/Disable automatic loading          │

│    A7 I2C                           Enable/Disable automatic loading          │

│    A8 Serial                        Enable/Disable shell and kernel m         │

│    A9 Audio                         Force audio out through HDMI or 3         │

│    A0 Update                        Update this tool to the latest ve         │

│                                                                               │

│                                                                               │

│                     <Select>                     <Back>                       │

│                                                                               │

└───────────────────────────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐

          │                                                          │

          │ Would you like the SPI interface to be enabled?          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │               <>                   <아니오>            │

          │                                                          │

          └──────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ The SPI interface will be enabled after a reboot         │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                          <확인>                          │
          │                                                          │
          └──────────────────────────────────────────────────────────┘

          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ Would you like the SPI kernel module to be loaded by     │
          │ default?                                                 │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │               <>                   <아니오>            │
          │                                                          │
          └──────────────────────────────────────────────────────────┘


          ┌──────────────────────────────────────────────────────────┐
          │                                                          │
          │ SPI kernel module will now be loaded by default          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                                                          │
          │                          <확인>                          │
          │                                                          │
          └──────────────────────────────────────────────────────────┘ 


pi@raspberrypi ~/src/lcd $ git clone https://github.com/swkim01/waveshare-dtoverlays.git
Cloning into 'waveshare-dtoverlays'...
remote: Counting objects: 39, done.
remote: Total 39 (delta 0), reused 0 (delta 0), pack-reused 39
Unpacking objects: 100% (39/39), done.

3.5인치 모델이니까 waveshare35a 로 설정
pi@raspberrypi ~/src/lcd $ sudo cp waveshare-dtoverlays/waveshare35a-overlay.dtb /boot/overlays/
pi@raspberrypi ~/src/lcd $ sudo vi /boot/config.txt
dtparam=spi=on
dtoverlay=waveshare35a

pi@raspberrypi ~ $ sudo vi /usr/share/X11/xorg.conf.d/99-fbturbo.conf
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.

Section "Device"
        Identifier      "Allwinner A10/A13 FBDEV"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb1"

        Option          "SwapbuffersWait" "true"
EndSection

pi@raspberrypi ~/src/lcd $ sudo reboot

원래 전원인가 되면 이렇게 밝던 녀석이


dtoverlay 설정이 되면 약간 흐리게 화면이 나온다.


일단은.. HDMI가 위쪽으로 가는게 기본 방향인데..

터치랑 화면이랑 각도가 안 맞아서 이래저래 캘리브레이션을 해야 할 듯 ㅠㅠ


pi@raspberrypi ~ $ sudo apt-get install xinput
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  xinput
0개 업그레이드, 1개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
26.2 k바이트 아카이브를 받아야 합니다.
이 작업 후 84.0 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main xinput armhf 1.6.0-1 [26.2 kB]
내려받기 26.2 k바이트, 소요시간 1초 (19.1 k바이트/초)
Selecting previously unselected package xinput.
(데이터베이스 읽는중 ...현재 92893개의 파일과 디렉터리가 설치되어 있습니다.)
xinput 패키지를 푸는 중입니다 (.../xinput_1.6.0-1_armhf.deb에서) ...
man-db에 대한 트리거를 처리하는 중입니다 ...
xinput (1.6.0-1) 설정하는 중입니다 ...


pi@raspberrypi ~ $ sudo service lightdm restart
[ ok ] Stopping Light Display Manager: lightdm.
[ ok ] Starting Light Display Manager: lightdm.


pi@raspberrypi /boot/overlays $ ls -al /dev/fb*
crw-rw---T 1 root video 29, 0  1월  1  1970 /dev/fb0
crw-rw---T 1 root video 29, 1  1월  1  1970 /dev/fb1


그나저나.. fb0가 HDMI나 composite로 되어있어서
카메라 출력해보면 LCD로는 출력이 되지 않는다 -_-



+

2015.08.09 추가

으으 로컬에서 해야 하는거 느므시러 ㅠㅠ

$ wget http://tronnes.org/downloads/xinput-calibrator_0.7.5-1_armhf.deb

$ sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb

$ xinput_calibrator

Unable to connect to X server 


그나저나 SPI라서 그런지 화면 갱신이 꽤나 느리네..

pi@raspberrypi ~ $ xinput_calibrator 

Calibrating EVDEV driver for "ADS7846 Touchscreen" id=9

current calibration values (from XInput): min_x=0, max_x=4095 and min_y=0, max_y=4095


Doing dynamic recalibration:

Swapping X and Y axis...

Setting new calibration data: 237, 3965, 3888, 214



--> Making the calibration permanent <--

  copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf'

Section "InputClass"

Identifier "calibration"

MatchProduct "ADS7846 Touchscreen"

Option "Calibration" "237 3965 3888 214"

Option "SwapAxes" "1"

EndSection 


위에 예제 대로 했더니 잘 안되서

X/Y 모두 스왑 / 축 바꾸기 전부 시전 ㄷㄷ

$ cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf

# This is a minimal sample config file, which can be copied to

# /etc/X11/xorg.conf in order to make the Xorg server pick up

# and load xf86-video-fbturbo driver installed in the system.

#

# When troubleshooting, check /var/log/Xorg.0.log for the debugging

# output and error messages.

#

# Run "man fbturbo" to get additional information about the extra

# configuration options for tuning the driver.


Section "Device"

        Identifier      "Allwinner A10/A13 FBDEV"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb1"


        Option          "SwapbuffersWait" "true"

EndSection


Section "InputClass"

        Identifier      "calibration"

        MatchProduct    "ADS7846 Touchscreen"

        Option  "Calibration"   "237 3965 3888 214"

        Option  "SwapAxes"      "1"

        Option "InvertX" "1"

        Option "InvertY" "1"

EndSection 


$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:1



SPI로 하기 때문에 어쩔수 없이.. 16bit color인건가? RGB565로 걸리네



fbtft 의 덕택으로 편하게 쓰는.. 로그? ㅋ

pi@raspberrypi ~ $ dmesg | grep -i tft

[    3.611085] fbtft: module is from the staging directory, the quality is unknown, you have been warned.

[    3.700666] fbtft_of_value: regwidth = 16

[    3.709297] fbtft_of_value: buswidth = 8

[    3.716195] fbtft_of_value: debug = 0

[    3.733842] fbtft_of_value: rotate = 90

[    3.748195] fbtft_of_value: fps = 30 


dts 파일을 열어보니.. 먼소리인지 모르겠다? ㅋㅋ

아무튼

LCD는 16MHz SPI clk

터치는 2MHz SPI clk로 작동이라.. 저걸 변경해서 LCD쪽 SPI 클럭 올려주면 좀더 빠르려나?

pi@raspberrypi ~/src/lcd/waveshare-dtoverlays $ cat waveshare35a-overlay.dts

/*

 * Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker

 *

 */


/dts-v1/;

/plugin/;


/ {

        compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";


        fragment@0 {

                target = <&spi0>;

                __overlay__ {

                        status = "okay";


                        spidev@0{

                                status = "disabled";

                        };


                        spidev@1{

                                status = "disabled";

                        };

                };

        };


        fragment@1 {

                target = <&gpio>;

                __overlay__ {

                        waveshare35a_pins: waveshare35a_pins {

                                brcm,pins = <17 25 24>;

                                brcm,function = <0 0 0>; /* in in in */

                        };

                };

        };


        fragment@2 {

                target = <&spi0>;

                __overlay__ {

                        /* needed to avoid dtc warning */

                        #address-cells = <1>;

                        #size-cells = <0>;


                        waveshare35a: waveshare35a@0{

                                compatible = "ilitek,ili9486";

                                reg = <0>;

                                pinctrl-names = "default";

                                pinctrl-0 = <&waveshare35a_pins>;


                                spi-max-frequency = <16000000>;

                                rotate = <90>;

                                bgr;

                                fps = <30>;

                                buswidth = <8>;

                                regwidth = <16>;

                                reset-gpios = <&gpio 25 0>;

                                dc-gpios = <&gpio 24 0>;

                                debug = <0>;


                                init = <0x10000b0 0x00

                                        0x1000011

                                        0x20000ff

                                        0x100003a 0x55

                                        0x1000036 0x28

                                        0x10000c2 0x44

                                        0x10000c5 0x00 0x00 0x00 0x00

                                        0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00

                                        0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00

                                        0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00

                                        /* piscreen -> waveshare35a */

                                        0x1000036 0x28

                                        0x1000011

                                        0x1000029>;

                        };


                        waveshare35a-ts@1 {

                                compatible = "ti,ads7846";

                                reg = <1>;


                                spi-max-frequency = <2000000>;

                                interrupts = <17 2>; /* high-to-low edge triggered */

                                interrupt-parent = <&gpio>;

                                pendown-gpio = <&gpio 17 0>;

                                ti,x-plate-ohms = /bits/ 16 <60>;

                                ti,pressure-max = /bits/ 16 <255>;

                        };

                };

        };

        __overrides__ {

                speed =         <&waveshare35a>,"spi-max-frequency:0";

                rotate =        <&waveshare35a>,"rotate:0";

                fps =           <&waveshare35a>,"fps:0";

                debug =         <&waveshare35a>,"debug:0";

        };

}; 


+
2015.08.11
스케마틱은 안보이니 이거라도..
아무튼.. 


어느게 몇번 핀인지 알게 머야 ㅠㅠ

[링크 : http://www.wvshare.com/product/3.5inch-RPi-LCD-A.htm]


핀번호로 매칭해보니.. 왼쪽의 SPI는 LCD 오른쪽의 SPI가 터치구나..


Posted by 구차니
embeded/raspberry pi2015. 8. 8. 19:37

Camera Serial Interface - CSI

Mobile Industry Processor Interface - MIPI

[링크 : https://en.wikipedia.org/wiki/MIPI_Alliance]


라즈베리 파이에 장착된 인터페이스로 CSI DSI중에

DSI는 구하기 드럽게 힘들고 -_-a

아무튼 카메라는 구할 수 있으니 일단 이녀석부터!


사이즈는 이정도!


CAMERA 라고 써있는 녀석을 손톱으로 톡! 해서 들어 올리고


핀 방향을 잘 맞춰서 꼽고


걸쇠를 다시 내려주면 끝!



$ sudo raspi-config


┌─────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────┐

│                                                                              │

│    1 Expand Filesystem              Ensures that all of the SD card s        │

│    2 Change User Password           Change password for the default u        │

│    3 Enable Boot to Desktop/Scratch Choose whether to boot into a des        │

│    4 Internationalisation Options   Set up language and regional sett        │

│    5 Enable Camera                  Enable this Pi to work with the R        │

│    6 Add to Rastrack                Add this Pi to the online Raspber        │

│    7 Overclock                      Configure overclocking for your P        │

│    8 Advanced Options               Configure advanced settings              │

│    9 About raspi-config             Information about this configurat        │

│                                                                              │

│                                                                              │

│                                                                              │

│                     <Select>                     <Finish>                    │

│                                                                              │

└──────────────────────────────────────────────────────────────────────────────┘ 


          ┌──────────────────────────────────────────────────────────┐

          │                                                          │

          │ Enable support for Raspberry Pi camera?                  │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │                                                          │

          │               <Disable>              <Enable>            │

          │                                                          │

          └──────────────────────────────────────────────────────────┘ 


Enable 해주고 나면 강제로 리부팅 된다.


pi@raspberrypi ~ $ raspi

raspi-config  raspistill    raspivid      raspiyuv

pi@raspberrypi ~ $ whereis raspistill

raspistill: /usr/bin/raspistill /usr/bin/X11/raspistill /opt/vc/bin/raspistill

pi@raspberrypi ~ $ whereis raspivid

raspivid: /usr/bin/raspivid /usr/bin/X11/raspivid /opt/vc/bin/raspivid


raspivid는 5초간만 출력하는것이 기본값이니 -t 0 으로 해주면 종료되지 않고 계속 출력된다.


pi@raspberrypi ~ $ raspistill

raspistill Camera App v1.3.8


Runs camera for specific time, and take JPG capture at end if requested


usage: raspistill [options]


Image parameter commands


-?, --help      : This help information

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

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

-q, --quality   : Set jpeg quality <0 to 100>

-r, --raw       : Add raw bayer data to jpeg metadata

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

-l, --latest    : Link latest complete image to filename <filename>

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

-t, --timeout   : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)

-th, --thumb    : Set thumbnail parameters (x:y:quality) or none

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

-e, --encoding  : Encoding to use for output file (jpg, bmp, gif, png)

-x, --exif      : EXIF tag to apply to captures (format as 'key=value') or none

-tl, --timelapse        : Timelapse mode. Takes a picture every <t>ms

-fp, --fullpreview      : Run the preview using the still capture resolution (may reduce preview fps)

-k, --keypress  : Wait between captures for a ENTER, X then ENTER to exit

-s, --signal    : Wait between captures for a SIGUSR1 from another process

-g, --gl        : Draw preview to texture instead of using video render component

-gc, --glcapture        : Capture the GL frame-buffer instead of the camera image

-set, --settings        : Retrieve camera settings and write to stdout

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

-bm, --burst    : Enable 'burst capture mode'

-md, --mode     : Force sensor mode. 0=auto. See docs for other modes available

-dt, --datetime : Replace frame number in file name with DateTime (YearMonthDayHourMinSec)

-ts, --timestamp        : Replace frame number in file name with unix timestamp (seconds since 1900)


Preview parameter commands


-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


Image parameter commands


-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

-vs, --vstab    : Turn on video stabilisation

-ev, --ev       : Set EV compensation

-ex, --exposure : Set exposure mode (see Notes)

-awb, --awb     : Set AWB mode (see Notes)

-ifx, --imxfx   : Set image effect (see Notes)

-cfx, --colfx   : Set colour effect (U:V)

-mm, --metering : Set metering mode (see Notes)

-rot, --rotation        : Set image rotation (0-359)

-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])

-ss, --shutter  : Set shutter speed in microseconds

-awbg, --awbgains       : Set AWB gains - AWB mode must be off

-drc, --drc     : Set DRC Level

-st, --stats    : Force recomputation of statistics on stills capture pass

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

-3d, --stereo   : Select stereoscopic mode

-dec, --decimate        : Half width/height of stereo image

-3dswap, --3dswap       : Swap camera order for stereoscopic

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



Notes


Exposure mode options :

auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks


AWB mode options :

off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon


Image Effect mode options :

none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon


Metering Mode options :

average,spot,backlit,matrix


Dynamic Range Compression (DRC) options :

off,low,med,high


Preview parameter commands


-gs, --glscene  : GL scene square,teapot,mirror,yuv,sobel

-gw, --glwin    : GL window settings <'x,y,w,h'> 


pi@raspberrypi ~ $ raspivid


raspivid Camera App v1.3.12


Display camera output to display, and optionally saves an H264 capture at requested bitrate



usage: raspivid [options]


Image parameter commands


-?, --help      : This help information

-w, --width     : Set image width <size>. Default 1920

-h, --height    : Set image height <size>. Default 1080

-b, --bitrate   : Set bitrate. Use bits per second (e.g. 10MBits/s would be -b 10000000)

-o, --output    : Output filename <filename> (to write to stdout, use '-o -')

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

-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

-e, --penc      : Display preview image *after* encoding (shows compression artifacts)

-g, --intra     : Specify the intra refresh period (key frame rate/GoP size). Zero to produce an initial I-frame and then just P-frames.

-pf, --profile  : Specify H264 profile to use for encoding

-td, --timed    : Cycle between capture and pause. -cycle on,off where on is record time and off is pause time in ms

-s, --signal    : Cycle between capture and pause on Signal

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

-i, --initial   : Initial state. Use 'record' or 'pause'. Default 'record'

-qp, --qp       : Quantisation parameter. Use approximately 10-40. Default 0 (off)

-ih, --inline   : Insert inline headers (SPS, PPS) to stream

-sg, --segment  : Segment output file in to multiple files at specified interval <ms>

-wr, --wrap     : In segment mode, wrap any numbered filename back to 1 when reach number

-sn, --start    : In segment mode, start with specified segment number

-sp, --split    : In wait mode, create new output file for each start event

-c, --circular  : Run encoded data through circular buffer until triggered then save

-x, --vectors   : Output filename <filename> for inline motion vectors

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

-set, --settings        : Retrieve camera settings and write to stdout

-md, --mode     : Force sensor mode. 0=auto. See docs for other modes available

-if, --irefresh : Set intra refresh type



H264 Profile options :

baseline,main,high



H264 Intra refresh options :

cyclic,adaptive,both,cyclicrows


Preview parameter commands


-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


Image parameter commands


-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

-vs, --vstab    : Turn on video stabilisation

-ev, --ev       : Set EV compensation

-ex, --exposure : Set exposure mode (see Notes)

-awb, --awb     : Set AWB mode (see Notes)

-ifx, --imxfx   : Set image effect (see Notes)

-cfx, --colfx   : Set colour effect (U:V)

-mm, --metering : Set metering mode (see Notes)

-rot, --rotation        : Set image rotation (0-359)

-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])

-ss, --shutter  : Set shutter speed in microseconds

-awbg, --awbgains       : Set AWB gains - AWB mode must be off

-drc, --drc     : Set DRC Level

-st, --stats    : Force recomputation of statistics on stills capture pass

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

-3d, --stereo   : Select stereoscopic mode

-dec, --decimate        : Half width/height of stereo image

-3dswap, --3dswap       : Swap camera order for stereoscopic

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



Notes


Exposure mode options :

auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks


AWB mode options :

off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon


Image Effect mode options :

none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon


Metering Mode options :

average,spot,backlit,matrix


Dynamic Range Compression (DRC) options :

off,low,med,high


지원가능한 해상도는 아래와 같은데..

5M에서도 15fps가 나오나보네? ㄷㄷㄷ



[링크 : http://www.ovt.com/uploads/parts/OV5647.pdf]


120 프레임 보고 싶은데.. 잘 안되는거 같네..

fps를 1로 해도 부드럽게 나온다.. 30fps 고정인가?

pi@raspberrypi ~ $ raspivid -w 320 -h 230 -t 0 -f -v -fps 120


raspivid Camera App v1.3.12


Width 320, Height 230, filename (null)

bitrate 17000000, framerate 120, time delay 0

H264 Profile high

H264 Quantisation level 0, Inline headers No

H264 Intra refresh type (null), period -1

Wait method : Capture forever

Initial state 'record'



Preview Yes, Full screen Yes

Preview window 0,0,1024,768

Opacity 255

Sharpness 0, Contrast 0, Brightness 50

Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0

Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'

Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128

Rotation 0, hflip No, vflip No

ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000

Camera component done

Encoder component done

Starting component connection stage

Connecting camera preview port to preview input port

Starting video preview

Connecting camera stills port to encoder input port

Enabling encoder output port 


엘레파츠의 자료내에 포함된 예제 옵션

$ raspistill -o image.jpg

$ raspivid -o video.h264 -t 10000

[링크 : http://eleparts.co.kr/EPXD4BBD]


csi의 경우 /dev/video 처럼 v4l로 인식이 되지 않아 콘솔상에서 파이프라인을 통해 보내야 할 듯 하다.

$ raspivid -o - -t 9999999 -w 640 -h 360 -fps 25 | tee videofilename.h264 | cvlc stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264


[링크 : http://raspi.tv/.../how-to-stream-vlc-from-a-raspberry-pi-with-gpio-control-but-without-being-root] 


라즈베리 쪽 설정

pi@raspberrypi ~ $ raspivid -o - -t 0 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264


클라이언트 쪽 설정/windows + vlc


vlc의 캐쉬를 0으로 설정해도 1초 정도의 지연이 생긴다 -_ㅠ


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=43969] 




+

2015.08.24


Basically the cable specifications are :

Type : FFC / FPC (Flat Flex)

Wires : 15 

Pitch : 1mm

Contacts : Type B (This means you have the contacts at opposite sides of the cable. So one is at the top and the other at the bottom)

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=43737]



+

2015.09.15


$ raspivid -o - -t 0 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

[링크 : http://www.raspberry-projects.com/pi/pi-hardware/raspberry-pi-camera/streaming-video-using-vlc-player]

Posted by 구차니
embeded/raspberry pi2015. 8. 7. 10:21

중고나라에서 센서들 살까 하다가

일단은 눈물을 머금고.. 휴가동안 소소하게 가지고 놀고

앞으로도 꾸준히 가지고 놀수 있을 것 같은 녀석으로 구매 ㅠㅠ




Posted by 구차니

NTC Thermistor : Negative Temperature Coefficient of Thermistor


에라 먼소리인지 모르겠다 ㅋㅋ

아무튼 온도에 따라 저항이 변하는 녀석인데

온도가 오를수록 저항이 감소한다. 그래서 Negative 인가?


[링크 : http://www.joinset.com/tech/PDF/NTC%20Thermistor_tech.pdf]

[링크 : https://en.wikipedia.org/wiki/Temperature_coefficient]

'이론 관련 > 하드웨어 관련' 카테고리의 다른 글

adc - single ended / differential  (0) 2015.11.17
adc - 시그마델타 / SAR  (0) 2015.11.16
가속도/각속도/기울기 센서  (0) 2015.08.25
SDIO / Secure Digital Input Output  (0) 2014.12.26
ADC 원리  (3) 2010.08.09
Posted by 구차니
하드웨어/Storage2015. 8. 6. 17:15

microSD는 아래 사진 기준 31/32/321/3 번이라고 쓰인 녀석으로 인해

카드가 빠져 나오지 않도록 되어있는데.. 이녀석이 부러지거나 하면 들어가기는 하지만

손으로 당기면 빠져 나오는 듯...




크윽 ㅠㅠ

라즈베리 파이 2B에 molex 껀데 이걸 구해서 땜해야 하나? ㅠㅠ



[링크 : http://www.google.com/patents/US7249975]

[링크 : http://www.korean.molex.com/.../microSD-104031/...]

'하드웨어 > Storage' 카테고리의 다른 글

synology port  (0) 2015.12.22
synology DS213j SVN server 설치  (0) 2015.10.19
xpenology  (0) 2015.06.30
DS213j 하이버네이트 정상작동중!  (0) 2015.06.25
Synology DS213j DSM5.2 업데이트!!!  (0) 2015.06.09
Posted by 구차니

imx 시리즈의 SDK에도 gstreamer가 들어있긴 했는데

그냥 넘겼거늘... 상당히 대단한 프레임워크로 보여서 급 관심..



먼저, 지연 없는 스트림 전송이라고 제목을 지었지만, 실제 딜레이는 720p 영상전송에서 0.3초 가량 되는 것 같습니다.

[링크 : http://www.rasplay.org/?p=5607]


[링크 : http://gstreamer.freedesktop.org/]

[링크 : https://en.wikipedia.org/wiki/GStreamer]

'프로그램 사용 > gstreamer' 카테고리의 다른 글

gstreamer element 생성 gst_element_factory_make()  (0) 2021.07.13
gst fpsdisplaysink  (0) 2021.02.18
gst videorate  (0) 2021.02.09
gstreamer tee  (0) 2021.02.08
gstreamer pipeline  (0) 2015.11.02
Posted by 구차니
embeded/raspberry pi2015. 8. 5. 15:27

지인 : 조만간 지르겠군..



[링크 : http://eleparts.co.kr/EPXDR9TM] 3.5" LCD 320*480

    [링크 : http://cafe.naver.com/pipc/11690]

[링크 : http://eleparts.co.kr/EPXD4BBD] 5M CIS OV5647

Posted by 구차니

창덕궁에 전화해서 상담해보니

인터파크나 옥션 구매시 구매자 계정의 신분증이 필요하다고 한다.

즉, 구매자의 신분이 중요(?)하지, 방문자의 신분은 중요하지 않다는 것






구차니 : 근데 아빠.. 국가유공자 50명 무료라는데요? (줄 서서 가면 안되시나이까? 예매 귀찬사옵니다.)

파파몬 : 걍 일반으로 예매해줘

구차니 : 뉘에 -_-


생각해보니 나 휴가인데..

아내랑 애 데리고 가볼까...


엌...옥션 미리 볼걸 ㅋㅋ



* 티켓 오픈일시 : 2015년 8월 5일(수) 오후 2시
* 매수제한 : 1인 최대 4매

* 옥션티켓에서는 인터넷 예매만 가능하며 전화예매는 불가합니다.
  외국인은 선착순 현장구매가 가능합니다. (선착순 200매 / 1인 최대 4매)

* Foreign visitors can make ticket purchases at the palace entrance.
  (Available per day for Foreigners: up tp 200 tickets / First come first served.)
  One person can buy no more than four tickets.


* 본 행사는 비지정석 / 선착순 입장 이며, 자율관람으로 진행됩니다.
* 예매수수료가 지원되어, 예매수수료 없이 예매가 가능합니다.
* 비회원은 웹 예매가 불가능하므로 예매시간 전 미리 회원가입을 부탁드립니다.

* 관람권 교환시 유의사항
- 구입하신 예매권은 경복궁매표소에서 교환하신 후 입장하실 수 있습니다.
- 예매하신 당사자의 신분증을 꼭 지참하셔야 합니다.(암표등의 부정한 티켓 유통 차단)
- 관람권은 당일에 한하여 유효하며, 당일 관람권 교환 및 취소는 불가합니다.

* 만 6세 이하 영유아는 인원제한없이 무료입장이 가능합니다.
- 국가유공자 및 장애인은 각 1일 50명(보조자 1명 포함) 총 100명 무료로 입장이 가능합니다.
* 국가유공자 상이등급 1급은 보조자 1명 무료로 입장이 가능합니다.
* 장애인은 중증 장애인(1~3급)일 경우 보조자 1명 무료로 입장이 가능합니다.

* 이 행사는 옥외행사이므로 우천시에도 진행되며, 우천시 야외활동을 위한 우산 등을 준비하시기 바랍니다.


[링크  : http://ticket.auction.co.kr/Home/Perf/PerfDetailInfo_2015_Bee_RoyalPalace_Summer.aspx]



야간 특별관람 시간은 오후 7시30분부터 오후 10시까지(입장마감 오후 9시까지)이며, 야간 특별관람 기간 중 국립고궁박물관도 경복궁 야간 특별관람기간에 맞춰 오후 10시까지 연장 운영한다. 다만 8월 17일, 24일은 박물관 정기휴관, 8월 18일, 25일은 경복궁 정기휴무로 야간에 개방하지 않는다. 야간 특별관람 예매를 못한 경우에는 상시 야간관람이 가능한 덕수궁(오후 8시까지 입장, 오후 9시까지 관람, 월요일 휴무)을 이용할 수 있다.


1일 최대 관람인원은 경복궁․창경궁 각각 2,500명이며, 관람권 구매는 가족단위 관람객이 보다 쉽게 이용할 수 있도록 1인당 2매 구매제한에서 1인당 4매 구매제한으로 완화된다.


일반인은 인터넷 예매만 가능하며, 만 65세 이상 어르신은 현장구매 또는 전화예, 외국인은 현장구매(전화예매 불가)로만 관람권을 구매할 수 있다.

인터넷 예매는 ‘옥션티켓’과 ‘인터파크 티켓’에서8월 5일(수) 오후 2시에 시작하며, 인터넷과 전화 예매자는 관람 당일 매표소에서 신분증을 제시하면 관람권을 배부 받아 입장할 수 있다.

* 인터넷 예매(PC 및 스마트폰 애플리케이션) : 옥션 티켓, 인터파크 티켓

* 전화 예매(만 65세 이상 어르신만 가능) : 인터파크(☎1544-1555, 월-토요일 09시-20시, 일요일․공휴일 09-18시)

* 현장구매: 경복궁 250매(어르신 50매, 외국인 200매), 창경궁 150매(어르신 50매, 외국인 100매)

* 외국인은 현장구매만 가능


관람료는 일반관람(경복궁 3,000원, 창경궁 1,000원)과 같다. 무료관람은 국가유공자․장애인 각 50명에 한해 적용되며, 사전예매 없이 현장에서 국가유공자증과 장애인증을 제시하면 선착순으로 입장할 수 있다. 

* 국가유공자 상이등급 1급, 장애인 1-3급: 본인과 보호자 1명 무료

* 국가유공자 상이등급 2급 이하, 장애인 4급 이하: 본인만 무료


[링크 : http://www.royalpalace.go.kr:8080/content/board/view.asp?seq=288&page=1&c1=&c2=] 



+

500번대 였는데 옥션 예매는 첨이라 모르고 어 이상한 창이네 닫아야지.. -_-

다시 누르니 5500명...

그래서 기다려서 했더니 팝업 설정.. 니미

15000명 기다려서 다시 했더니 결제에서 ActiveX로 매진되었습니다...

ㅆㅂ -_- 안해안해



'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

8월 끝  (0) 2015.08.31
애본다 바빠 ㅠㅠ  (0) 2015.08.22
국민은행 + KB 손해보험 -_-  (3) 2015.08.04
8월 할일  (0) 2015.08.02
8월...  (0) 2015.08.01
Posted by 구차니
embeded/raspberry pi2015. 8. 5. 09:28

예전회사에서 ARM9 으로 테스트 하던 녀석들 얼마나 먹나 궁금해서 URL 찾아서 해보니. ㄷㄷㄷ

의외로 ARM11도 쓸만하구나...


WMAPro / WMA2 / AAC+

오디오인데.. ARM9에서는 끊어지던 녀석들이.. 눈물나게 잘 나온다. ㄷㄷㄷ



ARM11의 mpegaudio에 AAC+가 포함되서 그런건가?

2015/01/26 - [프로그램 사용/ffmpeg / ffserver] - ffmpeg arm 아키텍쳐별 최적화 코덱



pi@raspberrypi ~ $ mplayer mms://stream.polskieradio.pl/zagranica_wma10

ASF file format detected.

[asfheader] Audio stream found, -aid 1

Clip info:

 title: Zagranica

 author: Polskie Radio S.A.

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 48000 Hz, 2 ch, floatle, 48.0 kbit/1.56% (ratio: 6000->384000)

Selected audio codec: [ffwmapro] afm: ffmpeg (WMA Pro audio (FFmpeg))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

[AO_ALSA] Format floatle is not supported by hardware, trying default.

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:674191.3 (187:16:31.3) of 0.0 (unknown)  7.1% 10%



pi@raspberrypi ~ $ mplayer mms://stream.polskieradio.pl/program3

ASF file format detected.

[asfheader] Audio stream found, -aid 1

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 48000 Hz, 2 ch, s16le, 96.0 kbit/6.25% (ratio: 12000->192000)

Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:674819.8 (187:26:59.8) of 0.0 (unknown)  6.6% 15%



pi@raspberrypi ~ $ mplayer http://80.86.106.110:8002/

AAC file format detected.

==========================================================================

Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)

Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))

==========================================================================

AO: [pulse] Init failed: Connection refused

Failed to initialize audio driver 'pulse'

AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)

Video: no video

Starting playback...

A:   2.9 (02.8) of 0.0 (unknown) 16.3% 28%



----

라즈베리 파이 B / ARMv6 / ARM11 vfp


$ mplayer mms://stream.polskieradio.pl/zagranica_wma10

A:674191.3 (187:16:31.3) of 0.0 (unknown)  7.1% 10%


$ mplayer mms://stream.polskieradio.pl/program3

A:674819.8 (187:26:59.8) of 0.0 (unknown)  6.6% 15%


$ mplayer http://80.86.106.110:8002/

A:   2.9 (02.8) of 0.0 (unknown) 16.3% 28%


-----

라즈베리 파이 2B / ARMv7 / Cortex-A7 quad neon


$ mplayer mms://stream.polskieradio.pl/zagranica_wma10

A:723685.4 (201:01:25.4) of 0.0 (unknown)  4.0% 24%


$ mplayer mms://stream.polskieradio.pl/program3

A:724356.9 (201:12:36.9) of 0.0 (unknown)  2.9% 25%


$ mplayer http://80.86.106.110:8002/

A:   2.4 (02.3) of 0.0 (unknown)  9.2% 31%



잠시 착각했으나..

cpu 점유율 / 캐시사용률 이다 -_-a

2015/01/26 - [프로그램 사용/ffmpeg / ffserver] - mplayer status line



Posted by 구차니