Merge remote-tracking branch 'abmantis/pen_marker'
This commit is contained in:
12
reStream.sh
12
reStream.sh
@ -12,6 +12,7 @@ rm2_old_firmware_version="3.7.0.1930"
|
||||
# default values for arguments
|
||||
remarkable="${REMARKABLE_IP:-10.11.99.1}" # remarkable IP address
|
||||
landscape=true # rotate 90 degrees to the right
|
||||
cursor=false # show a cursor where the pen is hovering
|
||||
output_path=- # display output through ffplay
|
||||
format=- # automatic output format
|
||||
webcam=false # not to a webcam
|
||||
@ -32,6 +33,10 @@ while [ $# -gt 0 ]; do
|
||||
landscape=false
|
||||
shift
|
||||
;;
|
||||
-c | --cursor)
|
||||
cursor=true
|
||||
shift
|
||||
;;
|
||||
-s | --source)
|
||||
remarkable="$2"
|
||||
shift
|
||||
@ -87,10 +92,11 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
-h | --help | *)
|
||||
echo "Usage: $0 [-p] [-u] [-s <source>] [-o <output>] [-f <format>] [-t <title>] [-m] [-w] [--hflip]"
|
||||
echo "Usage: $0 [-p] [-c] [-u] [-s <source>] [-o <output>] [-f <format>] [-t <title>] [-m] [-w] [--hflip]"
|
||||
echo "Examples:"
|
||||
echo " $0 # live view in landscape"
|
||||
echo " $0 -p # live view in portrait"
|
||||
echo " $0 -c # show a cursor where the pen is hovering (rM2 only)"
|
||||
echo " $0 -s 192.168.0.10 # connect to different IP"
|
||||
echo " $0 -o remarkable.mp4 # record to a file"
|
||||
echo " $0 -o udp://dest:1234 -f mpegts # record to a stream"
|
||||
@ -255,6 +261,10 @@ set -e # stop if an error occurs
|
||||
|
||||
restream_options="-h $height -w $width -b $bytes_per_pixel -f $fb_file"
|
||||
|
||||
if "$cursor"; then
|
||||
restream_options="$restream_options -c"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2089
|
||||
restream_rs="PATH=\"\$PATH:/opt/bin/:.\" restream $restream_options"
|
||||
if $unsecure_connection; then
|
||||
|
Reference in New Issue
Block a user