diff --git a/config/jebbacam.conf b/config/jebbacam.conf new file mode 100644 index 0000000..642c108 --- /dev/null +++ b/config/jebbacam.conf @@ -0,0 +1,9 @@ +# Put in ~/.config/jebbacam.conf + +CAM_GIT_ROOT=~/pinecam-cruft +CAM_HOSTNAME=pinecube1 +CAM_ETH_IP=10.1.1.101 +CAM_WIFI_IP=192.168.1.101 +CAM_PORT=8000 +CAM_RTSPPORT=8554 + diff --git a/scripts/jebbatime-battery b/scripts/jebbatime-battery new file mode 100755 index 0000000..908f6ba --- /dev/null +++ b/scripts/jebbatime-battery @@ -0,0 +1,11 @@ +#!/bin/bash + +# Get config +. ~/.config/jebbatime.conf + +cd $JEBBATIMEGITROOT + +./tools/wasptool \ + --battery \ + --device $JEBBATIMEMAC + diff --git a/scripts/redstone-cam-pinecube1 b/scripts/redstone-cam-pinecube1 new file mode 100755 index 0000000..e621ffc --- /dev/null +++ b/scripts/redstone-cam-pinecube1 @@ -0,0 +1,9 @@ +#!/bin/bash + +set -x + +# Get config +. ~/.config/jebbacam.conf + +mplayer rtsp://$CAM_ETH_IP:$CAM_RTSPPORT/video + diff --git a/scripts/redstone-cam-pinecube1-playlist b/scripts/redstone-cam-pinecube1-playlist new file mode 100755 index 0000000..c2c504d --- /dev/null +++ b/scripts/redstone-cam-pinecube1-playlist @@ -0,0 +1,9 @@ +#!/bin/bash + +set -x + +#mplayer rtsp://192.168.110.249:8554/video + +#vlc rtsp://192.168.110.249:8554/video + +mplayer http://192.168.1.117:8000/playlist.m3u8 diff --git a/scripts/redstone-cam-pinecube1-wifi b/scripts/redstone-cam-pinecube1-wifi new file mode 100755 index 0000000..037fa51 --- /dev/null +++ b/scripts/redstone-cam-pinecube1-wifi @@ -0,0 +1,14 @@ +#!/bin/bash + +set -x + +# Get config +. ~/.config/jebbacam.conf + +mplayer \ + -fs \ + http://$CAM_WIFI_IP:$CAM_PORT/playlist.m3u8 + +exit + -vf rotate=1 + diff --git a/scripts/redstone-pinecube1-stream-cedarh264-hires b/scripts/redstone-pinecube1-stream-cedarh264-hires new file mode 100755 index 0000000..4e95091 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-cedarh264-hires @@ -0,0 +1,45 @@ +#!/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/1920x1080@1/30]' + +gst-launch-1.0 \ + v4l2src ! \ + decodebin ! \ + videoconvert ! \ + cedar_h264enc ! \ + h264parse ! \ + hlssink \ + target-duration=1 \ + playlist-length=2 \ + max-files=3 + +exit + matroskamux ! \ + video/x-raw,width=1920,height=1080,format=UYVY,framerate=30/1 ! \ + decodebin ! \ + videoconvert ! \ + video/x-raw,format=I420 ! \ + +gst-launch-1.0 -ve videotestsrc ! cedar_h264enc ! h264parse ! matroskamux ! filesink location="cedar.mkv" + +gst-launch-1.0 -ve videotestsrc ! cedar_h264enc ! ffmux_mp4 ! filesink location="cedar.mp4" + + + +# clockoverlay ! \ +# timeoverlay valignment=bottom ! \ + + speed-preset=ultrafast \ + tune=zerolatency ! \ diff --git a/scripts/redstone-pinecube1-stream-cedarh264-mid-hardenc b/scripts/redstone-pinecube1-stream-cedarh264-mid-hardenc new file mode 100755 index 0000000..71ce9bf --- /dev/null +++ b/scripts/redstone-pinecube1-stream-cedarh264-mid-hardenc @@ -0,0 +1,57 @@ +#!/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 +#################################### diff --git a/scripts/redstone-pinecube1-stream-mjpeg b/scripts/redstone-pinecube1-stream-mjpeg new file mode 100755 index 0000000..0435770 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-mjpeg @@ -0,0 +1,15 @@ +#!/bin/bash + +set -x + +H="720"; +W="1280"; +F="JPEG_1X8"; + +media-ctl \ + --set-v4l2 \ + "'ov5640 1-003c':0[fmt:${F}/${W}x${H}]" + +gst-rtsp-launch \ + "v4l2src ! image/jpeg,width=${W},height=${H} ! rtpjpegpay name=pay0" + diff --git a/scripts/redstone-pinecube1-stream-webserver b/scripts/redstone-pinecube1-stream-webserver new file mode 100755 index 0000000..e72809a --- /dev/null +++ b/scripts/redstone-pinecube1-stream-webserver @@ -0,0 +1,12 @@ +#!/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 + diff --git a/scripts/redstone-pinecube1-stream-x264 b/scripts/redstone-pinecube1-stream-x264 new file mode 100755 index 0000000..7b117e0 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264 @@ -0,0 +1,33 @@ +#!/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/240x320@1/15]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=320,height=240,format=UYVY,framerate=15/1 ! \ + decodebin ! \ + videoconvert ! \ + video/x-raw,format=I420 ! \ + clockoverlay ! \ + timeoverlay valignment=bottom ! \ + x264enc \ + speed-preset=ultrafast \ + tune=zerolatency ! \ + mpegtsmux ! \ + hlssink \ + target-duration=1 \ + playlist-length=2 \ + max-files=3 + diff --git a/scripts/redstone-pinecube1-stream-x264-1080p b/scripts/redstone-pinecube1-stream-x264-1080p new file mode 100755 index 0000000..bdf35ba --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-1080p @@ -0,0 +1,29 @@ +#!/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 & + +# 30 max FPS +media-ctl \ + --set-v4l2 \ + '"ov5640 1-003c":0[fmt:UYVY8_2X8/1920x1080@1/15]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=1920,height=1080,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 + diff --git a/scripts/redstone-pinecube1-stream-x264-1280x960 b/scripts/redstone-pinecube1-stream-x264-1280x960 new file mode 100755 index 0000000..26b3243 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-1280x960 @@ -0,0 +1,29 @@ +#!/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 & + +# 45 max FPS +media-ctl \ + --set-v4l2 \ + '"ov5640 1-003c":0[fmt:UYVY8_2X8/1280x960@1/15]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=1280,height=960,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 + diff --git a/scripts/redstone-pinecube1-stream-x264-5mpix b/scripts/redstone-pinecube1-stream-x264-5mpix new file mode 100755 index 0000000..9e03509 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-5mpix @@ -0,0 +1,29 @@ +#!/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 + diff --git a/scripts/redstone-pinecube1-stream-x264-720p b/scripts/redstone-pinecube1-stream-x264-720p new file mode 100755 index 0000000..0596469 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-720p @@ -0,0 +1,29 @@ +#!/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 & + +# 60 max FPS +media-ctl \ + --set-v4l2 \ + '"ov5640 1-003c":0[fmt:UYVY8_2X8/1280x720@1/15]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=1280,height=720,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 + diff --git a/scripts/redstone-pinecube1-stream-x264-hires b/scripts/redstone-pinecube1-stream-x264-hires new file mode 100755 index 0000000..e77e1d2 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-hires @@ -0,0 +1,33 @@ +#!/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/1920x1080@1/5]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=1920,height=1080,format=UYVY,framerate=5/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 + +# clockoverlay ! \ +# timeoverlay valignment=bottom ! \ diff --git a/scripts/redstone-pinecube1-stream-x264-qvga b/scripts/redstone-pinecube1-stream-x264-qvga new file mode 100755 index 0000000..81592b0 --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-qvga @@ -0,0 +1,29 @@ +#!/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 & + +# 120 max FPS +media-ctl \ + --set-v4l2 \ + '"ov5640 1-003c":0[fmt:UYVY8_2X8/320x240@1/15]' + +gst-launch-1.0 \ + v4l2src ! \ + video/x-raw,width=320,height=240,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 + diff --git a/scripts/redstone-pinecube1-stream-x264-vga b/scripts/redstone-pinecube1-stream-x264-vga new file mode 100755 index 0000000..220636d --- /dev/null +++ b/scripts/redstone-pinecube1-stream-x264-vga @@ -0,0 +1,28 @@ +#!/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 ! \ + x264enc \ + speed-preset=ultrafast \ + tune=zerolatency ! \ + mpegtsmux ! \ + hlssink \ + target-duration=1 \ + playlist-length=2 \ + max-files=3 +