Another ugly blaaahg

wmv2avi

I was getting tired of having to go back and forth between tools and properties when wanting to convert Windows Media Videos to a better format. So I wrote a script that took me all day…

Depends: ffmpeg, libimage-exiftool-perl, zenity, awk, grep, idvid (from package tovid) and various codecs.

The point of the script is that it gets the info from the input file, shoots it back at you, and gives you the ability to set some variables for the ffmpeg conversion.
There are a lot of apps that does more or less the same, but they (the ones I’ve looked at), opens the whole video, and uses a lot of resources. I just wanted to twea a few easy steps.

Plans: I’m probably not going to use a lot of time on this, but it would be nice to make a list of all possible ffmpeg options, and letting you set every one of them, based on info from the input file. This, I will probably do, just as a small learning experience for myself.

Installing: Simply download the file for current version
You can save the file anywhere you’d like, but it’s useful to:
sudo ln -s /path/to/wmv2avi /usr/bin/wmv2avi
That way it is collected in your command archive, so you can just run it with wmv2avi
You might have to:
chmod +x wmv2avi
in order to get it to run.

Adding needed dependencies:

  • Add universe and multiverse to you repositories. See help.ubuntu.com for more information on how to do that.
  • Include:
    deb http://medibuntu.sos-sts.com/repo/ feisty free non-free
    to your /etc/apt/sources.list. GPG-keys for that repo, do:
    “wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add – && sudo apt-get update”
    (Without the qoutes) in a terminal. See medibuntu.sos-sts.com/repository.php for more information.
  • Now, make sure you have all packages. Do:
    “sudo apt-get install zenity grep awk libimage-exiftool-perl ffmpeg gstreamer0.10-pitfdll w32codecs gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse lame liblame0 toolame”
    (Again, without the qoutes.) This brings in all needed packages, and then some. You’re bound to have some of these from before. Note: ffmpeg from medibuntu includes mp3 support. You should have that, but it violates patents in some countries.

 

Gotcha: When you run the script, after you pick the file, you get an information dialog that stays up until you close it. The script continues, but the next dialog (video title) is hidden beneath the info dialog. Just move it to the side to focus on the next dialog.

Current version:

v0.1.20070817 (this is a download link)

Note: There is now only one file!

Older versions:

v0.1.20070816:

 

Changelog:

New in v0.1.20070817:

  • We don’t need an idvid_grep-file. We can just create the file from within the script
  • Quotation marks around the variables in the main command is crucial. What if someone puts in a [space]
  • Added back the comment variable, after realising I fucked up #2 and fixed it. (spaces was the key)
  • Added a warning that fps is sometimes read really, really wrong.

 

New in v0.1.20070816:

  • First version made

6 Comments »

  1. thank you for providing this script. really helps.

    Comment by andotyjazz — August 19, 2007 @ 17:22

  2. You’re welcome! Nice to see that my fiddling actually comes in handy for others🙂

    Please leave bug reports or problems on this page, and I’ll try to sort them out.

    I’m planning to see if I can include a list of all ffmpeg options, so that it’s possible to set them all, but it will probably take some weeks to get that going. (My scripting abilities are very limited…)

    – Ketil

    Comment by Ketil — August 19, 2007 @ 19:21

  3. great!

    zenity power…

    Comment by fabioedoardoluigialberto — August 30, 2007 @ 11:04

  4. and how about dependencies in Fedora?

    Comment by fabioedoardoluigialberto — August 30, 2007 @ 11:07

  5. when setting maximum bitrate it sets by default the one read from input file but it converts integer to comma style:

    249652 –> 249,652

    than it brings to error. I removed the comma and everything went ok.

    Comment by fabioedoardoluigialberto — August 30, 2007 @ 11:35

  6. I’ll look at this as soon as I have time🙂 Working on some more options as well. Might take some days/weeks though… This is sort of my left-hand project🙂

    – Ketil

    Comment by Ketil — August 30, 2007 @ 20:24


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: