The best kittens, technology, and video games blog in the world.

Friday, October 25, 2013

Script to check total time of your media files

dia mundial do rock by deadoll from flickr (CC-NC-SA)

I download a huge ton of podcasts, audiobooks, and youtube videos for watching on the train or listening while shopping or exercising (since this time is pretty unproductive otherwise), and one thing that annoyed me was lack of simple tools to check how many hours of content I actually have left.

So here's the most recent addition to my collection of Unix utilities - media_size.

Usage is really simple:

    $ media_size some_directory/ another_directory/

The script uses exiftool utility internally, and between exiftool and some hacks it can deal with most of the media files. There are still ones that it can't do, so pull requests definitely welcome.

No comments: