25 frames / second
This commit is contained in:
parent
799763eb86
commit
48fab00d25
|
@ -4,6 +4,8 @@ HLS_TIME=40
|
|||
M3U8_SIZE=3
|
||||
IPFS_GATEWAY="http://127.0.0.1:8181"
|
||||
|
||||
echo "Astroport stream is playing on star_1 : https://tube.copylaradio.com/ipns/$(ipfs key list -l | grep star_1 | cut -d ' ' -f 1)"
|
||||
|
||||
# Load settings
|
||||
|
||||
# Prepare Pi Camera
|
||||
|
@ -14,18 +16,18 @@ function startFFmpeg() {
|
|||
while true; do
|
||||
mv /tmp/ffmpeg.log /tmp/ffmpeg.1
|
||||
echo 1 > /tmp/stream-reset
|
||||
|
||||
# Stream WebCamera
|
||||
ffmpeg -f pulse -i 1 -f video4linux2 -video_size 1280x720 -framerate 30 -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/
|
||||
## STILL BAD :: ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:0 -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f mpegts -flush_packets 0 -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg.log 2>&1
|
||||
################ GOOD ?
|
||||
# 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
|
||||
|
||||
## MORE SOURCES
|
||||
# http://4youngpadawans.com/stream-camera-video-and-audio-with-ffmpeg/
|
||||
## STILL BAD :: ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:0 -profile:v high -pix_fmt yuvj420p -level:v 4.1 -preset ultrafast -tune zerolatency -vcodec libx264 -r 10 -b:v 512k -s 640x360 -acodec aac -strict -2 -ac 2 -ab 32k -ar 44100 -f mpegts -flush_packets 0 -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg.log 2>&1
|
||||
################ GOOD ?
|
||||
# Stream FM Station from a SDR module (see contrib/pi-stream to install drivers)
|
||||
# Frequency ends in M IE 99.9M
|
||||
# rtl_fm -f 99.9M -M fm -s 170k -A std -l0 -E deemp -r 44.1k | ffmpeg -r 15 -loop 1 -i ../audio.jpg -f s16le -ac 1 -i pipe:0 -c:v libx264 -tune stillimage -preset ultrafast -hls_time "${HLS_TIME}" "${what}.m3u8" > /tmp/ffmpeg 2>&1
|
||||
|
||||
|
||||
sleep 0.5
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue