Musepack Forums  

Go Back   Musepack Forums > Main > MPC for UNIX

Reply
 
Thread Tools Search this Thread Display Modes
Old 26 March 2005, 10:59 pm   #1
bradmatic
Member
 
Join Date: Mar 2005
Posts: 3
Default Batch Encoding

Hello all,

Is there any way to batch encode a set of .wav's from the command-line? I've tried a couple of different sets of commands, but I usually only get one file encoded or an Error message.


Thanks!
bradmatic is offline   Reply With Quote
Old 30 March 2005, 06:45 pm   #2
Lefungus
Procrastinator
 
Lefungus's Avatar
 
Join Date: Jul 2004
Posts: 131
Default

Use Perl (or Ruby/Python). Here's a primitive example

compress.pl:
Code:
#/usr/bin/perl



$options = '--insane';



foreach $wav (<*.wav>) { 

    $mpc = $wav;

    $mpc =~ s/.wav$/.mpc/;

    system('mppenc '.$options.' "'.$wav.'" "'.$mpc.'"');

}
and then type
Code:
/home/blah/Hyperhit Volume 3/perl compress.pl
It can probably be done in Bourne shell too.
Lefungus is offline   Reply With Quote
Old 03 April 2005, 09:11 pm   #3
KrzysiekW
Member
 
Join Date: Jan 2005
Posts: 1
Default Re: Batch Encoding

Quote:
Hello all,

Is there any way to batch encode a set of .wav's from the command-line?

Thanks!
I wrote a small bash script to convert all (.wav .ape .flac) audio files to mpc
Code:
#!/bin/bash



#quality

Q="6"





IFS=$'n'



for waves in $(ls *wav 2>/dev/null)

do

# mppenc  --notags --quality $Q $waves  || return 1

 mppenc  --quality $Q $waves  || return 1

 echo "=== deleting  " $waves 

 rm $waves

done



for waves in $(ls *ape 2>/dev/null)

do

 mac $waves $(echo $waves|sed 's/.ape$/.wav/') -d || return 1

# mppenc  --notags  --quality $Q $(echo $waves|sed 's/.ape$/.wav/')  || 

 mppenc  --quality $Q $(echo $waves|sed 's/.ape$/.wav/')  || return 1

 echo "=== deleting  " $waves 

 rm $waves $(echo $waves|sed 's/.ape$/.wav/')

done



for waves in $(ls *flac 2>/dev/null)

do



# mppenc  --notags  --quality $Q $waves  $(echo $waves|sed 's/.flac$/.mpc/')|| return 1

 mppenc  --quality $Q $waves  $(echo $waves|sed 's/.flac$/.mpc/')|| return 1

 echo "=== deleting  " $waves 

 rm $waves

done
__________________
Greetings,
<br>Krzysiek Wojszko
KrzysiekW is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about MPC to MP3 Encoding bigjay517 General 4 07 November 2006 12:59 am
Slow encoding on Mac OS X krmathis MPC for UNIX 6 25 March 2005 02:10 am
Batch renaming .mp+ to .mpc drmrbrewer MPC for Windows 4 02 March 2005 09:52 am
Encoding and Decoding works fine -- but how to PLAY it??? AndreasG MPC for UNIX 2 27 December 2004 07:14 pm


All times are GMT. The time now is 05:38 am.


Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2019, vBulletin Solutions Inc.