pinecam-cruft/scripts/redstone-pinecube1-stream-x...

30 lines
604 B
Bash
Executable File

#!/bin/bash
set -x
#sudo mkdir -p /dev/shm/hls/
#sudo chown jebba /dev/shm/hls/
cd /dev/shm/hls/
#sudo python3 -m http.server &
# 15 max FPS
media-ctl \
--set-v4l2 \
'"ov5640 1-003c":0[fmt:UYVY8_2X8/2592x1944@1/15]'
gst-launch-1.0 \
v4l2src ! \
video/x-raw,width=2592,height=1944,format=UYVY,framerate=15/1 ! \
decodebin ! \
videoconvert ! \
video/x-raw,format=I420 ! \
x264enc \
speed-preset=ultrafast \
tune=zerolatency ! \
mpegtsmux ! \
hlssink \
target-duration=1 \
playlist-length=2 \
max-files=3