LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2010, 01:07 PM   #1
plbowler
Member
 
Registered: Nov 2003
Distribution: Mandrake 10 (KDE)
Posts: 53

Rep: Reputation: 15
slightly odd linux choice question


Hello,
I have a question about the easiest/lightest Linux distro (or a better solution to my need)

Here is the Gist:
I want to set up a linux box on a Celeron 1.8 Ghz with a Gig of Ram
for the sole purpose of transcoding FLAC to MP3 (also I like to Tinker). I will be accessing the linux box via latop so once it's up and runnign i won't need X or anything

Background:
I have a freenas server in my basement hard wired to my network.
I was able to cofigure Transmission to handle DLing my torrents of Grateful Dead shows.

Usage:
I run seperate "media" PC to my stereo in the living room which is connetcted to the network via Wireless G, which is part of the reason I set up freenas to do my DLing.
I have and love to death iTunes and my iPhone. I love the Grateful Dead. these two loves cause me to commit the ultimate crime and convert the lovely FLAC Grateful Dead shoes from etree.org to MP3, I convert at 256k though so I'm not THAT bad.
the "media" pc is a long in the tooth Athlon XP 1800+ with a gig of DDR ram and win XP pro. It can't handle Transcoding FLAC to MP3 at 256 while performing any other duty such as playing music through my nice stereo.

Need:
I am going to setup a seperate PC to handle the encoding duties.
The FLACs are DL'ed to the NAS server, the MP3's will end up living on the Media PC (think iTunes coverflow)
I have several ~2ghz single core processor systems laying around as well as enough winXP licenses to just setup an XP machine to run winamp to convert FLAC to MP3 for me, however I realize this is the worst possible way to accomplish what I want done.

I have been given a great script to accomplish this here

http://www.linuxtutorialblog.com/pos...-drop/flac2mp3

but I don't know anything about scripts or how to install or run them
What would be the best disto for this purpose?
I tried DSL live CD and then an install of harddrave install of DSL but it was very confusing.

I currently have Debian 5 installed but I can't get it to receive a reomte connection.
 
Old 03-21-2010, 01:31 PM   #2
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Easiest doesn’t mean lightest and vice versa. I use as a jukebox an old machine with Slackware 13.0 working in the console mode.

First I installed only packages from A group.

After running the machine I removed these packages from A group:

A
kernel-huge-smp
kernel-modules-smp
cups
kernel-generic
kernel-generic-smp

Then I added some packages from AP, D, L, and N groups (to install them you need first Slackware install CD-ROM only):

AP
alsa-utils
diffutils
seejpeg
flac
mc
mpg321
sudo

D
perl

L
alsa-lib
glibc
libao
libid3tag
libjpeg
libmad
libogg
libpng
libtiff
libvorbis
ncurses
svgalib
zlib
glibc-i18n

N
iptables
network-scripts
cyrus-sasl
net-snmp
portmap
net-tools
nfs-utils
rsync

***

My flac2mp3 script is very simple:

Code:
#!/bin/sh

# converts .flac files to .mp3 files

for file in *.flac
do
flac -d -c "$file" | lame --r3mix - "${file%flac}mp3"
done
Change its mode with the command chmod 755 flac2mp3 and put it in /usr/local/bin/ directory. To use it go to the directory including FLAC files and run the command flac2mp3.

***

To listen to the music in the console mode I installed on that machine moc (Music On Console) taken from SlackBuilds.org and compiled on the other machine. To manage files I use mc (Midnight Commander).

***

If you'd like to learn more about Linux and Slackware have a look at SlackBook (http://www.slackbook.org/).

Last edited by w1k0; 03-21-2010 at 04:26 PM.
 
Old 03-21-2010, 01:50 PM   #3
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Arch, Zenwalk, Cruchbang, Ubuntu Server, Advanced Slackware Install (it's actually easy, pick *box or XFCE)
If getting a Cruchbang or Ubuntu Server, get the restricted extras package.
Zenwalk and Slackware are pretty close to each other. Slackware may be easier to maintain. XFCE may be easier to set-up.
Arch is all-console. Build up what you need from there.
 
Old 03-21-2010, 01:53 PM   #4
plbowler
Member
 
Registered: Nov 2003
Distribution: Mandrake 10 (KDE)
Posts: 53

Original Poster
Rep: Reputation: 15
Wow,
thaks that was fast!!!

someone is actually doing the same thing as me!

I few questions on your script.

how do I set the bitrate with Lame?
can I set it up to grab FLAC files from a network drive automatically?
can I set it up to put the MP3's on a network drive?


you rock!!!

Edit: my only Linux experience is installing distro's and using KDE or Gnome.
I am totally clueless about console stuff etc.
for example I just figured out how to connect to debian via putty on win 7

Last edited by plbowler; 03-21-2010 at 02:16 PM.
 
Old 03-21-2010, 02:19 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by plbowler View Post
I am totally clueless about console stuff etc.
for example I just figured out how to connect to debian via putty on win 7
Read the tutorials in my sig.
 
Old 03-21-2010, 03:00 PM   #6
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by plbowler View Post
Wow,
how do I set the bitrate with Lame?
Standard MP3 encoding with LAME is 128 kb/s. So commands lame track.wav and lame -b 128 track.wav are equivalent. To increase quality you can increase bitrate value from 128 to 160, 192, 224, 256 or 320. When you increase bitrate the resulting file becomes bigger. All of the above are constant bitrates. Alternatives are average bitrates (for example: lame --abr 192 track.wav) and variable bitrates (for example: lame --vbr-new track.wav).

Apart of that there are some presets such as: lame --alt-preset standard track.wav or lame --alt-preset fast standard track.wav or lame --alt-preset extreme track.wav.

Different methods of encoding give files of different sizes and qualities and take less or more time.

In my script I used --r3mix preset (lame --r3mix track.wav). That preset is equivalent to -V3 --vbr-new --lowpass 18 setting.

I tested a lot of methods of producing MP3 files and I stated --r3mix gives the best results. Of course I assumed some premises. If you’ll assume different premises you’ll receive different results performing the same tests.

Quote:
Originally Posted by plbowler View Post
can I set it up to grab FLAC files from a network drive automatically?
Yes, for example using NFS. In my Slackware jukebox I installed some files from N group to perform that task.

Quote:
Originally Posted by plbowler View Post
can I set it up to put the MP3's on a network drive?
Using NFS you can read and write files from and to the remote machine.

Last edited by w1k0; 03-21-2010 at 03:43 PM.
 
Old 03-21-2010, 10:50 PM   #7
plbowler
Member
 
Registered: Nov 2003
Distribution: Mandrake 10 (KDE)
Posts: 53

Original Poster
Rep: Reputation: 15
OK!!!!!!!!!!!!!!!!!!!!
LOTS OF PROGRESS!!!! I'M SUUUPER GEEKED, THANKS EVERYONE.

now back to earth.
i was able to get all the way to running a few flac | lame test commands after mountng both a freenas drive and a windows drive on my debian machine via putty.
HOWEVER:
lame doesn't seem to like live show style naming which makes extensive use of dashes
i.e. gd74-06-18d1t01.flac
at least that is my assumption after reading up on the error I got using W1k0's script "can't init outfile"

SOOO

is there another mp3 encoder that doesn't mind dashes OR can I batch change any files with dashes to remove them?

ALSO

turns out shn files are used interchangably with the flac's by the dead tapers (especially the ones assembling the "projects" i.e. "1974 Project"

any suggestions on how to deal with shn?

thanks a ton you guys, I learned an amazing amount about the REAL Linux today.
 
Old 03-21-2010, 11:02 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,330

Rep: Reputation: 227Reputation: 227Reputation: 227
file=`echo $file | sed 's/-//g'`
flac -d -c "$file" | lame --r3mix - "${file%flac}mp3"
 
Old 03-22-2010, 06:17 AM   #9
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
I just tried to convert gd74-06-18d1t01.flac to gd74-06-18d1t01.mp3 using my flac2mp3 script and it works perfectly without any modifications.
 
Old 03-22-2010, 07:18 AM   #10
plbowler
Member
 
Registered: Nov 2003
Distribution: Mandrake 10 (KDE)
Posts: 53

Original Poster
Rep: Reputation: 15
smeeze- what does that do differently? (sorry, I'm trying to learn as I go rather than cut and Paste too much

w1k0- I thought about tis last night laying in bed, I wonder if the directory that I'm trying to have lame put the files in which I just created needs to have the permissions changed? I just created the directory then mounted a network drive into smb/mnt/net/mp3 where mnt/net/mp3 were just created by me
 
Old 03-22-2010, 08:45 AM   #11
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
To test the permissions put into flac2mp3 script the command:

Code:
touch i_am_here
then run flac2mp3 and finally check if i_am_here file is in the suitable directory.
 
Old 03-22-2010, 10:24 AM   #12
plbowler
Member
 
Registered: Nov 2003
Distribution: Mandrake 10 (KDE)
Posts: 53

Original Poster
Rep: Reputation: 15
To use that touch do I need to be in the directory or specifiy it In the file path?
 
Old 03-22-2010, 10:28 AM   #13
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by plbowler View Post
To use that touch do I need to be in the directory or specifiy it In the file path?
Code:
man touch
LOL.
 
Old 03-22-2010, 10:42 AM   #14
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by plbowler View Post
To use that touch do I need to be in the directory or specifiy it In the file path?
You have to jump to that directory in which you have FLAC files which you'd like to convert to MP3 files using flac2mp3 script.
 
Old 03-22-2010, 10:47 AM   #15
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by leopard View Post
Code:
man touch
LOL.
I'm afraid man everything would be more suitable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please give the right choice about the multi-choice question! keika Programming 1 07-22-2009 05:20 AM
Slightly odd font rendering with Freetype bytecode interpreter Daedra Slackware 1 02-08-2007 08:46 AM
Linux distro choice (Newbee question) paped1 Linux - Distributions 3 01-25-2005 01:59 AM
slightly off topic DNS question benbroad Linux - Networking 8 12-01-2004 10:49 AM
slightly different question (about XSync) jpbarto Programming 0 04-03-2004 12:23 PM


All times are GMT -5. The time now is 05:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration