add-silence-and-ogg.sh Update

Today I made a small update to my mp3-to-ogg script. Specifically, it now supports file names with spaces, apostrophes, etc. (but not commas for some reason :( ).

I’m also using a function (which I source in ~/.bashrc) to ease exit-code checking in Bash scripts:

The Old Way:

some-command
exit=$?
if [[ $exit != 0 ]]
then
echo “some-command failed with code $exit”
exit 1
fi

The New Way:

some-command
die some-command $?

That’s it! Both scripts are available in the Magic section.

3 Responses to add-silence-and-ogg.sh Update

  1. Vultoor says:

    BTW )
    thx pt Magic Section

  2. frenchninja says:

    Hi! Just wanted to ask a quick question: does your mp3-ogg script keep the ID3 tags after it reencodes?

    I’m trying to write a GUI in Python for mp3 to ogg conversion but the mp3-ogg scripts I’ve found to envoke (and lame) tend to fail in that regard

  3. Constantin says:

    No, my script strips out the tags on purpose. I use it for audio books mainly, and if the files are named carefully they don’t need tags anyway. Of course that doesn’t apply to music.
    mp32ogg is a (Perl) script that keeps the tags. It’s old, but I’ve used it and it worked for me. If you’re on Debian / Ubuntu, it is as easy as sudo aptitude install mp32ogg ;)

%d bloggers like this: