前提・実現したいこと
EPGStationによる録画サーバー構築
発生している問題・エラーメッセージ
$ npm start > EPGStation@1.7.5 start /home/pi/record/EPGStation > node dist/server/index.js [2020-09-23T23:37:58.759] [FATAL] system - config.json parse error
該当のソースコード
json
1//config.json 2{ 3 "readOnlyOnce": false, 4 "serverPort": 8888, 5 "mirakurunPath": "http+unix://%2Fvar%2Frun%2Fmirakurun.sock/", 6 "dbType": "sqlite3", 7 "sqlite3":{ 8 "extensions": ["/home/pi/record/regexp.so"], 9 "regexp": true 10 }, 11 #"ffmpeg": "/usr/local/bin/ffmpeg", 12 "ffmpeg": "/usr/bin/ffmpeg", 13 #"ffprobe": "/usr/local/bin/ffprobe", 14 "ffprobe": "/usr/bin/ffprobe", 15 # 保存先の追加 16 "recorded": "/media/pi/MEMORY/", 17 "recordedTmp":"/media/pi/MEMORY/", 18 "maxEncode": 2, 19 "encode": [ 20 { 21 "name": "H264", 22 "cmd": "%NODE% %ROOT%/config/enc.js", 23 "suffix": ".mp4", 24 "default": true 25 } 26 ], 27 28 "recordedViewer": { 29 "ios": "infuse://x-callback-url/play?url=http://ADDRESS", 30 "android": "intent://ADDRESS#Intent;package=com.mxtech.videoplayer.ad;type=video;scheme=http;end" 31 }, 32 "recordedDownloader": { 33 "ios": "vlc-x-callback://x-callback-url/download?url=http://ADDRESS&filename=FILENAME", 34 "android": "intent://ADDRESS#Intent;package=com.dv.adm;type=video;scheme=http;end" 35 }, 36 37 "maxStreaming": 2, 38 "mpegTsStreaming": [ 39 { 40 "name": "720p", 41 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -y -f mpegts pipe:1" 42 }, 43 { 44 "name": "480p", 45 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -y -f mpegts pipe:1" 46 }, 47 { 48 "name": "無変換" 49 } 50 ], 51 "mpegTsViewer": { 52 "ios": "vlc-x-callback://x-callback-url/stream?url=http://ADDRESS", 53 "android": "intent://ADDRESS#Intent;package=com.mxtech.videoplayer.ad;type=video;scheme=http;end" 54 }, 55 "recordedHLS": [ 56 { 57 "name": "720p", 58 "cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%" 59 }, 60 { 61 "name": "480p", 62 "cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%" 63 }, 64 { 65 "name": "480p(h265)", 66 "cmd": "%FFMPEG% -dual_mono_mode main -i %INPUT% -sn -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 0 -hls_allow_cache 1 -hls_segment_type fmp4 -hls_fmp4_init_filename stream%streamNum%-init.mp4 -hls_segment_filename stream%streamNum%-%09d.m4s -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx265 -vf yadif,scale=-2:480 -b:v 350k -preset veryfast -tag:v hvc1 %OUTPUT%" 67 } 68 ], 69 "liveHLS": [ 70 { 71 "name": "720p", 72 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -preset veryfast -flags +loop-global_header %OUTPUT%" 73 }, 74 { 75 "name": "480p", 76 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -preset veryfast -flags +loop-global_header %OUTPUT%" 77 }, 78 { 79 "name": "180p", 80 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -map 0 -ignore_unknown -max_muxing_queue_size 1024 -f hls -hls_time 3 -hls_list_size 17 -hls_allow_cache 1 -hls_segment_filename %streamFileDir%/stream%streamNum%-%09d.ts -c:a aac -ar 48000 -b:a 48k -ac 2 -c:v libx264 -vf yadif,scale=-2:180 -b:v 100k -preset veryfast -maxrate 110k -bufsize 1000k -flags +loop-global_header %OUTPUT%" 81 } 82 ], 83 "liveWebM": [ 84 { 85 "name": "720p", 86 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -b:a 192k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 -b:v 3000k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1" 87 }, 88 { 89 "name": "480p", 90 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 2 -c:a libvorbis -ar 48000 -b:a 128k -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:480 -b:v 1500k -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1" 91 } 92 ], 93 "liveMP4": [ 94 { 95 "name": "h264_omx", 96 "cmd": "%FFMPEG% -dual_mono_mode main -re -i pipe:0 -sn -codec:a aac -ar 48000 -ac 2 -b:a 192k -codec:v h264_omx -b:v 3000k -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1" 97 }, 98 { 99 "name": "720p", 100 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 192k -ac 2 -c:v libx264 -vf yadif,scale=-2:720 -b:v 3000k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1" 101 }, 102 { 103 "name": "480p", 104 "cmd": "%FFMPEG% -re -dual_mono_mode main -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -b:a 128k -ac 2 -c:v libx264 -vf yadif,scale=-2:480 -b:v 1500k -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1" 105 } 106 ], 107 108 "recordedStreaming": { 109 "webm": [ 110 { 111 "name": "720p", 112 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 3 -c:a libvorbis -ar 48000 -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1", 113 "vb": "3000k", 114 "ab": "192k" 115 }, 116 { 117 "name": "360p", 118 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 2 -c:a libvorbis -ar 48000 -ac 2 -c:v libvpx-vp9 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -deadline realtime -speed 4 -cpu-used -8 -y -f webm pipe:1", 119 "vb": "1500k", 120 "ab": "128k" 121 } 122 ], 123 "mp4": [ 124 { 125 "name": "720p", 126 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1", 127 "vb": "3000k", 128 "ab": "192k" 129 }, 130 { 131 "name": "360p", 132 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -movflags frag_keyframe+empty_moov+faststart+default_base_moof -y -f mp4 pipe:1", 133 "vb": "1500k", 134 "ab": "128k" 135 } 136 ], 137 "mpegTs": [ 138 { 139 "name": "720p (H.264)", 140 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:720 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -y -f mpegts pipe:1", 141 "vb": "3000k", 142 "ab": "192k" 143 }, 144 { 145 "name": "360p (H.264)", 146 "cmd": "%FFMPEG% -dual_mono_mode main %RE% -i pipe:0 -sn -threads 0 -c:a aac -ar 48000 -ac 2 -c:v libx264 -vf yadif,scale=-2:360 %VB% %VBUFFER% %AB% %ABUFFER% -profile:v baseline -preset veryfast -tune fastdecode,zerolatency -y -f mpegts pipe:1", 147 "vb": "1500k", 148 "ab": "128k" 149 } 150 ] 151 } 152}
試したこと
config.jsonを弄っては
$npm run build
$npm start
の繰り返し
補足情報(FW/ツールのバージョンなど)
参考サイト
下記サイトを参考に大元のファイルを変更
https://medium.com/chinachu/c98v-raspberry-pi-4-49c9692f5c09
####使用機種
RaspberryPi 3
OS Raspbian GNU/Linux 10
debian version 10.4
####バージョン
$node --version
v14.12.0
$ ffmpeg -version
ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg developers
$ python --version
Python 3.7.3
$ gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
$ sqlite3 --version
3.27.2 2019-02-25 16:06:06 bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1
sqlite3のextensions,ffmpeg,ffprobe,recordedTmp,recordedの場所は確認済みです
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/09/24 01:55