Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -e "$1" ] && [ -e "$2" ];
- then
- if file "$1" | grep -qE 'image|bitmap' && file "$2" | grep -qE 'image|bitmap' ;
- then
- ffmpeg -loglevel error -i "$1" -i "$2" -lavfi psnr=psnr.log -f null -
- cat psnr.log
- rm psnr.log
- else
- echo "The first and/or the second file isn't a valid image file!"
- exit 0
- fi
- else
- echo "The first and/or the second file doesn't exist! Please make sure to run the command: './psnr_check.sh path/to/reference/file path/to/processed/file'"
- exit 0
- fi
Add Comment
Please, Sign In to add comment