Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]convert wav to mp3 without hisses
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Tue May 20, 2008 9:10 pm    Post subject: [SOLVED]convert wav to mp3 without hisses Reply with quote

I am trying to convert a wav file which is too big into mp3. The wav was recorded with
Code:
 rec -c 2 -r 48000 test.wav


I recorded it with -c 2 to get a better quality. The output was too big and I want to burn it on 1 cd. I used audacity to convert to mp3, but hisses were introduced. There were some hisses in the wav as well but at an acceptable level. Converting them to mp3 increased the noise, and it really annoys. Is there some trick to reduce it? Or at least to bring it back to the level that in the wav.


Last edited by queen on Thu May 22, 2008 7:25 am; edited 1 time in total
Back to top
View user's profile Send private message
freedomeagle1967
n00b
n00b


Joined: 26 Aug 2007
Posts: 52
Location: Minnesota

PostPosted: Tue May 20, 2008 10:11 pm    Post subject: Post subject: convert wav to mp3 without hisses Reply with quote

I have not had any hissing problems; but i have found that audacity files are much larger the from command line. this script is set to convert all wav files in current directory.


Code:
#!/bin/bash
#
# wav2mp3
#
for i in *.wav; do
    #out=$(ls $i | sed -e 's/.wav//g')
    #out=$(echo $i | sed -e 's/.wav$//')
    #lame -h -b 192 "$i" "$out.mp3"
    /usr/bin/lame -h -b 192 "$i" "${i%.wav}.mp3"
done


and of course you can adjust to your needs:
http://linux.die.net/man/1/lame

i added done to the script 5-21-08 i got cut off on original post sorry :oops:
_________________
Scott
Peace


Last edited by freedomeagle1967 on Thu May 22, 2008 12:45 am; edited 1 time in total
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Tue May 20, 2008 10:45 pm    Post subject: Re: Post subject: convert wav to mp3 without hisses Reply with quote

freedomeagle1967 wrote:
I have not had any hissing problems; but i have found that audacity files are much larger the from command line. this script is set to convert all wav files in current directory.



Code:
#!/bin/bash
#
# wav2mp3
#
for i in *.wav; do
    #out=$(ls $i | sed -e 's/.wav//g')
    #out=$(echo $i | sed -e 's/.wav$//')
    #lame -h -b 192 "$i" "$out.mp3"
    /usr/bin/lame -h -b 192 "$i" "${i%.wav}.mp3"


and of course you can adjust to your needs:
http://linux.die.net/man/1/lame


I am trying this script now. For line 10 I get unexpected end of line.
Back to top
View user's profile Send private message
freedomeagle1967
n00b
n00b


Joined: 26 Aug 2007
Posts: 52
Location: Minnesota

PostPosted: Tue May 20, 2008 11:05 pm    Post subject: Re: Post subject: convert wav to mp3 without hisses Reply with quote

there are only 9 line check and make sure of accuracy.
you can also run for a single file
Code:

/usr/bin/lame -h -b 192  filein.wav  fileout.mp3

_________________
Scott
Peace
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Tue May 20, 2008 11:19 pm    Post subject: Re: Post subject: convert wav to mp3 without hisses Reply with quote

freedomeagle1967 wrote:
there are only 9 line check and make sure of accuracy.
you can also run for a single file
Code:

/usr/bin/lame -h -b 192  filein.wav  fileout.mp3


I noticed it's nine lines. I can't understand why it complained about line 10. I would like to use this script for more files in the future.

Since I had now only one file to convert, I ran from command line and it worked perfectly. No hisses. I am amazed.
Back to top
View user's profile Send private message
freedomeagle1967
n00b
n00b


Joined: 26 Aug 2007
Posts: 52
Location: Minnesota

PostPosted: Tue May 20, 2008 11:29 pm    Post subject: Reply with quote

i glad i could help. maybe there is something that is causing a new line, try deleting any and all spaces after the final quote, if not type it in by hand. peace.


i got the script from:
http://gimpel.gi.funpic.de/wiki/index.php?title=Howto:convert_ape_to_wav/mp3/ogg_on_Linux



about half way done the page:
_________________
Scott
Peace
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Tue May 20, 2008 11:33 pm    Post subject: Reply with quote

freedomeagle1967 wrote:
i glad i could help. maybe there is something that is causing a new line, try deleting any and all spaces after the final quote, if not type it in by hand. peace.


I deleted the lines that are commented and spaces in the rest of the lines . It still sees one more line than it should. I will type everything again.

Thanks a lot. :D
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Tue May 20, 2008 11:45 pm    Post subject: Reply with quote

I typed again everything. It looks like a bash error/bug
Back to top
View user's profile Send private message
freedomeagle1967
n00b
n00b


Joined: 26 Aug 2007
Posts: 52
Location: Minnesota

PostPosted: Wed May 21, 2008 6:11 pm    Post subject: Reply with quote

:) post your script :) and so i can see want you have.
_________________
Scott
Peace
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Wed May 21, 2008 11:59 pm    Post subject: Reply with quote

Code:

#!/bin/bash
#       wav2mp3
for i in *.wav;do
lame -h -b 192 "$i" "${i%.wav}.mp3"


I deleted the lines you commented. Somehow nano sees 1 more line than it should.
Back to top
View user's profile Send private message
freedomeagle1967
n00b
n00b


Joined: 26 Aug 2007
Posts: 52
Location: Minnesota

PostPosted: Thu May 22, 2008 12:39 am    Post subject: Reply with quote

My Bad :oops: i cut off "done"


just add done



Code:

#!/bin/bash
#       wav2mp3
for i in *.wav; do
lame -h -b 192 "$i" "${i%.wav}.mp3"
done

_________________
Scott
Peace
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1642

PostPosted: Thu May 22, 2008 7:08 am    Post subject: Reply with quote

freedomeagle1967 wrote:
My Bad :oops: i cut off "done"


just add done



Code:

#!/bin/bash
#       wav2mp3
for i in *.wav; do
lame -h -b 192 "$i" "${i%.wav}.mp3"
done


Thanks. ;-)
I am ashamed as well. I guess I was tired as well and didn't notice.
Back to top
View user's profile Send private message
yngwin
Retired Dev
Retired Dev


Joined: 19 Dec 2002
Posts: 4572
Location: Suzhou, China

PostPosted: Thu May 22, 2008 10:15 pm    Post subject: Reply with quote

It would be better to use VBR, for example: lame -V 2 --vbr-new
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum