sebbu

compare-video

Jun 5th, 2020
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/bin/env bash
  2. if [ "$#" -ne 2 ]
  3. then
  4.     echo -e "Usage : $0 <file1> <file2>"
  5. else
  6.     ffmpeg -i "$1" -f framecrc out1.crc
  7.     ffmpeg -i "$2" -f framecrc out2.crc
  8.     cat out1.crc | tr -s ' ' | cut -d' ' -f 5 | sort | uniq > 1.txt
  9.     cat out2.crc | tr -s ' ' | cut -d' ' -f 5 | sort | uniq > 2.txt
  10.     diff -sq 1.txt 2.txt
  11. fi
Add Comment
Please, Sign In to add comment