This repository was archived by the owner on Sep 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
55 lines (47 loc) · 1.5 KB
/
install.sh
File metadata and controls
55 lines (47 loc) · 1.5 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Git + инструменты для сборки
sudo apt-get install -y git pkg-config autoconf automake libtool libx264-dev
# AAC
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --prefix=/usr/local --enable-shared --enable-static
make -j4
sudo make install
sudo ldconfig
cd ..
# FFMPEG
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
./configure --prefix=/usr/local --arch=armel --target-os=linux --enable-omx-rpi --enable-nonfree --enable-gpl --enable-libfdk-aac --enable-mmal --enable-libx264 --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp
make -j4
sudo make install
# Плагин для homebridge
sudo npm i -g homebridge-camera-ffmpeg
# Прибираемся
cd ..
sudo rm -rf ./camera-ffmpeg_setup_script
# Предлагаем прописать уличную Питерскую камеру в конфиг
cat << EOF
Установка окончена!
В качестве пробного варианта можете прописать эту платформу в конфиг:
{
"platform": "Camera-ffmpeg",
"cameras": [
{
"name": "Питер",
"videoConfig": {
"source": "-rtsp_transport tcp -y -i rtsp://www.cactus.tv:1554/cam58",
"maxBitrate": 1600,
"maxStreams": 2,
"maxWidth": 1920,
"maxHeight": 1080,
"vcodec": "h264_omx",
"audio": false
}
}
]
}
После этого не забудьте перезапустить homebridge.
Всего доброго!
EOF