Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Last active January 17, 2019 15:04
Show Gist options
  • Save hoangdh/cbe497d2cf121521ffe366ef18bbd78e to your computer and use it in GitHub Desktop.
Save hoangdh/cbe497d2cf121521ffe366ef18bbd78e to your computer and use it in GitHub Desktop.
FFProbe - Filter video resolution
#!/bin/bash
get_resolution(){
VIDEOS=$(ls *.mp4)
for x in $VIDEOS
do
w=`ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 ${x}`
mkdir -p ${w}
mv ${x} ${w}/
done
}
get_resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment