Created
September 15, 2017 17:22
-
-
Save lg3bass/65f4c863ad8ffe951cadbccaaf7e5ea6 to your computer and use it in GitHub Desktop.
FFMPEG > goodies
This file contains 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
//Use FFprobe to get data. | |
//source (and other things to query.) | |
https://trac.ffmpeg.org/wiki/FFprobeTips | |
//get the bitrate on a list of files. | |
for FILENM in *.flv; do ffprobe -v error -show_entries format=bit_rate -of csv $FILENM; done; | |
//result | |
format,509845 | |
format,519899 | |
format,504639 | |
//get the durations of all the files in a directory. | |
for FILENM in *.flv; do ffprobe -v error -show_entries format=duration -of csv $FILENM; done; | |
//result | |
format,106.710203 | |
format,289.358367 | |
//get the w/h of a video | |
for FILENM in *.flv; do eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width $FILENM); size=${streams_stream_0_width}x${streams_stream_0_height}; echo $size; done; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment