IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
flac from 24bit 96kHz to 16bit 44kHz in batch, sox flac resample linux ubuntu
ferossan
post Jun 28 2010, 00:46
Post #1





Group: Members
Posts: 2
Joined: 28-June 10
Member No.: 81881



Hi all

Already I'm using sox to resample some 24bit 96kHz files to 16bit 44kHz:
sox -S OriginalFile.flac -r 44100 -b 16 NewFile.flac

My problem is I have to do it each file one by one.
Is there any way to apply that command to a batch script and be able to resample all files in a given folder and put the new ones in another folder?
Can anyone give me an script example? (or any other advice to batch process the command)

I'm open to any other solution as long works under Linux.

Thanks a lot.
Go to the top of the page
+Quote Post
tot
post Jun 28 2010, 00:58
Post #2





Group: Members
Posts: 65
Joined: 13-September 07
Member No.: 47005



for flac in *.flac; do sox -S "${flac}" -r 44100 -b 16 new/"${flac}"; done

would process all files matching *.flac in the current folder and put the new files into "new" subfolder (you'll need to create it first).


--------------------
Teemu
Go to the top of the page
+Quote Post
ferossan
post Jun 28 2010, 01:09
Post #3





Group: Members
Posts: 2
Joined: 28-June 10
Member No.: 81881



QUOTE (tot @ Jun 27 2010, 19:58) *
for flac in *.flac; do sox -S "${flac}" -r 44100 -b 16 new/"${flac}"; done

would process all files matching *.flac in the current folder and put the new files into "new" subfolder (you'll need to create it first).


Wonderful!!! Works great!!
Thanks a lot
Go to the top of the page
+Quote Post
danc6433
post Jun 28 2010, 01:50
Post #4





Group: Members
Posts: 26
Joined: 28-May 10
From: Minneapolis
Member No.: 80939



damn....that is amazing. how the hell do you know that!

Go to the top of the page
+Quote Post
mjb2006
post Jun 28 2010, 06:13
Post #5





Group: Members
Posts: 755
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (danc6433 @ Jun 27 2010, 18:50) *
damn....that is amazing. how the hell do you know that!


I hate to say RTFM, but...
For Windows command shell users, the command 'help' is your friend. Specifically, 'help for'.
For Unix, 'man sh' or read one of the many books & tutorials.
Go to the top of the page
+Quote Post
HotshotGG
post Jun 28 2010, 19:41
Post #6





Group: Members
Posts: 1593
Joined: 24-March 02
From: Revere, MA
Member No.: 1607



QUOTE
I hate to say RTFM, but..


Something many people do not do.... laugh.gif. My favorite phrase these days though.


--------------------
College student/IT Assistant
Go to the top of the page
+Quote Post
AshenTech
post Jul 7 2010, 04:59
Post #7





Group: Members
Posts: 78
Joined: 11-November 08
Member No.: 62144



im so glad I own dbpoweramp no need for commandline mode tongue.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 02:45