카메라 모듈이 도착하여 테스트를 진행했다

링크로 되어있는 지인의 블로그 (http://bigcode.tistory.com/) 에서

유투브 실시간 스트리밍 할수 있는 방법이 소개되어있어 따라서 진행한 내용을 공유한다.

 

1. 카메라 모듈을 활성화 시킨다.

터미널 창에서 아래처럼 입력하면 예전 도스스러운 화면이 하나 나타난다.

sudo raspi-config

아래 화면의 5. Interfacing Options 를 선택(Enter)한다. (키보드로만 움직일수 있다.)

P1 에 Camera 를 선택(Enter)하면

아래처럼 활성화 시킬것인지 물어본다. Yes 를 선택하면 재부팅하라고 뜬다 재부팅을 한다.

 

2. sourcelist 에  새로운 리파지토리 주소를 추가한다.

터미널에서 아래처럼 입력하고 (vi 보다는 nano 가 난 편한데 vi 가 편하면 vi로 하면된다.)

sudo nano /etc/apt/sources.list

deb http://www.deb-multimedia.org jessie main non-free

위 항목을 추가한다. (아래 그림 참고)

 

아래 명령어를 수행한다. (키정보는 동일하다. - 5C808C2B65558117)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5C808C2B65558117

아래 명령어를 수행하여 추가된 새로운 레파지토리에서 관련 항목을 쭉 다운받도록 한다.

sudo apt-get update

 

3. ffmpeg 설치한다.

sudo apt-get install ffmpeg

라즈페리파이에 사전 준비는 완료되었다.

* 아래는 1~3 의 명령어 수행 시 진행된 모든 내용이다.

pi@raspberrypi:~ $ sudo nano /etc/apt/sources.list
pi@raspberrypi:~ $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5C808C2B65558117
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Fh7MPta9bL --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 5C808C2B65558117
gpg: requesting key 65558117 from hkp server keyserver.ubuntu.com
gpg: key 65558117: public key "Christian Marillat <marillat@debian.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
pi@raspberrypi:~ $ sudo apt-get update
Get:1 http://www.deb-multimedia.org jessie InRelease [35.1 kB]                
Hit http://archive.raspberrypi.org jessie InRelease                           
Get:2 http://www.deb-multimedia.org jessie/main armhf Packages [119 kB]       
Hit http://archive.raspberrypi.org jessie/main armhf Packages                 
Get:3 http://www.deb-multimedia.org jessie/non-free armhf Packages [956 B]    
Hit http://archive.raspberrypi.org jessie/ui armhf Packages                   
Get:4 http://www.deb-multimedia.org jessie/main Translation-en [39.2 kB]      
Get:5 http://www.deb-multimedia.org jessie/non-free Translation-en [2,933 B]  
Hit http://mirrordirector.raspbian.org jessie InRelease                       
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages          
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages         
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages              
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB              
Ign http://archive.raspberrypi.org jessie/main Translation-en                 
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB                
Ign http://archive.raspberrypi.org jessie/ui Translation-en                   
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB       
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en          
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB          
Ign http://mirrordirector.raspbian.org jessie/main Translation-en             
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB      
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en         
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB           
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en              
Fetched 198 kB in 19s (10.3 kB/s)                                             
Reading package lists... Done
pi@raspberrypi:~ $ sudo apt-get install ffmpeg
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libaacplus2 libavcodec56 libavdevice56 libavfilter5 libavformat56
  libavresample2 libavutil54 libfaac0 libfdk-aac1 libmp3lame0
  libopencore-amrnb0 libopencore-amrwb0 libpostproc53 libswresample1
  libswscale3 libutvideo15 libvidstab1.0 libx264-146 libx265-51
The following NEW packages will be installed:
  ffmpeg libaacplus2 libavdevice56 libavfilter5 libfaac0 libfdk-aac1
  libopencore-amrnb0 libopencore-amrwb0 libpostproc53 libswresample1
  libutvideo15 libvidstab1.0 libx264-146 libx265-51
The following packages will be upgraded:
  libavcodec56 libavformat56 libavresample2 libavutil54 libmp3lame0
  libswscale3
6 upgraded, 14 newly installed, 0 to remove and 113 not upgraded.
Need to get 8,280 kB of archives.
After this operation, 2,011 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://www.deb-multimedia.org/ jessie/main libaacplus2 armhf 2.0.2-dmo2 [85.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libopencore-amrnb0 armhf 0.1.3-2.1 [80.4 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libopencore-amrwb0 armhf 0.1.3-2.1 [42.0 kB]
Get:4 http://www.deb-multimedia.org/ jessie/main libavutil54 armhf 10:2.6.9-dmo1 [205 kB]
Get:5 http://www.deb-multimedia.org/ jessie/main libfaac0 armhf 1:1.28-dmo3+deb8u1 [30.2 kB]
Get:6 http://www.deb-multimedia.org/ jessie/main libfdk-aac1 armhf 1:0.1.4-dmo1 [295 kB]
Get:7 http://www.deb-multimedia.org/ jessie/main libmp3lame0 armhf 1:3.99.5-dmo4 [331 kB]
Get:8 http://www.deb-multimedia.org/ jessie/main libswresample1 armhf 10:2.6.9-dmo1 [80.0 kB]
Get:9 http://www.deb-multimedia.org/ jessie/main libutvideo15 armhf 15.1.0-dmo2 [46.1 kB]
Get:10 http://www.deb-multimedia.org/ jessie/main libx264-146 armhf 3:0.146.2538+git121396c-dmo2 [556 kB]
Get:11 http://www.deb-multimedia.org/ jessie/main libx265-51 armhf 1.6-dmo1 [283 kB]
Get:12 http://www.deb-multimedia.org/ jessie/main libavcodec56 armhf 10:2.6.9-dmo1 [3,450 kB]
Get:13 http://www.deb-multimedia.org/ jessie/main libavformat56 armhf 10:2.6.9-dmo1 [717 kB]
Get:14 http://www.deb-multimedia.org/ jessie/main libavresample2 armhf 10:2.6.9-dmo1 [76.1 kB]
Get:15 http://www.deb-multimedia.org/ jessie/main libpostproc53 armhf 10:2.6.9-dmo1 [71.5 kB]
Get:16 http://www.deb-multimedia.org/ jessie/main libswscale3 armhf 10:2.6.9-dmo1 [143 kB]
Get:17 http://www.deb-multimedia.org/ jessie/main libvidstab1.0 armhf 2:0.98b-dmo1+deb8u1 [29.6 kB]
Get:18 http://www.deb-multimedia.org/ jessie/main libavfilter5 armhf 10:2.6.9-dmo1 [414 kB]
Get:19 http://www.deb-multimedia.org/ jessie/main libavdevice56 armhf 10:2.6.9-dmo1 [93.3 kB]
Get:20 http://www.deb-multimedia.org/ jessie/main ffmpeg armhf 10:2.6.9-dmo1 [1,252 kB]
Fetched 8,280 kB in 40s (202 kB/s)                                            
Reading changelogs... Done
Selecting previously unselected package libaacplus2:armhf.
(Reading database ... 113514 files and directories currently installed.)
Preparing to unpack .../libaacplus2_2.0.2-dmo2_armhf.deb ...
Unpacking libaacplus2:armhf (2.0.2-dmo2) ...
Preparing to unpack .../libavutil54_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavutil54:armhf (10:2.6.9-dmo1) over (6:11.8-1~deb8u1+rpi1) ...
Selecting previously unselected package libfaac0:armhf.
Preparing to unpack .../libfaac0_1%3a1.28-dmo3+deb8u1_armhf.deb ...
Unpacking libfaac0:armhf (1:1.28-dmo3+deb8u1) ...
Selecting previously unselected package libfdk-aac1:armhf.
Preparing to unpack .../libfdk-aac1_1%3a0.1.4-dmo1_armhf.deb ...
Unpacking libfdk-aac1:armhf (1:0.1.4-dmo1) ...
Preparing to unpack .../libmp3lame0_1%3a3.99.5-dmo4_armhf.deb ...
Unpacking libmp3lame0:armhf (1:3.99.5-dmo4) over (3.99.5+repack1-7+deb8u1) ...
Selecting previously unselected package libopencore-amrnb0:armhf.
Preparing to unpack .../libopencore-amrnb0_0.1.3-2.1_armhf.deb ...
Unpacking libopencore-amrnb0:armhf (0.1.3-2.1) ...
Selecting previously unselected package libopencore-amrwb0:armhf.
Preparing to unpack .../libopencore-amrwb0_0.1.3-2.1_armhf.deb ...
Unpacking libopencore-amrwb0:armhf (0.1.3-2.1) ...
Selecting previously unselected package libswresample1:armhf.
Preparing to unpack .../libswresample1_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libswresample1:armhf (10:2.6.9-dmo1) ...
Selecting previously unselected package libutvideo15:armhf.
Preparing to unpack .../libutvideo15_15.1.0-dmo2_armhf.deb ...
Unpacking libutvideo15:armhf (15.1.0-dmo2) ...
Selecting previously unselected package libx264-146:armhf.
Preparing to unpack .../libx264-146_3%3a0.146.2538+git121396c-dmo2_armhf.deb ...
Unpacking libx264-146:armhf (3:0.146.2538+git121396c-dmo2) ...
Selecting previously unselected package libx265-51:armhf.
Preparing to unpack .../libx265-51_1.6-dmo1_armhf.deb ...
Unpacking libx265-51:armhf (1.6-dmo1) ...
Preparing to unpack .../libavcodec56_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavcodec56:armhf (10:2.6.9-dmo1) over (6:11.8-1~deb8u1+rpi1) ...
Preparing to unpack .../libavformat56_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavformat56:armhf (10:2.6.9-dmo1) over (6:11.8-1~deb8u1+rpi1) ...
Preparing to unpack .../libavresample2_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavresample2:armhf (10:2.6.9-dmo1) over (6:11.8-1~deb8u1+rpi1) ...
Selecting previously unselected package libpostproc53:armhf.
Preparing to unpack .../libpostproc53_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libpostproc53:armhf (10:2.6.9-dmo1) ...
Preparing to unpack .../libswscale3_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libswscale3:armhf (10:2.6.9-dmo1) over (6:11.8-1~deb8u1+rpi1) ...
Selecting previously unselected package libvidstab1.0.
Preparing to unpack .../libvidstab1.0_2%3a0.98b-dmo1+deb8u1_armhf.deb ...
Unpacking libvidstab1.0 (2:0.98b-dmo1+deb8u1) ...
Selecting previously unselected package libavfilter5:armhf.
Preparing to unpack .../libavfilter5_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavfilter5:armhf (10:2.6.9-dmo1) ...
Selecting previously unselected package libavdevice56:armhf.
Preparing to unpack .../libavdevice56_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking libavdevice56:armhf (10:2.6.9-dmo1) ...
Selecting previously unselected package ffmpeg.
Preparing to unpack .../ffmpeg_10%3a2.6.9-dmo1_armhf.deb ...
Unpacking ffmpeg (10:2.6.9-dmo1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libaacplus2:armhf (2.0.2-dmo2) ...
Setting up libavutil54:armhf (10:2.6.9-dmo1) ...
Setting up libfaac0:armhf (1:1.28-dmo3+deb8u1) ...
Setting up libfdk-aac1:armhf (1:0.1.4-dmo1) ...
Setting up libmp3lame0:armhf (1:3.99.5-dmo4) ...
Setting up libopencore-amrnb0:armhf (0.1.3-2.1) ...
Setting up libopencore-amrwb0:armhf (0.1.3-2.1) ...
Setting up libswresample1:armhf (10:2.6.9-dmo1) ...
Setting up libutvideo15:armhf (15.1.0-dmo2) ...
Setting up libx264-146:armhf (3:0.146.2538+git121396c-dmo2) ...
Setting up libx265-51:armhf (1.6-dmo1) ...
Setting up libavcodec56:armhf (10:2.6.9-dmo1) ...
Setting up libavformat56:armhf (10:2.6.9-dmo1) ...
Setting up libavresample2:armhf (10:2.6.9-dmo1) ...
Setting up libpostproc53:armhf (10:2.6.9-dmo1) ...
Setting up libswscale3:armhf (10:2.6.9-dmo1) ...
Setting up libvidstab1.0 (2:0.98b-dmo1+deb8u1) ...
Setting up libavfilter5:armhf (10:2.6.9-dmo1) ...
Setting up libavdevice56:armhf (10:2.6.9-dmo1) ...
Setting up ffmpeg (10:2.6.9-dmo1) ...
Processing triggers for libc-bin (2.19-18+deb8u7) ...

 

4. 유투브에서 실시간 스트리밍관련 스트림 키 얻기

https://www.youtube.com/dashboard

로 이동한다. (당연히 로그인이 되어있어야한다.)

아래 화면이 나오면 왼쪽에 실시간 스트리밍을 선택한다.

시작하기 를 선택하고

인증코드를 문자 메시지로 전송을 선택하고 자시의 전화번호를 넣는다.(찝찝해)

문자로온 인증코드를 넣는다. (찝찝해*2)

축하한다는데... 계속 을 선택한다.

부담스러운 내 얼굴.. 프로필 사진이 영상에 기본으로 보여진다.

아래로 스크롤 하면 인코딩 설정 부분에 스트림 이름 및 키 라는 부분이 있다

표시 버튼을 클릭하면 키를 확인할수 있다 이를 복사한다.

 

5. 라즈베리 파이에서 스트림 키 적용하기

다시 라즈베리 파이 터미널 창으로 와서 아래 명령을 실행한다. 마지막 부분에 아까 복사한 키를 넣는다. (굵게 표시된 부분)

raspivid -o - -t 0 -vf -hf -fps 10 -b 500000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/2xf2-p3rb-hsep-79b7

그럼 아래 처럼 먼가를 한다...

frame=   13 fps=0.0 q=-1.0 size=  머 이런 식으로 계속 찍히는데 그때 부터 스트리밍이 되기 시작한다.

pi@raspberrypi:~ $ raspivid -o - -t 0 -vf -hf -fps 30 -b 5000000 -w 1280 -h 720 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/2xf2-p3rb-hsep-79b7
ffmpeg version 2.6.9 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/arm-linux-gnueabihf --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/arm-linux-gnueabihf
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, s16le, from '/dev/zero':
  Duration: N/A, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Input #1, h264, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Video: h264 (High), yuv420p, 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/2xf2-p3rb-hsep-79b7':
  Metadata:
    encoder         : Lavf56.25.101
    Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p, 1280x720, q=2-31, 25 fps, 25 tbr, 1k tbn, 1200k tbc
    Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc56.26.100 aac
Stream mapping:
  Stream #1:0 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
[h264 @ 0x11b46f0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
frame=   13 fps=0.0 q=-1.0 size=     150kB time=00:00:00.51 bitrate=2399.6kbits/frame=   26 fps= 26 q=-1.0 size=     391kB time=00:00:01.02 bitrate=3136.2kbits/frame=   39 fps= 26 q=-1.0 size=     648kB time=00:00:01.53 bitrate=3462.4kbits/frame=   51 fps= 25 q=-1.0 size=     885kB time=00:00:02.02 bitrate=3591.0kbits/frame=   64 fps= 25 q=-1.0 size=    1158kB time=00:00:02.53 bitrate=3746.5kbits/frame=   76 fps= 25 q=-1.0 size=    1415kB time=00:00:03.04 bitrate=3810.5kbits/frame=   89 fps= 25 q=-1.0 size=    1654kB time=00:00:03.53 bitrate=3838.3kbits/frame=  102 fps= 25 q=-1.0 size=    1913kB time=00:00:04.04 bitrate=3879.5kbits/frame=  114 fps= 25 q=-1.0 size=    2169kB time=00:00:04.55 bitrate=3904.2kbits/frame=  127 fps= 25 q=-1.0 size=    2425kB time=00:00:05.04 bitrate=3941.3kbits/frame=  140 fps= 25 q=-1.0 size=    2684kB time=00:00:05.56 bitrate=3954.0kbits/frame=  152 fps= 25 q=-1.0 size=    2921kB time=00:00:06.06 bitrate=3948.1kbits/frame=  165 fps= 25 q=-1.0 size=    3178kB time=00:00:06.56 bitrate=3968.8kbits/frame=  177 fps= 25 q=-1.0 size=    3418kB time=00:00:07.05 bitrate=3966.6kbits/frame=  190 fps= 25 q=-1.0 size=    3694kB time=00:00:07.56 bitrate=3998.2kbits/frame=  202 fps= 25 q=-1.0 size=    3953kB time=00:00:08.08 bitrate=4007.7kbits/frame=  215 fps= 25 q=-1.0 size=    4192kB time=00:00:08.56 bitrate=4007.6kbits/frame=  228 fps= 25 q=-1.0 size=    4450kB time=00:00:09.08 bitrate=4015.0kbits/frame=  241 fps= 25 q=-1.0 size=    4712kB time=00:00:09.60 bitrate=4020.7kbits/frame=  253 fps= 25 q=-1.0 size=    4970kB time=00:00:10.10 bitrate=4030.8kbits/frame=  266 fps= 25 q=-1.0 size=    5233kB time=00:00:10.60 bitrate=4044.0kbits/^Aframe=  278 fps= 25 q=-1.0 size=    5471kB time=00:00:11.09 bitrate=4038.2kbitframe=  291 fps= 25 q=-1.0 size=    5732kB time=00:00:11.61 bitrate=4044.4kbits/frame=  303 fps= 25 q=-1.0 size=    6009kB time=00:00:12.12 bitrate=4061.0kbits/frame=  316 fps= 25 q=-1.0 size=    6250kB time=00:00:12.60 bitrate=4060.7kbits/frame=  329 fps= 25 q=-1.0 size=    6512kB time=00:00:13.12 bitrate=4066.0kbits/frame=  342 fps= 25 q=-1.0 size=    6773kB time=00:00:13.64 bitrate=4067.5kbits/frame=  354 fps= 25 q=-1.0 size=    7004kB time=00:00:14.14 bitrate=4057.6kbits/frame=  367 fps= 25 q=-1.0 size=    7279kB time=00:00:14.64 bitrate=4073.0kbits/frame=  379 fps= 25 q=-1.0 size=    7508kB time=00:00:15.14 bitrate=4062.4kbits/frame=  392 fps= 25 q=-1.0 size=    7767kB time=00:00:15.65 bitrate=4065.4kbits/frame=  404 fps= 25 q=-1.0 size=    8025kB time=00:00:16.16 bitrate=4068.0kbits/frame=  417 fps= 25 q=-1.0 size=    8287kB time=00:00:16.67 bitrate=4071.8kbits/frame=  430 fps= 25 q=-1.0 size=    8542kB time=00:00:17.16 bitrate=4077.9kbits/frame=  443 fps= 25 q=-1.0 size=    8802kB time=00:00:17.68 bitrate=4078.2kbits/frame=  455 fps= 25 q=-1.0 size=    9042kB time=00:00:18.18 bitrate=4074.0kbits/frame=  468 fps= 25 q=-1.0 size=    9304kB time=00:00:18.69 bitrate=4077.8kbits/frame=  480 fps= 25 q=-1.0 size=    9566kB time=00:00:19.20 bitrate=4081.0kbits/frame=  493 fps= 25 q=-1.0 size=    9813kB time=00:00:19.69 bitrate=4082.9kbits/frame=  506 fps= 25 q=-1.0 size=   10072kB time=00:00:20.20 bitrate=4084.3kbits/frame=  518 fps= 25 q=-1.0 size=   10331kB time=00:00:20.71 bitrate=4086.3kbits/frame=  531 fps= 25 q=-1.0 size=   10571kB time=00:00:21.20 bitrate=4084.6kbits/frame=  544 fps= 25 q=-1.0 size=   10848kB time=00:00:21.72 bitrate=4091.3kbits/frame=  556 fps= 25 q=-1.0 size=   11089kB time=00:00:22.22 bitrate=4087.8kbits/frame=  569 fps= 25 q=-1.0 size=   11349kB time=00:00:22.72 bitrate=4092.1kbits/frame=  581 fps= 25 q=-1.0 size=   11590kB time=00:00:23.22 bitrate=4088.9kbits/frame=  594 fps= 25 q=-1.0 size=   11854kB time=00:00:23.73 bitrate=4091.9kbits/frame=  607 fps= 25 q=-1.0 size=   12130kB time=00:00:24.24 bitrate=4099.2kbits/frame=  619 fps= 25 q=-1.0 size=   12389kB time=00:00:24.75 bitrate=4100.2kbits/frame=  632 fps= 25 q=-1.0 size=   12628kB time=00:00:25.24 bitrate=4098.6kbits/frame=  645 fps= 25 q=-1.0 size=   12887kB time=00:00:25.76 bitrate=4098.2kbits/frame=  657 fps= 25 q=-1.0 size=   13123kB time=00:00:26.26 bitrate=4093.5kbits/frame=  670 fps= 25 q=-1.0 size=   13400kB time=00:00:26.77 bitrate=4100.4kbits/frame=  682 fps= 25 q=-1.0 size=   13637kB time=00:00:27.26 bitrate=4098.1kbits/frame=  695 fps= 25 q=-1.0 size=   13900kB time=00:00:27.77 bitrate=4100.2kbits/frame=  707 fps= 25 q=-1.0 size=   14162kB time=00:00:28.28 bitrate=4101.9kbits/frame=  720 fps= 25 q=-1.0 size=   14403kB time=00:00:28.76 bitrate=4101.3kbits/frame=  733 fps= 25 q=-1.0 size=   14679kB time=00:00:29.28 bitrate=4106.8kbits/frame=  746 fps= 25 q=-1.0 size=   14940kB time=00:00:29.80 bitrate=4107.0kbits/frame=  758 fps= 25 q=-1.0 size=   15183kB time=00:00:30.30 bitrate=4104.8kbits/frame=  771 fps= 25 q=-1.0 size=   15446kB time=00:00:30.81 bitrate=4106.5kbits/frame=  783 fps= 25 q=-1.0 size=   15699kB time=00:00:31.30 bitrate=4108.6kbits/^Z  
[1]+  Stopped                 raspivid -o - -t 0 -vf -hf -fps 30 -b 5000000 -w 1280 -h 720 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/2xf2-p3rb-hsep-79b7
pi@raspberrypi:~ $

다시 유투브로 가보면 아래처럼 영상이 실시간으로 스트리밍 되고 있다는걸 확인 할수 있다.

(실시간은 아니다.. 딜레이가 심하다;;;)

* 중지(Ctrl+z) 하고 다시 했는데 안된다.;;

* 재부팅하고 하니 된다..;;

 

+ Recent posts

티스토리 툴바