Sign In

    Enjoy FOSSwire's content? Have it delivered! Subscribe

    ffmpegmenu - transcode videos from your file manager

    KDE users, here's a neat application that creates a 'service' in your file manager that allows you to easily convert videos to other formats using ffmpeg.

    ffmpegmenu is what you need. After copying the simple script into the right directory, an action will appear in the sidebar of either Konqueror or Dolphin (your choice), which easily allows you to convert selected video to DVD, MPEG or into iPod format with a couple of clicks.

    The script itself is very simple, such that it's definitely possible to edit it to customise the commands it runs to make your own ffmpeg conversion options. It does require you have ffmpeg and the necessary codecs to convert to DVD, MPEG and iPod already installed, as it is just a loader which calls ffmpeg. But enough of that, how do you actually install the script?

    Well, first of all, download it from KDE-Apps, direct download link here.

    When that file opens, save it as ffmpegmenu.desktop and put it on your desktop. All we now need to do is to copy the file into place.

    You'll probably need to be root to do this, so run su - first (or Ubuntu users, prefix the cp command below with sudo).

    # cd /home/yourusername/Desktop
    # cp ffmpegmenu.desktop /usr/share/apps/konqueror/servicemenus
    # cp ffmpegmenu.desktop /usr/share/apps/d3lphin/servicemenus

    Feel free to omit either the Konqueror or Dolphin command depending on whether you want this installed in one, the other, or both. Once installed, highlighting a .avi file should show the following in the sidebar (this screenshot from Dolphin):

    ffmpegmenu in action

    And it's done!

    If you want to uninstall, simply remove the ffmpegmenu.desktop files as root, like so:

    # rm /usr/share/apps/konqueror/servicemenus
    # rm /usr/share/apps/d3lphin/servicemenus


    Using ffmpeg to convert to MP3

    Now we all know we should be using free and open formats like Vorbis for our audio, right? Yeah. Unfortunately, sometimes we are restricted by what some devices will support.

    If you've got some tracks in Vorbis, WAV or another format and you want to convert it to MP3 format. Now you can use the open source MP3 library LAME, but it doesn't support quite as many input formats as ffmpeg does.

    ffmpeg, for the uninitiated, is a piece of software (and software library) designed for converting all sorts of audio and video from one format to another. Most distributions don't ship it manually and many don't support it, so you may need to enable extra software repositories before installing the ffmpeg package.

    Once you've got that, converting an audio file should be pretty easy and works as follows. Remember ffmpeg does take quite a lot as input files, and will detect the input format automatically. In a similar vain, the output format will be automatically determined by the file extension you give, so it makes light work of conversion and avoids lots of confusing command line switches.

    A simple audio convert might be:

    $ ffmpeg -i file file.mp3

    Substitute in your filename, make sure the .mp3 extension is intact in the output filename and a convert should happen. Obviously, doing like this does have the disadvantage of using default settings.

    The simplest of these settings to alter would be the bitrate, which determines the output quality. For MP3, a really quick guide would be that 128 kbps is fair quality, 160 kbps is good quality and 192 or above is very good quality.

    Setting the bitrate of the output file is also simple, so let's add it to the command:

    $ ffmpeg -b 192k -i file file.mp3

    Here I set for 192 kbps quality.

    This is only a very basic quick starter, but it does show you how easy it is to start converting audio with ffmpeg. If you need more flexibility in your conversion, you may want to switch to a solution like LAME, but for the ease of use and wealth of input formats a well-configured ffmpeg installation can give you, it's well worth a try for your converting needs too.