Transcoding on low-spec server

Tutorials, tips and tricks.

Moderator: moderators

Transcoding on low-spec server

Postby stim » Thu Feb 20, 2014 8:58 am


I'm running a remote subsonic installation on an Atom-based Kimisufi server (Ubuntu 12.10). It workls perfectly in all aspects, except real-time transcoding, where the CPU just can't cut it.
So I must pre-convert my audio from flac to mp3 to keep performance optimal. Since everything was already on my server, I needed to do this via command line. For reference, I've put the process here:

Convert flac to 320kbp mp3...

Code: Select all
sudo apt-get install lame
sudo apt-get install flac

...then issue from the folder with the flac files...
Code: Select all
for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done

I then like to run my files through mp3gain to level out the volumes (a non-destructive and reversible process - and it works)

Code: Select all
sudo apt-get install mp3gain

$find . -type f -iname '*.mp3' -print0 | xargs -0 mp3gain -r -k

Converting video to flv is also required and can be achieved thus:

Code: Select all
sudo apt-get install ffmpeg mencoder lame

Convert AVI to FLV:
ffmpeg -i video.avi video.flv

MP4 to FLV:
ffmpeg -i video.mp4 -ar 22050 -acodec libmp3lame -ab 32K -r 25 -s 320x240 -vcodec flv video.flv

To find out which codecs are supported by your version, type:

Code: Select all
ffmpeg -formats

mencoder -ovc help
Posts: 8
Joined: Mon Oct 14, 2013 1:03 pm

Re: Transcoding on low-spec server

Postby alphawave7 » Thu Feb 20, 2014 4:04 pm

Thanks for this! :)

Sent from my Nexus 5 using Tapatalk
Posts: 1035
Joined: Thu Feb 11, 2010 9:54 am

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests