forked from axiom-team/astrXbian
ipns publish timeout problem try lower resolution
This commit is contained in:
parent
48fab00d25
commit
dc0b959c34
|
@ -18,7 +18,8 @@ function startFFmpeg() {
|
|||
echo 1 > /tmp/stream-reset
|
||||
|
||||
# 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
|
||||
# http://4youngpadawans.com/stream-camera-video-and-audio-with-ffmpeg/
|
||||
|
@ -43,6 +44,7 @@ sudo mount -t tmpfs tmpfs "${currentpath}"
|
|||
cd "${currentpath}"
|
||||
|
||||
what="$(date +%Y%m%d%H%M)-LIVE"
|
||||
echo "STARTING $what"
|
||||
|
||||
# Start ffmpeg in background
|
||||
startFFmpeg &
|
||||
|
@ -122,8 +124,9 @@ while true; do
|
|||
ipfs name publish --key='star_1' --timeout=5s "${m3u8hash}" &
|
||||
|
||||
# Copy files to web server
|
||||
cp current.m3u8 /var/www/html/live.m3u8
|
||||
cp /tmp/process-stream.log /var/www/html/live.log
|
||||
cat current.m3u8
|
||||
# cp current.m3u8 /var/www/html/live.m3u8
|
||||
# cp /tmp/process-stream.log /var/www/html/live.log
|
||||
fi
|
||||
else
|
||||
sleep 5
|
||||
|
|
Loading…
Reference in New Issue