• 83 Posts
  • 4.57K Comments
Joined 2 years ago
cake
Cake day: June 6th, 2023

help-circle








  • Yeah I have a bash script that does similar, using the notification API for interactivity

    FOLD_CAMERA=CameraShots
    TEMP_PID=~/.record_pid
    APP_ID=record
    
    mkdir -p $FOLD_CAMERA
    
    function main {
        termux-notification \
            --id $APP_ID --group RECORD \
    	    --priority max \
    	    --button1 "Front" \
    	    --button1-action "termux-notification-remove $APP_ID;bash $0 record 1" \
    	    --button2 "Back"  \
    	    --button2-action "termux-notification-remove $APP_ID;bash $0 record 0" \
    	    --button3 "Quit" \
    	    --button3-action "termux-notification-remove $APP_ID;exit" \
    	    --title "Record"
    	
    }
    
    function record {
        local cam=${1:-0}
    
        termux-notification \
            --id $APP_ID --group RECORD \
    	    --priority max \
    	    --button1 "Stop" \
    	    --button1-action "termux-notification-remove $APP_ID; bash $0 killproc" \
    	    --title "Rec. $cam"
        
        (while :; do
    	     termux-camera-photo \
    	         -c $cam \
    	         $FOLD_CAMERA/$(date "+%Y%m%d-%H%M_${cam}_record.jpg")
         done) &
    
        local pid=$!
        echo -n $pid > $TEMP_PID
    } 
    
    function killproc {
        local last_pid=$(cat $TEMP_PID)
        if [ "$last_pid" == "" ]; then
    	    termux-toast "Could not kill process. Restart the phone."
        else
    	    kill $last_pid &&
    	        bash $0 main
        fi
    }
    
    
    [ "$*" = "" ] && main || eval "$*"
    

    It just needs ffmpeg tied to the exit function





  • This is something that bothers me a lot with Shounen anime. The evil guys are just goblins or orcs, and the humans see it right, just even, to genocide the everlasting fuck out of these creatures without any remorse.

    Goblin Slayer is surprisingly the least guilty of this, in the sense that it sees its inhuman enemy as a cunning equal… whilst having no qualms massacring scores of them, children and all. Same with Frieren to some degree.

    Shinsekai Yori (From the New World) is the only anime I know that gets this completely right.