Quick and dirty: mplayer config file

I exchanged e-mails a day ago with someone setting up mplayer to run in much the same way as what you see in my screenshots. The config file I use for mplayer was helpful to them, and so I’ll post it here in case it is helpful to someone else.

really-quiet="1"
vo="fbdev"
vf="scale=400:-3"
framedrop="1"

It’s short and not terrifically illuminating, but

  • the really-quiet option trims away any output to the console (with only one or two minor omissions);
  • vo declares the video output mode as the framebuffer device;
  • the vf option scales the output to fit half of my 800×600 screen and whatever ratio is determined by the file;
  • and setting framedrop to 1 sometimes smooths out skipping if the codec is too weighty, or the transfer rates are slow (I usually keep video files on an external drive, and watch them across USB1.1).

mplayer has about a zillion options, but these are useful at around 550Mhz, and will handle most common output formats without overburdening the machine. I regularly used divx with mp3 playback when I encoded some DVDs, and the ogg sets work fine too. I have borrowed some movies from friends that had mkv or m4a (I think it was m4a … ) encoding, and they were sketchy at times. I mention that in case you have a 300Mhz machine somewhere, and you are wondering how much muscle it will take to watch your Spongebob Squarepants collection. … 🙄

4 thoughts on “Quick and dirty: mplayer config file

  1. p0ng

    Hi K.Mandla! I’m impressed with the things you do, using old hardware. What I would like to make is how you use them in everyday life. What is the use of them?

    Cheers 😀

    Reply
  2. mike21091

    Thanks for the config! It was quite useful for my EEE pc when using dvtm (Which I learned about on this blog).

    PS: I’ve been following this blog for about 2 years and learned quite alot.

    Reply
  3. kolby

    Hey, the really-quiet option was a life saver when using screen+mplayer, a line of text would bleed in. It stills shows a blinks ‘_’ through the video though when using screen, do you know of anyway around this?

    Reply
  4. Cheater

    This got me thinking: how about fancy subtitles outside the video frame?

    I had to add ass=1, ass-use-margins=1 and ass-font-scale=1.5 to the config file.

    Getting framebuffer mplayer to do subtitles not overlaid on video while also running fullscreen got quite though, so in the end I had to resort to an script:

    #!/bin/bash

    vidheight=`mplayer -identify “$1” -ao null -vo null -frames 0 2>/dev/null|grep HEIGHT|sed s/ID_VIDEO_HEIGHT=//`
    vidw=`mplayer -identify “$1” -ao null -vo null -frames 0 2>/dev/null|grep WIDTH|sed s/ID_VIDEO_WIDTH=//`

    ratio=`echo “1280/$vidw”|bc -l`

    vidheight=`echo “($vidheight*$ratio)/1″|bc`

    vidnheight=$((800-$vidheight))
    vidnheight=$(($vidnheight/2))

    exec mplayer -ass-bottom-margin $vidnheight -ass-top-margin $vidnheight -fs -vf scale=1280:-3 “$1”

    Reply

Leave a reply to kolby Cancel reply