| View previous topic :: View next topic |
| Author |
Message |
mwiertz Tux's lil' helper

Joined: 07 Jul 2003 Posts: 88 Location: Selfkant, Germany
|
Posted: Wed May 18, 2005 12:21 pm Post subject: converting m4a files under linux (gentoo) |
|
|
Hi,
I was wondering if there's any kind of tool available that can convert the m4a files from sharpmusique (itunes) into mp3-files, so I can use the music I buyed on my mp3-player?
thnx
Max |
|
| Back to top |
|
 |
NorthWoodsman Tux's lil' helper

Joined: 25 Apr 2003 Posts: 134
|
Posted: Wed May 18, 2005 2:59 pm Post subject: |
|
|
| Look up Mplayer |
|
| Back to top |
|
 |
snuut n00b

Joined: 22 Jun 2003 Posts: 19
|
Posted: Wed May 18, 2005 3:29 pm Post subject: |
|
|
m4a -> wav
| Code: | | for i in *.m4a; do mplayer -ao pcm "$i" -aofile "$i.wav"; done |
wav -> mp3
| Code: | | for i in *.wav; do lame -h -b 192 "$i" "$i.mp3"; done |
strip down file extensions
| Code: | | for i in *.mp3; do x=`echo "$i"|sed -e 's/m4a.wav.mp3/mp3/'`; mv "$i" "$x"; done |
copied it somewhere, it worked for me.
regards |
|
| Back to top |
|
 |
mwiertz Tux's lil' helper

Joined: 07 Jul 2003 Posts: 88 Location: Selfkant, Germany
|
Posted: Thu May 19, 2005 2:33 pm Post subject: |
|
|
Hi,
thanks for your reply...
I used it to build this script called m4a2mp3:
| Code: | #!/bin/bash
#
# Convert m4a to mp3
for i in $1/*.m4a
do
mplayer -ao pcm "$i" -aofile "$i.wav"
dest=`echo "$i.wav"|sed -e 's/m4a.wav$/mp3/'`
lame -h -b 192 "$i.wav" "$dest"
rm $i $i.wav
done |
I put this one /usr/local/bin and now I'm able to convert all m4a-files in the directory that I pass in the first parameter; so m4a2mp3 . for example will convert all the *.m4a files in the current working dir to mp3 and will clean up the source and temporary files. It will use as less diskspace as possible.
kind regards... |
|
| Back to top |
|
 |
rjs Tux's lil' helper

Joined: 30 Jul 2004 Posts: 146 Location: Oriel College, Oxford
|
Posted: Wed Jun 01, 2005 9:47 am Post subject: |
|
|
| mwiertz wrote: | Hi,
thanks for your reply...
I used it to build this script called m4a2mp3:
| Code: | #!/bin/bash
#
# Convert m4a to mp3
for i in $1/*.m4a
do
mplayer -ao pcm "$i" -aofile "$i.wav"
dest=`echo "$i.wav"|sed -e 's/m4a.wav$/mp3/'`
lame -h -b 192 "$i.wav" "$dest"
rm $i $i.wav
done |
I put this one /usr/local/bin and now I'm able to convert all m4a-files in the directory that I pass in the first parameter; so m4a2mp3 . for example will convert all the *.m4a files in the current working dir to mp3 and will clean up the source and temporary files. It will use as less diskspace as possible.
kind regards... |
Thanks, that works perfectly for me  |
|
| Back to top |
|
 |
curious_bob l33t


Joined: 05 Dec 2003 Posts: 634 Location: Ellensburg, WA
|
Posted: Thu Jul 21, 2005 8:03 pm Post subject: |
|
|
using mplayer did not work for me. i had to use faad instead. _________________ Play me online, well ya know that I'll beat you. If I ever meet you, I'll CRTL-ALT-DEL you!!!
The Black Vault The Largest Online Military and Government Research Center |
|
| Back to top |
|
 |
madman2003 Apprentice

Joined: 20 Feb 2005 Posts: 178
|
Posted: Fri Jul 22, 2005 5:03 am Post subject: |
|
|
| Why are you converting lossy --> lossy, why did you buy those files in the first place without a player for them? |
|
| Back to top |
|
 |
curious_bob l33t


Joined: 05 Dec 2003 Posts: 634 Location: Ellensburg, WA
|
Posted: Sat Jul 23, 2005 12:22 am Post subject: |
|
|
| madman2003 wrote: | | Why are you converting lossy --> lossy, why did you buy those files in the first place without a player for them? |
I didn't buy them. _________________ Play me online, well ya know that I'll beat you. If I ever meet you, I'll CRTL-ALT-DEL you!!!
The Black Vault The Largest Online Military and Government Research Center |
|
| Back to top |
|
 |
outspoken Guru


Joined: 14 Feb 2004 Posts: 454 Location: orlando, fl
|
Posted: Sun Sep 18, 2005 1:51 pm Post subject: |
|
|
for those who find this thread useful in the future -aofile is depreciated in mplayer. now it is -ao pcm:file="filename"
so:
| Code: |
#!/bin/bash
#
# Convert m4a to mp3
for i in $1/*.m4a
do
mplayer -ao pcm "$i" -ao pcm:file="$i.wav"
dest=`echo "$i.wav"|sed -e 's/m4a.wav$/mp3/'`
lame -h -b 192 "$i.wav" "$dest"
rm $i $i.wav
done
|
or
| Code: |
for i in *.m4a; do mplayer -ao pcm "$i" -ao pcm:file="$i.wav"; done
|
|
|
| Back to top |
|
 |
nautiazn85 n00b

Joined: 05 Aug 2005 Posts: 37
|
Posted: Fri Jan 06, 2006 11:18 pm Post subject: |
|
|
| Is there a noticeable loss of audio quality when converting lossy -> lossy? |
|
| Back to top |
|
 |
bk0 Apprentice

Joined: 04 Jan 2004 Posts: 266
|
Posted: Fri Jan 06, 2006 11:55 pm Post subject: |
|
|
Yes. iTunes uses pitiful bitrates, even the original file doesn't sound all that great.
I'd suggest buying real CDs (which cost about the same as 10-12 iTunes tracks) and then ripping them into the format of your choice. Vastly better sound quality, no DRM and a physical lossless backup copy. |
|
| Back to top |
|
 |
nautiazn85 n00b

Joined: 05 Aug 2005 Posts: 37
|
Posted: Sat Jan 07, 2006 2:49 am Post subject: |
|
|
Yah I've already done that. The only problem is when I was still using Windows a few months ago, I used iTunes to rip a bunch of my cds. Now I want to play them in LINUX but amarok (taglib) doesn't have support for m4a yet.
I was going to convert the files... but I don't want them to be any worse than they are now. |
|
| Back to top |
|
 |
bk0 Apprentice

Joined: 04 Jan 2004 Posts: 266
|
Posted: Sat Jan 07, 2006 9:32 pm Post subject: |
|
|
| nautiazn85 wrote: | | Yah I've already done that. The only problem is when I was still using Windows a few months ago, I used iTunes to rip a bunch of my cds. |
It will probably take just as much time to transcode the AAC tracks as would to re-rip the CDs. I really like Grip (http://nostatic.org/grip/) for CD ripping. |
|
| Back to top |
|
 |
lecleremi n00b

Joined: 08 Dec 2005 Posts: 10 Location: Montréal
|
Posted: Fri May 19, 2006 2:26 pm Post subject: |
|
|
Hi there
I got the same problem with mplayer so I replaced it by faad and fix a problem with filenames ("$i" instead of $i and so on)
| Code: | #!/bin/bash
#
# Convert m4a to mp3
for i in $1/*.m4a
do
faad -o "$i.wav" "$i"
dest=`echo "$i.wav"|sed -e 's/m4a.wav$/mp3/'`
lame -h -b 192 "$i.wav" "$dest"
rm "$i" "$i.wav"
done |
Probably you can reduce used disk space by deleting $i before using lame and then deleting $i.wav _________________ R. Leclercq
interests: none. |
|
| Back to top |
|
 |
TerranAce007 Apprentice


Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Sat May 27, 2006 11:04 am Post subject: |
|
|
Is there any way to transfer the audio tags by script as well? When I tried the script, the files I tested successfully transcode, but the tag info is not transfered (artist, title, track, albun, etc...) I am not veyr familiar with id3tag or other programs like that, but I am wondering if there is a better way than entering the data for my several thousand songs by hand... _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
| Back to top |
|
 |
Hydraulix Guru


Joined: 11 Dec 2003 Posts: 447 Location: Baltimore, Maryland
|
Posted: Mon May 29, 2006 9:42 pm Post subject: |
|
|
Is there a way to convert mp3 to m4a on Linux? _________________ It is the fate of operating systems to become free.
- Neal Stephenson
If only You and Dead people can read hex, how many people can read hex? |
|
| Back to top |
|
 |
ziegs Tux's lil' helper

Joined: 29 Apr 2004 Posts: 119
|
Posted: Tue May 30, 2006 8:03 pm Post subject: |
|
|
here ya go
| Code: | #!/bin/bash
#
# Convert mp3 to m4a
for i in $1/*.mp3
do
mplayer -ao pcm "$i" -ao pcm:file="$i.wav"
dest=`echo "$i.wav"|sed -e 's/mp3.wav$/m4a/'`
faac -b 192 -o "$dest" "$i.wav"
rm "$i" "$i.wav"
done
|
i tested, didn't really play around with the faac encoder settings because i didn't have time to look them up...i don't know why you'd want it in m4a...
enjoy
Last edited by ziegs on Tue May 30, 2006 8:15 pm; edited 1 time in total |
|
| Back to top |
|
 |
Hydraulix Guru


Joined: 11 Dec 2003 Posts: 447 Location: Baltimore, Maryland
|
Posted: Tue May 30, 2006 8:13 pm Post subject: |
|
|
| ziegs wrote: | here ya go
| Code: | #!/bin/bash
#
# Convert mp3 to m4a
for i in $1/*.mp3
do
mplayer -ao pcm "$i" -ao pcm:file="$i.wav"
dest=`echo "$i.wav"|sed -e 's/mp3.wav$/m4a/'`
faac -b 192 -o "$dest" "$i.wav"
rm "$i" "$i.wav"
done
|
i tested, didn't really play around with the faac encoder settings because i didn't have time to look them up...i don't know why you'd want it in m4a...
enjoy[/code] |
Thanks I'll give that a shot. The only reason I want m4a is it takes up less space. I might just convert over to mp3 but I'm looking for a codec that has great quality and take up less space. _________________ It is the fate of operating systems to become free.
- Neal Stephenson
If only You and Dead people can read hex, how many people can read hex? |
|
| Back to top |
|
 |
ziegs Tux's lil' helper

Joined: 29 Apr 2004 Posts: 119
|
Posted: Tue May 30, 2006 8:17 pm Post subject: |
|
|
i'd give ogg a shot then. unless you need it on your ipod, then m4a and mp3 are your only options for now.
i find m4a support to be too shoddy. faad/faac didn't work properly on amd64 till recently, and muine, the audio player i use, doesn't import m4a despite its backend handling them, so i'm stuck with ogg and mp3 and flac for now. |
|
| Back to top |
|
 |
Hydraulix Guru


Joined: 11 Dec 2003 Posts: 447 Location: Baltimore, Maryland
|
Posted: Tue May 30, 2006 8:20 pm Post subject: |
|
|
| ziegs wrote: | i'd give ogg a shot then. unless you need it on your ipod, then m4a and mp3 are your only options for now.
i find m4a support to be too shoddy. faad/faac didn't work properly on amd64 till recently, and muine, the audio player i use, doesn't import m4a despite its backend handling them, so i'm stuck with ogg and mp3 and flac for now. |
Yeah sadly I have an iPod. Looks like I have to stick with mp*. _________________ It is the fate of operating systems to become free.
- Neal Stephenson
If only You and Dead people can read hex, how many people can read hex? |
|
| Back to top |
|
 |
bk0 Apprentice

Joined: 04 Jan 2004 Posts: 266
|
Posted: Sat Jun 03, 2006 1:17 pm Post subject: |
|
|
| Hydraulix wrote: |
Yeah sadly I have an iPod. Looks like I have to stick with mp*. |
Not if you install Rockbox. |
|
| Back to top |
|
 |
Hydraulix Guru


Joined: 11 Dec 2003 Posts: 447 Location: Baltimore, Maryland
|
Posted: Sat Jun 03, 2006 11:05 pm Post subject: |
|
|
| bk0 wrote: | | Hydraulix wrote: |
Yeah sadly I have an iPod. Looks like I have to stick with mp*. |
Not if you install Rockbox. |
I installed it before but didn't like it. I just like how the original firmware is laid out. _________________ It is the fate of operating systems to become free.
- Neal Stephenson
If only You and Dead people can read hex, how many people can read hex? |
|
| Back to top |
|
 |
CptnObvious999 Apprentice

Joined: 19 Dec 2004 Posts: 292
|
Posted: Sat Jun 03, 2006 11:22 pm Post subject: |
|
|
| Hydraulix wrote: | | bk0 wrote: | | Hydraulix wrote: |
Yeah sadly I have an iPod. Looks like I have to stick with mp*. |
Not if you install Rockbox. |
I installed it before but didn't like it. I just like how the original firmware is laid out. |
Maybe try iPod Linux I have not tried it and I think I remember someone talking about OGG support on it, I don't have an iPod so I couldn't tell you. (I have an iAudio X5L w00t w00t ) |
|
| Back to top |
|
 |
ziegs Tux's lil' helper

Joined: 29 Apr 2004 Posts: 119
|
Posted: Sat Jun 03, 2006 11:27 pm Post subject: |
|
|
the problem with ipodlinux is that its not fully supported on most of the newer ipods.
i have a 4g, and i don't even think usb or firewire transfers are working on those yet... |
|
| Back to top |
|
 |
|