Tag Archives: movie

mediainfo: There is none higher

I know of no alternatives to mediainfo, and honestly even if I did, I would probably still use it.


And that’s the short version of what it can tell you. I don’t have space on my 1600×1200 screen to show you all of what it knows. And it’s not just ripped videos either: mediainfo knows a heckuva lot about audio files too.

And if you’re some kind of glutton for punishment, check out the number of flags and options available to you with mediainfo. Just mediainfo --Info-Parameters was too much for the scrollback buffer on my terminal emulator. It may be a contender for the Most Extensive List of Options award — which is probably currently held by mplayer.

So … what good is it? Well, for OCPDers like me, who need their home movies organized by date, time, screen dimensions and title, it’s a critical tool.

With little more than mediainfo, grep and cut, I can reshuffle an entire folder full of videos in a way that satisfies that little voice in my brain that says, “This is messy.”

Don’t believe it? It’s true. With just …

for i in *.mp4 ; do DATETIME=$(mediainfo "${i}" | grep -m1 Encoded\ date | cut -c48-) ; WIDTH=$(mediainfo "${i}" | grep Width | cut -c44-46 ) ; HEIGHT=$(mediainfo "${i}" | grep Height | cut -c44-46) ; mv "${i}" "${DATETIME} ${WIDTH}x${HEIGHT} ${i}" ; done

I can go from this …

kmandla@6m47421: ~/temp$ ls
Grub-to-login in 20-plus seconds with Arch Linux-_UOiG7sWWB8.mp4
Grub-to-X in 9 seconds with Crux Linux-aQigpYak2gw.mp4
Photo frame on Pentium running Debian-cbrSlgkmkYA.mp4

to this …

kmandla@6m47421: ~/temp$ ls
2011-03-19 10:42:13 480x360 Grub-to-login in 20-plus seconds with Arch Linux-_UOiG7sWWB8.mp4
2011-03-19 10:50:28 480x360 Grub-to-X in 9 seconds with Crux Linux-aQigpYak2gw.mp4
2014-02-11 13:43:47 480x360 Photo frame on Pentium running Debian-cbrSlgkmkYA.mp4

And life is good again. All hail mediainfo! There is none higher! 😀

P.S.: There’s a GUI too, for those times when you are feeling visually inclined. 😉

mpgtx: Slicing and dicing, mpegs of all varieties

Having already cruised past such heavyweights as mplayer, mencoder, handbrake, avidemux, inkscape and imagemagick makes me a little more comfortable approaching mpgtx.


A tool specifically for carving away at mpeg files of all varieties is not intimidating in itself.

Knowing full well that it’s a console-only tool, with nothing graphical aside from specific control characters … that might be daunting to some.

mpgtx wisely subordinates some obvious functions to quick mnemonics, taking its biggest functions and relegating them to ancillary “programs.” So mpgtx -s is the same is mpgsplit, and so forth.

I mention that only because I enjoy little conveniences like those.

Once you get used to how mpgtx represents ranges and times, it becomes a piece of cake to get it to split or join as you like.

Knowing some of the mechanics of a video file are important too though. I had a lot of false starts with split video files until I used the -P flag, to preserve the metadata between the original and the chunk output.

Of course, it’s not quite correct, but it helps get playback started.

mpgtx claims it can handle mp3 files too, and tagmp3 — supposedly the same as mpgtx -T — has a lot of the same functions as in mp3rename and similar tools.

So what you get with mpgtx is a wide variety of tools that approach a wide variety of media files. Not a bad tool to have around. 😐

One final note: I feel somehow obligated to mention that the last posted update to mpgtx was in 2005.

Ordinarily I don’t mind if a program is out of date, even if it stretches back to the late 1980s.

Part of me wonders how well this is keeping up with newer file types and media standards, and if that would be an issue with more recently encoded files.

Take care and keep backups, would be my advice. Not to be a scaremonger, just that prudence is the better part of valor.

mplayer: At the framebuffer, or without

I’m jumping out of order slightly, but only for a day. mplayer is next, and I promised it to you a few weeks ago, when I mentioned mencoder.

I’ll keep this short. I’d hate to lump mplayer in with every other text application, because it’s an apples-and-oranges comparison.

Yes, technically it will run without X, and it sends a good deal of its status information to plain text. It will throw a movie up against the framebuffer, and it’s a clever trick.

It will also pipe images through the aa and caca video output, meaning you can actually watch a movie in textmode, albeit with a little loss of detail.

I’d hoped to show that here but fbgrab can’t really keep up, and the results are scrambled — very scrambled.

So you’ll have to take my word for it. Of course, it’s probably something you’ve seen done before. If you haven’t done it yourself.

I think that’s all I should say about mplayer right now. Configuring it and using it are two twin arts in their own right, for as complex and powerful a program as it is.

My advice is to seek out a mid-range laptop with some graphical oomph, and see if you can send a low-res, easily encoded file through to the framebuffer. If it works, great. If not … well, maybe next time.

It’s definitely worth trying though. 😉

imdbmoviefetcher: I’ll give you three guesses

I love it when a program’s name tells you exactly what it does. That’s just good marketing.

There are a few command-line interfaces to imdb.com out there; this one is doing a pretty good job but might need a little nudging.


imdbmoviefetcher, as you can see, seems to be including some information that isn’t quite … correct. I don’t remember Tina Turner in The Matrix.

No matter, what’s obviously needed here is just a little code update to get the correct information cropped away from the extraneous.

Ah, but the home page for imdbmoviefetcher is not responding. This is bad sign. … 😦

Well, given that in most cases, what I’m after is a URL or a release date, imdbmoviefetcher does a good job avoiding all the clutter that I would download if I used the site straightaway.

And color! Did I mention color? I do enjoy seeing text-based programs in color. 🙄