Search Results

Search found 3 results on 1 pages for 'mirai'.

Page 1/1 | 1 

  • ffmpeg screen capture

    - by Mirai
    I wrote this script for some basic screen capture; it gets the window dimensions then uses the ffmpeg binary to record. I suspect there is a better way (maybe with the ffmpeg library), but scripting is what I know and ffmpeg generally works. Any software (other than recordmydesktop), or improvements to the script are welcome. info=`xwininfo -frame` H=`echo "$info" | grep Height | sed -E "s/^.*: ([[:digit:]]+)$/\1/"` W=`echo "$info" | grep Width | sed -E "s/^.*: ([[:digit:]]+)$/\1/"` offset=:0.0+`echo "$info" | grep Corners | sed -E "s/^.*:[[:space:]]+\+([[:digit:]]+\+[[:digit:]]+)[[:space:]]+.+/\1/" | tr + ,` /usr/local/bin/ffmpeg -f x11grab -s ${W}x${H} -r 45 -i $offset -sameq -f avi ~/videos/`date +%Y-%m-%d-%H%M%s`_vid & echo $! > /tmp/$(basename $0)-$USER

    Read the article

  • side effect of zsh echo?

    - by Mirai
    For some reason this script will work with all of the 'echo's at the end, but without them $wall is an empty string. This seems like really odd behaviour. #!/bin/zsh if [ ! -n "$1" ] ; then files=(~/pictures/backgrounds/*jpg) else while [ $1 ] ; do files+=(`echo $1/*jpg`) shift done fi echo $files N=${#files} echo $N ((N=RANDOM%N)) echo $N wall=${files[$N]} echo $wall cp $wall ~/wall.jpg

    Read the article

  • Find a regular expression that matches a string?

    - by Mirai
    I need a model for finding all of the regular expressions that would match a particular string. Basically, I need an algorithm for doing what I do to generate a regex search string from some pattern. My purpose for this to create a list of potential regular expressions from a selection of text and order that list from least specific (i.e. string of characters with abitrary length) to most specific (i.e. the string itself) to be used in text editor.

    Read the article

1