Last active
January 17, 2019 15:04
-
-
Save hoangdh/cbe497d2cf121521ffe366ef18bbd78e to your computer and use it in GitHub Desktop.
FFProbe - Filter video resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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