Winamp2-js – implementation of Winamp 2.9 in HTML5 and JavaScript

Atwood’s Law states that any application that can be written in JavaScript, will eventually be written in JavaScript.  Winamp2-js is yet another example supporting this law.  It is a re-implementation of Winamp 2.9, a classic Windows MP3 player from decades ago, done in HTML5 and JavaScript.

The source code is on GitHub and a live demo is available here.

flac2mp3

I was going through Fedora Planet stream when I noticed this blog post about converting Flac files to mp3 on Linux.   That reminded me of a couple of folders with files that I can’t listen to in my car.  So I thought I’d convert them now, especially that I have the guide handy it only consists of a couple of steps.  I tried and it worked, except that default options used resulted in the mp3 file of 128 kbps, which is a rather low quality.  So I played a bit with it and ended up with the following shell flac2mp3.sh script:

#!/bin/bash

# Convert flac file to mp3 with best quality VBR

for file in *.flac
do
    base=`basename "$file" .flac`
    # Convert flat to wav
    flac -d "$file"
    # Convert wav to mp3 with variable bit rate, best quality
    lame -V 0 "$base".wav "$base".mp3
done

As mentioned in the comments, it creates variable bit rate (VBR) mp3 files with maximum quality.

Update: The moment I finished this blog post I felt weird. It was almost like I did it before. And indeed. I should have searched my own blog before posting. Here is the post I did five years ago which has pretty much the same script in it.