
# above the min size of concern, and if so, print the resultįind "$1" -type f \( -iname \*.avi -o -iname \*.mkv -o -iname \*.mp4 -o -iname \*.wmv \) -print0 | while read -rd $'\0' file # above the min rate of concern and then if the files size is # then pass each file found to check if the data rate is # the -o means "or", -iname (vs -name) means case independent so # search for files with the extensions enumerated below # multipliers to get to human readable valuesĮcho -e "file path \t rate kbps \t size MB" Printf "\nUsage:\n\n returning files with file size greater than default max of 100 MB \n\n"Įcho -e "\n\n returning files with dara rate greater than " $maxs " MB \n\n" Printf "\nUsage:\n\n returning files with data rate greater than default max of 100 kbps \n\n"Įcho -e "\n\n returning files with dara rate greater than " $maxr " kbps \n\n" Printf "\nUsage:\n\n pass a starting point and min data rate in kbps and min size like /media/gessel/datas/Downloads/ 100 10 \n\n" # check arguments passed and set defaults if needed
#Quod libet control volume hotkey code
The code (also available here): #!/usr/bin/bash Save the file as a name you like (such as find-high-rate-media.sh) and # chmod +x find-high-rate-media.sh and off you go. Piping the output to a file, output.csv, makes it easy to sort and otherwise manipulate in LibreOffice Calc. The script will then report media with a rate higher than minimum and size larger than minimum as a tab delimited list of filenames, calculated rate, and calculated size. find-high-rate-media.sh /search/path/tostart/

Files are found recursively from the starting point (passed as first argument) using find.īasic usage would be. All math is done with bc, which is usually installed. It’s different from file size detection in that it uses mediainfo to determine the media file length and wc -c to get the size, and from that computes the total effective data rate.
#Quod libet control volume hotkey archive
You compressed the file some time ago in an old, inefficient format, or you just need to archive the oversize stuff, this can help you find em. Sometimes you want to know if you have media files that are taking up more than their fair share of space.
