58 lines
1.3 KiB
Bash
Executable File
58 lines
1.3 KiB
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 &
|
|
|
|
media-ctl \
|
|
--set-v4l2 \
|
|
'"ov5640 1-003c":0[fmt:UYVY8_2X8/640x480@1/15]'
|
|
|
|
|
|
gst-launch-1.0 \
|
|
v4l2src ! \
|
|
video/x-raw,width=640,height=480,format=UYVY,framerate=15/1 ! \
|
|
decodebin ! \
|
|
videoconvert ! \
|
|
video/x-raw,format=I420 ! \
|
|
cedar_h264enc ! \
|
|
h264parse ! \
|
|
tune=zerolatency ! \
|
|
matroskamux ! \
|
|
hlssink \
|
|
target-duration=1 \
|
|
playlist-length=2 \
|
|
max-files=3
|
|
|
|
exit
|
|
gst-launch -ve videotestsrc ! cedar_h264enc ! h264parse ! matroskamux ! filesink location="cedar.mkv"
|
|
|
|
gst-launch -ve videotestsrc ! cedar_h264enc ! ffmux_mp4 ! filesink location="cedar.mp4"
|
|
|
|
|
|
# clockoverlay ! \
|
|
# timeoverlay valignment=bottom ! \
|
|
####################################
|
|
# OK
|
|
gst-launch-1.0 \
|
|
v4l2src ! \
|
|
video/x-raw,width=640,height=480,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
|
|
####################################
|