ipns publish timeout problem try lower resolution

This commit is contained in:
fred 2021-08-12 12:29:39 +02:00
parent 48fab00d25
commit dc0b959c34
1 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,8 @@ function startFFmpeg() {
echo 1 > /tmp/stream-reset echo 1 > /tmp/stream-reset
# Stream WebCamera # Stream WebCamera
ffmpeg -f pulse -i 1 -f video4linux2 -video_size 1280x720 -framerate 25 -i /dev/video0 -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg.log 2>&1 #ffmpeg -f pulse -i 1 -f video4linux2 -video_size 1280x720 -framerate 25 -i /dev/video0 -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg.log 2>&1
ffmpeg -f pulse -i 1 -f video4linux2 -video_size 720x480 -framerate 25 -i /dev/video0 -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg.log 2>&1
## MORE SOURCES ## MORE SOURCES
# http://4youngpadawans.com/stream-camera-video-and-audio-with-ffmpeg/ # http://4youngpadawans.com/stream-camera-video-and-audio-with-ffmpeg/
@ -43,6 +44,7 @@ sudo mount -t tmpfs tmpfs "${currentpath}"
cd "${currentpath}" cd "${currentpath}"
what="$(date +%Y%m%d%H%M)-LIVE" what="$(date +%Y%m%d%H%M)-LIVE"
echo "STARTING $what"
# Start ffmpeg in background # Start ffmpeg in background
startFFmpeg & startFFmpeg &
@ -122,8 +124,9 @@ while true; do
ipfs name publish --key='star_1' --timeout=5s "${m3u8hash}" & ipfs name publish --key='star_1' --timeout=5s "${m3u8hash}" &
# Copy files to web server # Copy files to web server
cp current.m3u8 /var/www/html/live.m3u8 cat current.m3u8
cp /tmp/process-stream.log /var/www/html/live.log # cp current.m3u8 /var/www/html/live.m3u8
# cp /tmp/process-stream.log /var/www/html/live.log
fi fi
else else
sleep 5 sleep 5