screencast icon indicating copy to clipboard operation
screencast copied to clipboard

Shell error on check_dimensions

Open one000mph opened this issue 5 years ago • 2 comments

I am trying to use this for screen recording within ubuntu:20.10 but when setting the screen size I get an error

[ screencast ] initializing
/usr/local/bin/screencast: 3215: arithmetic expression: expecting primary: ""1280" % 8"

This is the command I'm using screencast -n -s 1280x720 -d :44.0 -r 30 -i pulse -1 $RECORDING_NAME

It appears that this is a shell issue running this part of screen.sh

check_dimension() {
    # the dimension will be a multiple of 8 if the remainder is 0
    [ "$(("$1" % 8))" = '0' ]
}

I think what's needed here is to remove the quotes around $1 since the script is complaining that's not a number?? I was able to hack the installed script and get it working that way. Thanks for making a cool tool!

one000mph avatar Oct 28 '20 21:10 one000mph

What shell are you using to execute screencast?

Thank you for appreciating this software :)

dbermond avatar Oct 29 '20 16:10 dbermond

Im getting the error using zsh as my shell. @one000mph solution worked like a charm!

elgplayer avatar Mar 29 '21 08:03 elgplayer