probe 453 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. usage () {
  3. cat <<EOF>&2
  4. Usage: ${0##*/} FILE
  5. ${0##*/} ENTRIES FILE
  6. Run ffprobe on FILE using shell print format. If no entry is specified, print
  7. format and streams.
  8. EOF
  9. }
  10. [ $# -eq 0 ] && usage && exit 1
  11. [ "$1" = "-h" ] && usage && exit
  12. [ "$1" = "--" ] && shift
  13. if [ $# -gt 1 ]; then
  14. ffprobe -v quiet -print_format flat=s=_ -show_entries -- "$@"
  15. else
  16. ffprobe -v quiet -print_format flat=s=_ -show_format -show_streams -- "$1"
  17. fi