View previous topic :: View next topic |
Author |
Message |
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Tue May 20, 2008 9:10 pm Post subject: [SOLVED]convert wav to mp3 without hisses |
|
|
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 |
|
|
freedomeagle1967 n00b
Joined: 26 Aug 2007 Posts: 52 Location: Minnesota
|
Posted: Tue May 20, 2008 10:11 pm Post subject: Post subject: convert wav to mp3 without hisses |
|
|
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 _________________ Scott
Peace
Last edited by freedomeagle1967 on Thu May 22, 2008 12:45 am; edited 1 time in total |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Tue May 20, 2008 10:45 pm Post subject: Re: Post subject: convert wav to mp3 without hisses |
|
|
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 |
|
|
freedomeagle1967 n00b
Joined: 26 Aug 2007 Posts: 52 Location: Minnesota
|
Posted: Tue May 20, 2008 11:05 pm Post subject: Re: Post subject: convert wav to mp3 without hisses |
|
|
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 |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Tue May 20, 2008 11:19 pm Post subject: Re: Post subject: convert wav to mp3 without hisses |
|
|
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 |
|
|
freedomeagle1967 n00b
Joined: 26 Aug 2007 Posts: 52 Location: Minnesota
|
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Tue May 20, 2008 11:33 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Tue May 20, 2008 11:45 pm Post subject: |
|
|
I typed again everything. It looks like a bash error/bug |
|
Back to top |
|
|
freedomeagle1967 n00b
Joined: 26 Aug 2007 Posts: 52 Location: Minnesota
|
Posted: Wed May 21, 2008 6:11 pm Post subject: |
|
|
post your script and so i can see want you have. _________________ Scott
Peace |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Wed May 21, 2008 11:59 pm Post subject: |
|
|
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 |
|
|
freedomeagle1967 n00b
Joined: 26 Aug 2007 Posts: 52 Location: Minnesota
|
Posted: Thu May 22, 2008 12:39 am Post subject: |
|
|
My Bad 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 |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Thu May 22, 2008 7:08 am Post subject: |
|
|
freedomeagle1967 wrote: | My Bad 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 |
|
|
yngwin Retired Dev
Joined: 19 Dec 2002 Posts: 4572 Location: Suzhou, China
|
Posted: Thu May 22, 2008 10:15 pm Post subject: |
|
|
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 |
|
|
|