Guest User

Untitled

a guest
Oct 23rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ -e "$1" ] && [ -e "$2" ];
  4. then
  5. if file "$1" | grep -qE 'image|bitmap' && file "$2" | grep -qE 'image|bitmap' ;
  6. then
  7. ffmpeg -loglevel error -i "$1" -i "$2" -lavfi psnr=psnr.log -f null -
  8. cat psnr.log
  9. rm psnr.log
  10. else
  11. echo "The first and/or the second file isn't a valid image file!"
  12. exit 0
  13. fi
  14. else
  15. 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'"
  16. exit 0
  17. fi
Add Comment
Please, Sign In to add comment