Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mr.Lliman1 you will need basic computer knowledge to use a simple script.
This thread is about a script to convert m4a files to mp3.
If you want to convert mp4 songs then the script is the same but I would change the content as followed:
#!/bin/bash
#
# mp4 to mp3 and tag transfer
# for music from iPod
# This software is licensed under the GNU General Public License
# For the full text of the GNU GPL, see:
#
# http://www.gnu.org/copyleft/gpl.html
#
# No guarantees of any kind are associated with use of this software.
#requirements: faad, lame
#Begin
clear
# variables
version=0.1a
current_directory=$( pwd )
for i in *.mp4
do
faad "$i"
x=`echo "$i"|sed -e 's/.mp4/.wav/'`
y=`echo "$i"|sed -e 's/.mp4/.mp3/'`
faad -i "$i" 2>.trackinfo.txt
sed -i '23s/unknown: /title: /' .trackinfo.txt
sed -i '24s/unknown: /artist: /' .trackinfo.txt
great script! you don't really need to move the files at the end. i just let the filename stay the same. if you do change it you need to make sure trakes < 10 have a 0 in front of it for sorting. has ANYBODY found a real configurable script for the written in perl or something of the like?
If you haven't used one of the scripts yet, you should try the first one. There is no need for a GUI, all you have to do is fire up the script and let it crawl through your files, making them into mp3's.
I had to modify the script to get it to transcode my m4a's, but that was a 30 second find/replace with kwrite, otherwise is the exact same as was posted above.
To use it:
0) Save the file above.
1) Place it in the same folder as the audio files you wish to transcode, or copy them into the folder containing the script.
2) From a terminal as normal user: chmod +x m4a_to_mp3.sh
3) Still in the terminal: ./m4a_to_mp3.sh
4) Sit back and watch, then enjoy your mp3's.
Note that this does replace the m4a files, so if you want to keep them as m4s'a as well, backup them up somewhere.
Hope this helps someone, the script was really handy to me!
SteelJ, thank you very much for all of the time that you spent on the script. I have used it for the basis for another script which handles recursively walking a directory and alternative directory names. If anyone is interested I have posted it:
(sorry I would have posted it here but it got very long)
(Sorry about the double post, limitation of the site prevented me from posting the URL)
SteelJ, thank you very much for all of the time that you spent on the script. I have used it for the basis for another script which handles recursively walking a directory and alternative directory names. If anyone is interested I have posted it: http://www.minigeek.org/index.php/20...ript/#more-116
(sorry I would have posted it here but it got very long)
Last edited by sblob; 07-07-2007 at 04:00 AM.
Reason: fixed URL
You could just install libmp4 and ecasound.If you want to convert to .mp3 just run in the folder containing the files ecaconvert .mp3 *.mp4.Simple.Change the .mp3 to .wav .flac .ogg depending on what output you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.