embeded/raspberry pi2016. 5. 27. 11:08

raspivid의 제한(?) 인지 1920*1080이 최대라

-md 설정을 이용한 최대 해상도인 2592*1944(5M)는 스트리밍이 불가능...

그래도 확실히 1920보다는 해상도가 오르니 나은건가?


요건 안되고

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


얘는 되고..

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



RASPIVID


-mode, -md

Sets a specified sensor mode, disabling the automatic selection. Possible values are :


Mode Size Aspect Ratio Frame rates FOV Binning

0 automatic selection

1 1920x1080 16:9 1-30fps Partial None

2 2592x1944 4:3 1-15fps Full None


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

Width of resulting video. This should be between 64 and 1920.


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

Height of resulting video. This should be between 64 and 1080



[링크 : https://www.raspberrypi.org/documentation/raspbian/applications/camera.md]


캡쳐 해보니.. 화각이랑 해상도가 달라지긴 하네..


2M (1920x1080)


5M(2592x1944)


$ raspivid -t 0 -n -md 2 -v


raspivid Camera App v1.3.12


Width 1920, Height 1080, filename (null)

bitrate 17000000, framerate 30, 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 No, 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 stills port to encoder input port

Enabling encoder output port 



$ raspivid -t 0 -n -md 2 -w 2592 -h 1944 -v


raspivid Camera App v1.3.12


Width 2592, Height 1944, filename (null)

bitrate 17000000, framerate 30, 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 No, 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 stills port to encoder input port

mmal: mmal_vc_port_enable: failed to enable port vc.ril.video_encode:in:0(OPQV): EINVAL

mmal: mmal_port_enable: failed to enable connected port (vc.ril.video_encode:in:0(OPQV))0xc9d330 (EINVAL)

mmal: mmal_connection_enable: output port couldn't be enabled

mmal: main: Failed to connect camera video port to encoder input

mmal: Argument is invalid

Closing down

Close down completed, all components disconnected, disabled and destroyed


mmal: Failed to run camera app. Please check for firmware updates 


음... 왜 안되지 ... ㅠㅠ

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


5M로 설정하면 주기적으로 에러가 발생하는데..

[73d00508] core input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 320 ms)

[73d00508] core input error: ES_OUT_RESET_PCR called

[73d00508] core input debug: Buffering 0%

[73d00508] core input debug: Buffering 12%

[73d00508] core input debug: Buffering 24%

[73d00508] core input debug: Buffering 37%

[73d00508] core input debug: Buffering 49%

[73d00508] core input debug: Buffering 62%

[73d00508] core input debug: Buffering 74%

[73d00508] core input debug: Buffering 87%

[73d00508] core input debug: Buffering 99%

[73d00508] core input debug: Stream buffering done (360 ms in 624 ms)

[73d00508] core input debug: Decoder wait done in 0 ms


cpu 점유율은 거의 무의미한 정도의 차이?
2M


5M



+

2016.05.31

음.. 비디오 코어 자체가 fullHD 인코딩이라.. 그 이상의 해상도는 무리인건가?

rpicam v2 에서도 그럼 8M 로 받아와도 2M로 밖에 전송이 불가능할지도?


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

Posted by 구차니
embeded/raspberry pi2016. 5. 25. 19:42

오랫만에 가지고 놀아 보려고 했더니..

망했어 ㅠㅠ

FFC 저거 구하기 빡센데 ㅠㅠ


일단.. sudo apt-get update; sudo apt-get upgrade로 시스템 업그레이드의 여파인가...

config.txt에서는 gpu_mem=128 였는데...


불 들어 옴

$ raspivid -t 0

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC

mmal: camera component couldn't be enabled

mmal: main: Failed to create camera component

mmal: Failed to run camera app. Please check for firmware updates



불 안들어 옴

$ raspivid -t 0

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)

mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)

mmal: Failed to create camera component

mmal: main: Failed to create camera component

mmal: Camera is not detected. Please check carefully the camera module is installed correctly



선 뽑고..

$ raspivid -t 0

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)

mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)

mmal: Failed to create camera component

mmal: main: Failed to create camera component

mmal: Camera is not detected. Please check carefully the camera module is installed correctly




Last login: Wed May 25 19:49:45 2016

pi@raspberrypi:~ $ sudo rpi-update

 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom

 *** Performing self-update

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 10670  100 10670    0     0  24776      0 --:--:-- --:--:-- --:--:-- 24756

 *** Relaunching after update

 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom

 *** We're running for the first time

 *** Backing up files (this will take a few minutes)

 *** Backing up firmware

 *** Backing up modules 4.1.19-v7+

#############################################################

This update bumps to rpi-4.4.y linux tree

Be aware there could be compatibility issues with some drivers

Discussion here:

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=144087

##############################################################

 *** Downloading specific firmware revision (this will take a few minutes)

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100   168    0   168    0     0    188      0 --:--:-- --:--:-- --:--:--   188

100 50.5M  100 50.5M    0     0  1059k      0  0:00:48  0:00:48 --:--:-- 1381k

 *** Updating firmware

 *** Updating kernel modules

 *** depmod 4.4.11-v7+

 *** depmod 4.4.11+

 *** Updating VideoCore libraries

 *** Using HardFP libraries

 *** Updating SDK

 *** Running ldconfig

 *** Storing current firmware revision

 *** Deleting downloaded files

 *** Syncing changes to disk

 *** If no errors appeared, your firmware was successfully updated to 2b9c0bfacfc11ee8bb9b30dc9cdb36289698f8a8

 *** A reboot is needed to activate the new firmware


[링크 : http://raspberrypi..../what-causes-enospc-error-when-using-the-raspberry-pi-camera-module]


/boot/cmdline.txt:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait bcm2708.w1_gpio_pin=18

[링크 : https://www.raspberrypi.org/...?f=28&t=61922&p=477860&hilit=enospc#p478550]


그냥... 현재 기준 신펌웨어로 바꾸니 문제 없다.

rpi-update로도 펌웨어 변경은 적용 안되는 듯?


Posted by 구차니
embeded/raspberry pi2016. 5. 23. 11:41

음? mpeg2 decoder?




[링크 : http://www.raspberrypi.com/license-keys/]

    This key will enable a single Raspberry Pi to decode MPEG-2 video in hardware.

    [링크 : http://www.raspberrypi.com/mpeg-2-license-key/]

    This key will enable a single Raspberry Pi to decode VC-1 video in hardware.

    [링크 : http://www.raspberrypi.com/vc-1-license-key/]



H.264 encode


Alongside MPEG-2 support (which you’ll have to pay for), we’re making H.264 encode available for free. The hardware has always been capable of supporting H.264 encode, but we were under the misapprehension that encode required an additional licence fee, so were waiting until the camera board release (which is still coming later in the year) before spending the money to enable it.

MPEG-2 지원과 동시에(지불해야 할 필요가 있는), H.264 인코더는 무료로 사용이 가능하도록 하였습니다. 하드웨어는 항상 h.264 인코드를 지원할 능력을 갖추고 있습니다만, 추가적인 라이센스 요금을 요구한다는 오해가 있었고, 그것을 활성화 하기 위해 돈을 쓰기 전에 (몇 년 후에나 나올) 카메라 보드가 릴리즈 되기 까지 기다렸습니다


During the course of talking to the MPEG LA about the MPEG-2 licence, we discovered that the existing licence fee that is already baked into the cost of the Raspberry Pi actually covers both encode and decode – I tell you, this stuff is arcane – so we’ve enabled the relevant OpenMAX components by default in the latest firmware. It may take a while for someone to produce an encoder application which uses these components, but once they do you should be able to use the Pi as a standalone transcoder.

MPEG LA와의 MPEG-2 라이센스에 대한 회의를 거쳐, 우리는  라즈베리 파이의 비용에 포함되어 있는 이미 존재하는 라이센스 비용은 실제로 인코딩과 디코딩을 모두 포함한다는 내용들을 발견했습니다 -당신에서 말하겠지만, 이것은 매우 불가사의한 사항입니다 - 그래서 우리는 최신 펌웨어에 기본으로 적절한 OpenMAX 콤포넌트를 가능하도록 하였습니다. 이 콤포넌트들을 사용할 엔코더 어플리케이션 누군가가 만드는데 시간이 걸리겠지만, 그들은 당신이 라즈베리 파이를 독립형 트랜스코더로 사용할 수 있수 있도록 할 것입니다. 

[링크 : https://www.raspberrypi.org/blog/new-video-features/]


[링크 : http://elinux.org/RPiconfig#Licensed_Codecs]


[링크 : http://raspberrypi.stackexchange.com/.../why-does-the-raspberry-pi-need-a-mpeg-2-licence]


DVD 재생시 영상을 디코딩 못하므로 MPEG-2 라이센스 필요?

[링크 : http://echo.tistory.com/93]

[링크 : http://echo.tistory.com/92]


vcgencmd codec_enabled MPG2

vcgencmd codec_enabled WVC1

[링크 : http://www.howtogeek.com/.../how-to-add-mpeg-2-and-vc-1-video-codec-...-raspberry-pi/]



mpeg 라이센스 활성화 시 ff-mpeg2video에서 omx-mpeg2로 변화된다고 한다.


[링크 : https://www.youtube.com/watch?v=3zToVK6U7AM]

Posted by 구차니
embeded/Cortex-M4 Ti2016. 5. 20. 20:01

adc 쓸려면 클럭 소스가 16Mhz 여야 한다는건가?

아니면.. 시스템 클럭이 16Mhz 여야 한다는건가..

예제는 DIV/10 16Mhz.. 아마도 20Mhz 일거 같은데...

XTAL이 16Mhz 이어야 하는 거에 한표인가?



'embeded > Cortex-M4 Ti' 카테고리의 다른 글

tm4c tivaware 버전관련  (0) 2016.09.01
오늘의 지름.. 개발보드  (0) 2016.08.24
tm4c1231e6pm / lm3s1607 타이머 차이점...?  (0) 2016.05.06
keil/c99 에서 __inline ...?  (0) 2016.04.12
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
Posted by 구차니
embeded/arduino(genuino)2016. 5. 9. 09:36

아두이노를 프로세싱으로 하려면..

jar 받아서 추가해주면 되는 듯?


[링크 : http://playground.arduino.cc/Interfacing/Processing]

[링크 : https://www.arduino.cc/en/Reference/Comparison]

'embeded > arduino(genuino)' 카테고리의 다른 글

arduino clcd  (0) 2016.11.25
arduino nano 스펙(PWM)  (0) 2016.11.25
arduino firmata  (0) 2016.04.27
attiny2313 usb client  (0) 2016.04.19
arduino usb joystic / atmega32u4  (0) 2016.04.19
Posted by 구차니
embeded/Cortex-M4 Ti2016. 5. 6. 18:02

자꾸 이상해서 데이터시트 비교하니..

헐.. 16bit 모드로 2개씩 쓰는게 불가능한건가?


아무튼.. timer match던 interval load던 lm3s에서는 둘다 쪼개져 있던게 

tm4c에서는 하나로 합쳐져 있다...


얘는 lm3s1607

#define TIMER_CFG_16_BIT_PAIR   0x04000000  // Two 16-bit timers


// Set the global timer configuration.

HWREG(ulBase + TIMER_O_CFG) = ulConfig >> 24; 

CFG에 24비트 쉬프트 해서 하는데.. GPTMCFG의 값이 그러면...

0x4로 16bit timer 로 설정되고..





얘는 tm4c1231e6pm


#define TIMER_CFG_SPLIT_PAIR     0x04000000  // Two half-width timers


HWREG(ui32Base + TIMER_O_CFG) = ui32Config >> 24;



얘도.. 쪼개서 쓰는게 있긴한데...


+

되긴 되는데.. 클럭의 차이로 인해서(50MHz / 80Mhz) 타이머 load 값에 차이가 생기니까..

그게 문제인듯...

50,000,000 를 /1000 하면 50,000 으로 65535를 안넘는데

80,000,000 을 /1000 하면 80,000 으로 65525를 넘어서서 오작동 하는 듯...

아무튼 프리스케일러 써봐야하나...

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

오늘의 지름.. 개발보드  (0) 2016.08.24
TM4C1231E6PM ADC  (0) 2016.05.20
keil/c99 에서 __inline ...?  (0) 2016.04.12
tm4c1231e6pm DIV400 ?  (0) 2016.04.12
lm3s1607 대체제 검색중..  (0) 2016.04.12
Posted by 구차니
embeded/arduino(genuino)2016. 4. 27. 09:08

아두이노 예제에 있는데 머하는 넘인지 찾아 봐야지




[링크 : https://www.arduino.cc/en/Reference/Firmata]

[링크 : https://github.com/firmata/protocol]

[링크 : http://www.firmata.org/wiki/Main_Page]

'embeded > arduino(genuino)' 카테고리의 다른 글

arduino nano 스펙(PWM)  (0) 2016.11.25
아두이노 프로세싱(언어)  (0) 2016.05.09
attiny2313 usb client  (0) 2016.04.19
arduino usb joystic / atmega32u4  (0) 2016.04.19
processing / arduino / mpu-6050  (0) 2016.04.14
Posted by 구차니
embeded/arduino(genuino)2016. 4. 19. 22:07

attiny 12MHz로 일반 gpio를 이용 저속 usb 통신하는 녀석..

int0 / int1 인가.. gpio로 pd2 / pd3 일려나..


[링크 : http://codeandlife.com/2012/01/22/avr-attiny-usb-tutorial-part-1/]

[링크 : http://codeandlife.com/2012/01/25/avr-attiny-usb-tutorial-part-2/]

[링크 : http://codeandlife.com/2012/01/29/avr-attiny-usb-tutorial-part-3/]

[링크 : http://codeandlife.com/2012/02/04/avr-attiny-usb-tutorial-part-4/]



USBtiny is a software implementation of the USB low-speed protocol for the Atmel ATtiny microcontrollers.

[링크 : http://dicks.home.xs4all.nl/avr/usbtiny/]


V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.




[링크 : https://www.obdev.at/products/vusb/index.html]

'embeded > arduino(genuino)' 카테고리의 다른 글

아두이노 프로세싱(언어)  (0) 2016.05.09
arduino firmata  (0) 2016.04.27
arduino usb joystic / atmega32u4  (0) 2016.04.19
processing / arduino / mpu-6050  (0) 2016.04.14
아두이노.. gpio로 pwm 신호 출력  (0) 2016.04.13
Posted by 구차니
embeded/arduino(genuino)2016. 4. 19. 21:59

아두이노로 조이스틱이나 키보드 만드는게 보여서 검색을 해보니

특정 버전의 아두이노에서만 되는 이유가

ATmega??U4 시리즈에는 USB 컨트롤러가 내장되어 있어서 였군 -_-


ATmega16U4/ATmega32U4

8-bit Microcontroller with 16/32K bytes of ISP Flash and USB Controller

[링크 : http://www.atmel.com/images/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf]


[링크 : http://www.instructables.com/id/Add-USB-Game-Controller-to-Arduino-LeonardoMicro/]

[링크 : https://github.com/MHeironimus/ArduinoJoystickLibrary]




'embeded > arduino(genuino)' 카테고리의 다른 글

arduino firmata  (0) 2016.04.27
attiny2313 usb client  (0) 2016.04.19
processing / arduino / mpu-6050  (0) 2016.04.14
아두이노.. gpio로 pwm 신호 출력  (0) 2016.04.13
아두이노 스테핑 모터..  (0) 2016.04.13
Posted by 구차니
embeded/AVR (ATmega,ATtiny)2016. 4. 16. 22:55

atmega 시리즈

UST-MPB-ATmega128 v1 7H46 HC573

http://www.us-technology.co.kr/product/product_main.asp?mode=101&smode=2


UST-MPB-ATmega128 v3 74HC573 / CS18LV02565ACR70

http://www.us-technology.co.kr/product/product_main.asp?mode=101&smode=9



http://www.gravitech.us/arduino.html  / arduino nano 3.1

? arduino nano 3.0



MEGA128_XBee

http://www.cpuplaza.co.kr/goods_detail.php?goodsIdx=446



GS-08A ATmega8

http://www.gersangin.com/shop/goods/goods_view.php?&goodsno=1092&category=025


gy-291 / adxl-345

https://www.eleparts.co.kr/EPXFBJ8Cbrand



AT89S52

ATTINY2313-20PU

ATMEGA8A-PU


HD74HC244P


MAX232CPE


LM324

L297 / L298N

SLA7033M



음.. 이것들로 멀 하면 좋을까나...

'embeded > AVR (ATmega,ATtiny)' 카테고리의 다른 글

우리로봇기술 사이트 폐쇄  (0) 2016.08.24
avr iar __flash winavr PROGMEM  (0) 2016.07.06
avr pwm timer 계산기  (0) 2016.04.14
atmega sram external  (0) 2016.04.12
avr에 스피커 달기  (0) 2016.03.16
Posted by 구차니