General :: Bash Scripting - Sed - Lame - Character To Lame To Escape Spaces
Mar 20, 2010
Ok, so I find myself ripping audio CDs frequently, which I then lame to mp3's to put on my media player. I usually define the --ta and --tl (artist and album) ID3 tags and batch encode each album, but don't bother with the track tags as I'd have to do each one seperately.
So, I'm working on a script to do all this for me, extracting info from 'pwd' etc. to fill in the blanks for --ta, --tl and --tt (track name). All is working well, except that I can't get sed to pass on the "" character to lame to escape spaces.
Here's what I've got so far: (trouble spot is bolded - no need to pay attention to the rest of it)
Code:
All this does is pass a 'space' on to lame, which it takes as an invalid argument.
i'm trying to rebuild mplayer and facing the same error - lame-devel package can't be found as when i try to use rpmbuild. I'm not sure why and how to fix it. Here are steps and information:
i wanted to install ffmpeg with lame mp3 support.its procedure is as follows:
cd /usr/local/src/ffmpeg/ ./configure -enable-libmp3lame -enable-libogg -enable-libvorbis make && make install
but i have not passed -enable-libmp3lame during installing to ./configure so mp3lame support is not available.how can i modify existing installation to install libmp3
I am trying to create scripts to move files over from one directory to an ftp server and there is this one file with spaces that bash is see each word as being a file, here is the variable i am trying to use:
Code: Select allLOCL = '/mnt/cifs/"File name with spaces"/' cd $LOCL ls -l
I have a BASH shell script with embedded SQL script. The SQL script fetches the data from oracle server and the data contains more than 8 spaces in the value (eg, 28051630 A) and the data is written to flat file using the below syntax:
The problem is that whenever the data is written to ${out_file} spaces are getting converted to TAB character
eg, 10 spaces (in Oracle) converted to 1 TAB and 2 spaces 7 spaces (in Oracle) converted to 1 TAB and 1 space Also, from above example you can see the width of TAB char is not constant (8 in first example and 6 in second example) Is there any way that I can stop shell script to convert spaces into TAB character as I want the data as it is from Oracle DB (i.e. only spaces not TABs)
My new Wheezy install is looking pretty good and I'd like to copy some of my CDs to my harddrive. I'd like them in mp3 format, but unlike other distros, i don't seem to be able to find Lame, which is needed. I've searched for answers, but not come up with anything that works, yet. I know this question is probably asked a lot, but can anyone help me with this one? I have contrib and non-free enabled in my /etc/apt/sources.list.
How do I get 'lame' in my path? I just installed Asunder, and I want to rip CDs in MP3 format to my hard drive. I get an error message that reads:Quote:'lame' was not found in your path. Asunder requires it to play MP3 files. All MP3 functionality is disabled.
I need to download lame package to my offline ubuntu [URL] but its involved so many dependencies to download. Is there anyway to ease the pain of downloading each dependencies separately?
I am wanting to reduce around 9.9gigs of music to 8gigs to fit on my phone. I have done some snooping and noticed a program called Lame. I also noticed a code:
for x in [ `ls -1 *.mp3` ]; do lame --preset 32 $x new32-${x}; done
I was wondering if someone would be able to explain the code and how I go about converting the bitrate to 96?
how to use lame to convert wav files to mp3. When using K3B sometime later, I noticed that mp3 was now listed as an option for the formats I could rip CD tracks in. I'm pretty sure it was never in the list before, and it says not just "mp3" but "mp3 (lame)" so it is obvious that my installing lame made mp3 an option in this list.The thing is, it doesn't work. I've tried burning in mp3 now, and every time, some error prevents it. The debugging output says:
Quote:
System ----------------------- K3b Version: 1.0.5
KDE Version: 3.5.10
[code]...
and the error message, showing the command that failed, is shown in this screenshot I attached. (It wouldn't let me copy the text to the clipboard.)Any idea why it doesn't work? If I could rip tracks as MP3 in K3B, I could rip them all at once, and it would be much faster than using the lame command on each file in a terminal window.
First I've compiled and installed lame and xvid with --prefix=/usr.
Then I've compiled and install mplayer with --prefix=/usr.
Checking for libmp3lame ... yes (in FFmpeg: yes)
Checking for Xvid ... yes
mencoder -ovc help shows xvid (it works) but no mp3lame at all. And mplayer uses ffmpeg [ffmp3float], which extremely distors tracks. I'm sure it's not alsa, because music played online sounds normal.
Is there a way to process individual characters one-by-one from a text file in Bash, or is that hoping for a little too much from this lovable old clunker?
I am a happy Ubuntu user, I run it on all of my servers.
A few days ago I setup a new slice, and now I want to use it to convert ULAW (μ-law) WAV files into MP3's.
If I would only install LAME this would give me an 'Unsupported data format: 0x0007'. Because LAME doesn't support ulaw encoded wav's only Linear PCM's.
I have read that one can use the Libsndfile and use it with LAME --fileio=libsndfile (or something like that) when 'MAKE'-ing Lame. In this case because of the additional encoding library sndfile Lame can read and encode the ulaw into mp3.
I have also read another solution is to first convert the ulaw-wav into a pcm-wav with sox, and afterwards convert the output into an mp3 with lame. This seems to be a lot of extra system resources.
I am looking for a hands on tutorial howto wget, compile, install and run LAME with Libsndfile on Ubuntu Lucid (commandline only) so I can encode incoming ulaw files into mp3's?
I need to install these packages LAME MP3 Encoder, Libogg + Libvorbis, Mencoder and also Mplayer, FFMpeg-PHP, GD Library 2, CGI-BIN on a centos . I searched the Google but most of the wget commands are not working because the links are not active links and I get error message failed: Connection timed out. Does anyone know where to get these packages with explanation of how to install them?
prompt$sox mix2.wav soundstrack.mp3 sox FAIL formats: can't open output file `soundstrack.mp3': SoX was compiled without MP3 encoding support so i have seen a lot of other posts about this issue but none had an answer for me. i've run sox on numerous other mac and linux machines and never had a problem with .mp3 stuff provided i have lame and libmad installed. but on my current machine (ubunut 10.10) i can't seem to get sox to do anything with .mp3 despite having lame installed, reinstalling sox, etc.
I bought un-managed VPS server for host a video sharing script. Server details
[Code]...
And that video sharing script needs "FFmpeg,Flvtool2,Libogg + Libvorbis,LAME MP3 Encoder" I searched google,forums,Articles. But i couldn't be able to find a way to install them on Centos
How do I get the "gstreamer0.10-lame" package?OK it's not in sysnaptic and the debian repository. I have partners enabled in software sources but cant find it.
How can I launch a program that requires a path and that path has spaces or special characters in them if (as far as I can tell) .desktop launchers doesn't seem to support escape characters?
I have recently upgraded to a VPS for the purpose of web hosting a group of sites related to my business.The reason for the upgrade was because we wish to run a shopping cart software which required greater memory for PHP and the VPS was the most economic solution. So, I have very basic linux knowledge but I am the definition of a newbie when it comes to going further than just scratching the surface of server configuration! I have successfully hosted our main site for a number of weeks but recently the postfix service stopped sending mail. I have Plesk Control Panel installed and postfix continually shows as not started even though in SSH the service status is definitely running - I have gone through the troubleshooting checklist here (http://www.postfix-book.com/debugging.html#d0e6) but can't get any further than section 2.1 as when running the host command (#host relay-test.mail-abuse.org), I get # -bash: host:command not found. I've gone further in the document but not found any issues...
When postfix was working properly (i.e. sending emails!), the plesk CP showed the service as started and all emails from the website were sending as normal. The mailq command is showing the messages stuck in the mailq and the maillog shows the following:- http://pastebin.centos.org/36446 - these are the latest few pages.To check the configuration and basic elements I have flushed the mailq (which shows a stack of messages waiting) and I have also spent a long time (2 weeks) reading up on the parameters that should be in main.cf and master.cf.I have found that when I 'telnet localhost 25' I get the following response...[root@s15397216]# telnet localhost 25Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.
I am reading the output of /proc/acpi/thermal_zone/ATF0/temperature in a program to read my CPU temp. I am using cat like the following:
Code: #cat /proc/acpi/thermal_zone/ATF0/temperature temperature: 49 C
I basically want to get rid of the spaces in between temperature and the actual temperature. Is there a command I can pipe the cat output to, to remove the spaces. I have seen suggestions for sed, or tr, but for some reason I cannot get them to work properly.
I named a number of files with spaces in them, and I want to replace the space with "_". However, every time I write a command in the shell with the file name (eg "Spring 2011"), the shell doesn't recognize the file or directory. What can I do about this? Is there any way to use the unicode character for a space?