Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function exit_trap() {
- printf "\n\nkilling ffmpeg now!\n\n"
- kill -INT $FFMPEG_PID
- printf "\n\nINT signal sent to ffmpeg process, it should output 'exiting normally...' anytime soon:\n\n"
- wait $FFMPEG_PID
- printf "\n\n ffmpeg gone, continuing with other stuff now"
- }
- ffmpeg -nostdin -f x11grab -s 500x500 -i :0.0+0,0 ~/video_`date +%s`.webm &
- FFMPEG_PID=$!
- trap exit_trap INT
- wait
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement