Skip to content

FFmpeg wrapper for the parallel conversion of audio files

License

Notifications You must be signed in to change notification settings

stefantalpalaru/any2opus.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

description

"any2opus.sh" is an FFmpeg wrapper for the parallel conversion of audio files.

Metadata is preserved. Any directory on the command line is traversed recursively. By default, the original audio files are deleted.

Symbolic links like "any2ogg.sh", "any2mp3.sh", "any2flac.sh" and "any2wav.sh" change the default output format - which can also be changed using command line arguments.

usage

$ ./any2opus.sh --help
any2opus.sh, version 0.1

Usage: any2opus.sh [options] file|dir...
Supported input formats: all supported by FFmpeg
Options:
-h | --help             this help
-q | --quality QUAL     encoding quality as understood by 'libopus' - higher is better (default: 192)
-k | --keep             keep original file (unless it's a *.opus)
-d | --dir DIR          put the result in DIR (create if missing)
-n | --dry-run          do not run the conversion
-j | --jobs             number of parallel jobs (default is 0, which means as many as logical CPU cores)
--only-exts EXTS        only process files with these extensions (space separated, e.g.: ".flac .wav")
--opus                  output Opus (default)
--ogg                   output Ogg/Vorbis
--mp3                   output MP3
--flac                  output FLAC
--wav                   output WAV
--version               show version

examples

Convert any FLAC and WAV files in the current directory to 192 Kb/s (VBR) Opus, recursively and using all CPU cores (file extension matching is case-insensitive, original files are deleted):

./any2opus.sh --only-exts ".flac .wav" .

Convert all files with an audio stream in directory "in_dir" to Opus, 160 KB/s (VBR), writing the output to directory "out_dir" and leaving the original files intact:

./any2opus.sh --quality 160 --dir out_dir in_dir

Convert all audio files in "my_dir" to MP3, deleting the originals:

./any2opus.sh --mp3 my_dir
# or
./any2mp3.sh my_dir

requirements

credits

About

FFmpeg wrapper for the parallel conversion of audio files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages