Skip to content

Commit

Permalink
Fix transpose options for rM2
Browse files Browse the repository at this point in the history
  • Loading branch information
rien committed Dec 31, 2020
1 parent 33f82ba commit cf6b105
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions reStream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ output_path=- # display output through ffplay
format=- # automatic output format
webcam=false # not to a webcam
measure_throughput=false # measure how fast data is being transferred
video_filters="" # list of ffmpeg filters to apply

# loop through arguments and process them
while [ $# -gt 0 ]; do
Expand Down Expand Up @@ -87,13 +88,12 @@ case "$rm_version" in
width=1408
height=1872
pixel_format="rgb565le"
transpose=0
;;
"reMarkable 2.0")
pixel_format="gray8"
width=1872
height=1404
transpose=1
video_filters="$video_filters,transpose=2"
;;
*)
echo "Unsupported reMarkable version: $rm_version."
Expand Down Expand Up @@ -135,15 +135,12 @@ else
host_passthrough="cat"
fi

# list of ffmpeg filters to apply
video_filters=""

# store extra ffmpeg arguments in $@
set --

# rotate 90 degrees if landscape=true
$landscape && transpose="$((transpose + 1))"
[ $transpose != 0 ] && video_filters="$video_filters,transpose=$transpose"
$landscape && video_filters="$video_filters,transpose=1"

# Scale and add padding if we are targeting a webcam because a lot of services
# expect a size of exactly 1280x720 (tested in Firefox, MS Teams, and Skype for
Expand Down

0 comments on commit cf6b105

Please sign in to comment.