Skip to main content

meta

all

find -maxdepth 2 -name "*.*" -exec ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 -i {} \; -exec ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal -i {} \; -exec ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate -i {} \; -exec du -sh {} \; -exec echo \; > list_separated.txt

find -maxdepth 2 -name "*.*" 
-exec ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 -i {} \; 
-exec ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal -i {} \; 
-exec ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate -i {} \; 
-exec du -sh {} \; -exec echo \; 
> list_separated.txt
  1. run script
  2. copy list into sheets (vertical)
  3. re-copy transposed (horizontal)
  4. re-paste into txt & replace \t\t with \n
  5. paste into a clean sheet

size

grep file dimensions

for nxn in * ; do identify $nxn | grep -oE '([0-9]*)x([0-9]*)[[:space:]]' >> list-sizes.txt; done

grep file dimensions and names

for nxn in * ; do identify $nxn | echo $nxn `grep -oE '([0-9]*)x([0-9]*)[[:space:]]'` >> list-sizes-names.txt ;done

show all file resolutions in a directory

for i in *.*; do ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 $i; done #list_sizes


weight

find file weight

find * -maxdepth 2 -type f -exec du -sh {} \;  > list-weight.txt

find directory weight

find * -maxdepth 2 -type d -exec du -sh {} \; > list-weight-dir.txt

alternate find directory weight (not sorted)

du -h -d 1 . > dir-weight.txt


FPS

find fps

ffprobe -v 0 -of csv=p=0 -select_streams v:0 -show_entries stream=r_frame_rate *.*

or

ffmpeg -i * 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p"

for i in *.*; do ffmpeg -i * 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p"; done > list-fps.txt


reference:

https://stackoverflow.com/questions/8015888/linux-script-to-find-all-video-file-extensions-and-file-sizes

https://linuxize.com/post/how-get-size-of-file-directory-linux/