라즈베리파이 > Raspberry Pi Stream Live Ham Radio/Police Scanner Audio

인기검색어 > 아두이노 센서 ATMEGA128

최신글 질문게시판 동영상강좌 가입하기

▼ BASIC4MCU 후원업체 신제품 정보 ▼

▲ BASIC4MCU 후원업체 신제품 정보 ▲

BASIC4MCU > 라즈베리파이

라즈베리파이 | Raspberry Pi Stream Live Ham Radio/Police Scanner Audio

페이지 정보

작성자 키트 작성일17-09-13 16:13 조회1,874회 댓글0건

본문

 

Raspberry Pi Stream Live Ham Radio/Police Scanner Audio


The Experiment: In this experiment were going to use nginx/rtmp, avconv open source free-ware to explore the possibility of streaming  live Ham Radio, Police Scanner, Microphone Audio from a Raspberry Pi Streaming Audio Server.  To listen to the Audio stream requires a RTMP compatible player.

Table of Contents

1. Required Software
2. Raspberry Pi Software Install
• Raspbian Debian Wheezy
• NGinx / RTMP
• Avconv
• FFmpeg
2. Hardware
3. Prototype
4. Notes
5. Conclusion

Software:

Raspberry Pi
1. Raspbian Debian Wheezy
2. NGinx / RTMP
3. Avconv

Windows PC
1. Putty
2. Adobe Flash-8

^Top



Raspberry Pi Software Install

Raspbian Debian Wheezy .img on SD

1. Download the Raspbian Debian Wheezy here
2. Installing Operating System Images here Linux Mac OS Windows
^Top



Install NGinx / RTMP

1. sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
2. sudo mkdir /nginx
3. sudo wget http://nginx.org/download/nginx-1.7.7.tar.gz
4. sudo wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
5. sudo tar -zxvf nginx-1.7.7.tar.gz
6. sudo unzip master.zip
7. cd nginx-1.7.7
8.sudo ./configure –with-http_ssl_module –add-module=../nginx-rtmp-module-master
9. sudo make
10. sudo make install

Start nginx server
1. sudo /usr/local/nginx/sbin/nginx

Verify that NGINX server is running
1. Launch browser with nginx server IP Address

Update RTMP in nginx.conf
1. sudo nano /usr/local/nginx/conf/nginx.conf
2. Copy/Past Text below at end of the nginx.conf file

#RTMP server#rtmp {        server {                listen 1935;                chunk_size 4096;                application live {                        live on;                        record off;                }        }}

3. Ctrl+x-y-<enter>

Stop NGINX server
1. sudo /usr/local/nginx/sbin/nginx -s stop

Start the NGINX server
1. sudo /usr/local/nginx/sbin/nginx

Set Default Audio Card
1. sudo nano /etc/modprobe.d/alsa-base.conf
Under:
#Keep snd-usb-audio from beeing loaded as first soundcard
Find the line below and place a # sign in front of it
options snd-usb-audio index=-2
#options snd-usb-audio index=-2
Under that past:
options snd-usb-audio index=0
options snd_bcm2835 index=1
2. Ctrl+x-y<enter>

Update rc.local
1. sudo nano /etc/rc.local
2. Copy/Past text in italic below after

# By default this script does nothing.# Start NGINX /RTMP serversudo /usr/local/nginx/sbin/nginx# Start avconv audio stream

(See Notes: 1-2 & 3 comments)

3. Ctrl+x-y-<enter>

Create a Flash crossdomain.xml
1. sudo nano /usr/local/nginx/html/crossdomain.xml
2. Copy/Past text below

<?xml version="1.0"?><cross-domain-policy><allow-access-from domain="*.host.com" /><allow-access-from domain="*" /></cross-domain-policy>

3. Ctrl+x-y<enter>
^Top



Install Avconv
1. sudo apt-get install libav-tools

Verify that avconv is installed
1. sudo avconv -h

Reboot Raspberry Pi
1. sudo shutdown -r now

Uninstall Avconv
1. sudo apt-get purge libav-tools
2. sudo apt-get –purge autoremove


Install FFmpeg
1. sudo apt-get update
2. sudo apt-get install ffmpeg

Uninstall FFmpeg
1. sudo apt-get remove ffmpeg
2. sudo apt-get –purge autoremove

^Top


Hardware:

1. Audio Interface here
2. USB Sound Card
^Top


Prototype:

Custom Flash Player
ham-radio-audio-interface-raspberry-pi-nginx-rtmp-server-streaming-live-audio-flash8-player
^Top


Notes:

1. Avconv/FFmpeg stops streaming after 31/2 – 4 hours.
2. No longer starting avconv in rc.local, now using a cron scheduled task liveStream.
3. The liveStream script runs every (Second) to keep avconv alive when it stops.

Create liveStream script
1. sudo nano /home/pi/liveStream
2. Copy/Past script below

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

댓글 : 0

조회수 : 1,874

등록된 댓글이 없습니다.

게시물 검색

라즈베리파이 목록

게시물 검색


Privacy Policy
MCU BASIC ⓒ 2017
PC버전