LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2005, 01:31 AM   #1
switcher
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
Anyone knows about AAC to MP3 converter


HI I do have a problem with the aac plugin for xmms and is causing me huge pain in the butt when I try to use it with gtkpod.

Everytime I try to play the file the thing will go to sleep as freezing while playing the file you can still hear the music but the player just hangs and I have to force quit sooo I have three questions.

1 Does anyone know how to fix it so I can use as it is?

2 If not is there any way to substitute xmms there for video lan client which is playing everything I throw at it and IMHO is much better player for audio video dvd awesome app btw. I could not find the script syntax for it so it just opens and you have to manually open the file and look though the Ipod directory structure in which the files are scattered so you have no idea wher it is makin the gtkpod useless.

3 I am not picky about the format so if I can solve it by changing my music to MP3 I dont care so I would need advice on a nice aac to mp3 converter for Linux

I would appreciate any help you guys can provide on each one of the questions.
Thanks
 
Old 03-09-2005, 09:30 AM   #2
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
You could use dir2ogg [link here] (if your AAC's are .m4a's from iTunes) to convert them to ogg if you have no luck with your other options.
 
Old 04-12-2005, 02:57 PM   #3
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
m4a2mp3
Code:
#!/bin/sh
#
# m4a to wav to mp3

for i in *.m4a; do
     faad "$i"
     x=`echo "$i"|sed -e 's/.m4a/.wav/'`
     y=`echo "$i"|sed -e 's/.m4a/.mp3/'`
     lame -h -b 192 "$x" "$y"
     # Comment the line below if you want to keep the .wav files
     rm "$x"
done
Obviously, you need faad2 and lame installed.

While I'm at it...

m4a2wav
Code:
#!/bin/sh
#
# m4a to wav

for i in *.m4a; do
     faad "$i"
done
You need faad for that one

mp32wav
Code:
#!/bin/sh
#
# mp3 to wav
#
# This script will encode ALL .mp3's in the working
# directory to .wav format. No need to pass any arguments.
# Especially usefull for preparing a group of files
# to be burned to an audio CD.

for i in *.mp3; do
     echo "$i"
     tgt=$(echo "$i" | sed -e "s/mp3/wav/")
     mpg123 -b 10000 -s -r 44100 "$i" | sox -t raw -r 44100 -s -w -c2 - "$tgt"
done
You need mpg123 and sox for that one

wma2mp3
Code:
#!/bin/bash
#

#############################################################
# Move the conversion process into a function that can
# be called.
# The "&&" makes it so each step must be successful before
# the next step will be done.
#############################################################
function wma2mp3 () {
  if [ ! -f "$1" ]; then
     echo "File $1 not found!"
  else
     mplayer -ao pcm -aofile "${1%%.[Ww][Mm][Aa]}.wav" "$1" &&
     lame -h -b 192 "${1%%.[Ww][Mm][Aa]}.wav" "${1%%.[Ww][Mm][Aa]}.mp3" &&
     rm -f "${1%%.[Ww][Mm][Aa]}.wav" ||
     echo "There was a problem with the conversion process!"
  fi
}

#############################################################
# Not enough information to compute
#############################################################
if [ $# -lt 1 ]; then
   echo
   echo "Usage:  wma2mp3 myfile.wma"
   echo "	wma2mp3 myfile.wma myfile2.wma myfile3.wma"
   echo '	wma2mp3 "my file with spaces in the name.wma"'
   echo '        wma2mp3 "file with spaces 1.wma" "file with spaces 2.wma"'
   echo '	wma2mp3 "*.wma"'
   echo "	wma2mp3 /directory/containing/wma/files"
   echo
   exit
fi

#############################################################
# Directory was passed so convert all wma files in directory
#############################################################
if [ $# -eq 1 -a -d "$1" ]; then
  for file in $1/*.[Ww][Mm][Aa]
  do
    wma2mp3 "$file"
  done
  exit
fi

#############################################################
# One or more wma files were passed, convert them
#############################################################
for file in $*
do
  wma2mp3 "$file"
done

exit
EDIT: That one is all screwed up. I fixed it on the wiki tho...

You need mplayer and lame for that one. Notice above that you HAVE to name that script "wma2mp3"....

That opens up some options using one or more in tandem.... I still need to clean up some of that. I got burned out on this awhile ago. They all work tho. Just the usage needs to be tweaked...

Actually, If I'm not mistaken, faad2 comes with an XMMS plugin that works flawlessly with .m4a's... I think it's faad2... Been awhile...

Last edited by jong357; 05-12-2005 at 06:18 PM.
 
Old 05-02-2005, 02:06 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
jong357:

You should add your scripts to the LQ wiki...
Conversion between audio formats is a common question here.
 
Old 05-05-2005, 03:34 PM   #5
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Done.. Not a bad idea I suppose. I think I got them in the right place..

http://wiki.linuxquestions.org/wiki/...a_applications

I labeled it "Audio Conversion"
 
  


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
MP3 to AAC conversion on Linux (for IPOD)? kmand Linux - Software 5 06-08-2010 03:12 AM
wav 2 mp3 converter vegetassj2 Linux - Software 22 05-16-2006 12:09 PM
MP3-OGG Converter Talyz Linux - Software 7 10-27-2005 01:18 PM
Mp3 to AAC Converter for FC4 anand_kt Linux - Software 1 09-07-2005 08:02 PM
.rm to mp3 converter? chem1 Linux - Software 1 03-21-2004 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:10 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
Open Source Consulting | Domain Registration