Fast Ogg Vorbis encoding on slow hardware

General discussions.

Moderator: moderators

Fast Ogg Vorbis encoding on slow hardware

Postby SavageX » Tue May 03, 2011 5:59 pm

Hello all,

Subsonic is wonderful thing, I just discovered it a few days ago and finally found a fitting application for my old and usually useless netbook I bought back when netbooks were hot and crazy (yeah yeah, stupid impulse). The specs of my machine:

1 GHz VIA C7 processor
512 MB RAM
4 GB Flash SSD
http://a110wiki.de/wiki/Main_Page

I bought an external 2.5" USB-powered drive to store the FLAC copies of my personal CD collection and installed Subsonic on an Ubuntu 10.10 system. Life is great.

I very much favor Ogg Vorbis over MP3, so I tried to run the usual libvorbis-based oggenc on this little machine, and speed is not exactly great:

Code: Select all
        File length:  5m 40,0s
        Elapsed time: 2m 10,7s
        Rate:         2,6061
        Average bitrate: 101,1 kb/s


I figure that some unusual CPU spikes may very well impact on streaming smoothness. Also, I obviously want the system to consume as little power as possible (keeping the CPU at low clock speeds), so something making better use of CPU cycles is very much desired.

Thankfully, some years ago there was the Lancer Vorbis acceleration project (http://homepage3.nifty.com/blacksword/), which recoded performance-critical parts of libvorbis in SSE. Sadly, nowadays it's non-trivial to get the sources of this project to compile (outdated autoconf etc.).

I stumbled across http://www.hydrogenaudio.org/forums/lof ... 75935.html where "The_Sven" managed to get things working again. He published a GIT repository

http://repo.or.cz/w/vorbis-lancer-gcc.git/tree

which also contains a 32-bit binary:

http://repo.or.cz/w/vorbis-lancer-gcc.g ... AD:/oggenc


This works flawlessly for me, and performance is indeed much improved:

Code: Select all
        File length:  5m 40.0s
        Elapsed time: 0m 56.611s
        Rate:         6.017172
        Average bitrate: 104.4 kb/s



Now I enjoy smooth streaming and the CPU can even clock down to 400 MHz when streaming, saving power.

I thought I should share this, given that those files are somewhat hard to find.
SavageX
 
Posts: 2
Joined: Tue May 03, 2011 4:51 pm

Return to General

Who is online

Users browsing this forum: No registered users and 6 guests