Skip to content

Commit

Permalink
fixed some formating issues
Browse files Browse the repository at this point in the history
  • Loading branch information
delinuxco committed Nov 9, 2021
1 parent 693c1a5 commit 02e5ecc
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# AudioConversionScripts
A series of linux shell scripts for converting audio formats in batch process,
example .wav to .flac or .m4a to .mp3 and .flac to .wav etc.
A series of linux shell scripts for converting audio formats in batch process, example .wav to .flac or .m4a to .mp3 and .flac to .wav etc.

Reasons for scripts
These were orignally created for batch processing of multiple audio files with a one simple command. Just navigate to the directory where the audio files are and run the appropriate command.

If you have a PLEX server and you can't get the server to find your .flac files even
though they are there, the flac to flac scripts will usually cure most of these issues.
If you have a PLEX server and you can't get the server to find your .flac files even though they are there, the flac to flac scripts will usually cure most of these issues.

You can also extract audio directly from webm and mp4 video formats.

Expand All @@ -21,13 +19,11 @@ Reasons for scripts
---------------------

## Installation
Clone repo, or download zip file and unzip. From terminal, cd to directory
AudioConversionScripts and run the command:
Clone repo, or download zip file and unzip. From terminal, cd to directory AudioConversionScripts and run the command:

`rsync -a acs ~/.local/bin/`

This will copy the folder "acs" to your local/bin directory. Which in most systems
should be in your $PATH.
This will copy the folder "acs" to your local/bin directory.

Next,the scripts need to be made executable by running these two commands:

Expand All @@ -45,21 +41,16 @@ Reasons for scripts


### Multi-thread performace
The scripts by default are set to use 2 threads, you can change this by editing the script
directly and changing the FFMPEG flag *"-threads 2"* what ever number of threads you want.
But for those of you with many threads, you are limited by your IO, so too many threads\
can actually hurt performance.
The scripts by default are set to use 2 threads, you can change this by editing the script directly and changing the FFMPEG flag *"-threads 2"* what ever number of threads you want. But for those of you with many threads, you are limited by your IO, so too many threads can actually hurt performance.

You can edit any script with a text editor, either graphical or gui,\
example using the command line with the nano editor.
You can edit any script with a text editor, either graphical or gui, example using the command line with the nano editor.

`nano ~/.local/bin/acs/flac-m4a-44`

---------------------

## How to use
Because the scripts are in a folder that is in your PATH, executing the scripts is easy.
First to see all of the current format combinations, open a terminal and type:
Because the scripts are in a folder that is in your PATH, executing the scripts is easy. First to see all of the current format combinations, open a terminal and type:

`.acs`

Expand Down Expand Up @@ -97,12 +88,8 @@ Reasons for scripts
* webm-flac-44
* webm-flac-48

The script name says what it does, for example "wav-flac-48" means that the script
will convert files with a .wav extentions to .flac with a sample rate of 48000.
Make a copy of a directory with audio files with an extention of either flac, m4a or
mp3 etc. Open a terminal in that directory and if your files are .flac, and you want to
convert them to .wav, simply type: flac-wav-48 and the script will convert all files
in the current directory to .wav files.
The script name says what it does, for example "wav-flac-48" means that the script will convert files with a .wav extentions to .flac with a sample rate of 48000. Make a copy of a directory with audio files with an extention of either flac, m4a or
mp3 etc. Open a terminal in that directory and if your files are .flac, and you want to convert them to .wav, simply type: flac-wav-48 and the script will convert all files in the current directory to .wav files.

The numbers at the end of the file name represent sample rates:
* 43 = 43200
Expand All @@ -116,23 +103,13 @@ Reasons for scripts
---------------------

# Creating your own custom scripts
If you have other formats that you would like to convert, you can easily use any of
of the existing scripts as a template. The only thing that need to be changed is
the *iext* & *oext* extensions and the FFMPEG settings line if applicable. Save the file
under a new name in the acs folder and make the new script executable. Do not add
the .sh extention to the new script.
If you have other formats that you would like to convert, you can easily use any of of the existing scripts as a template. The only thing that need to be changed is the *iext* & *oext* extensions and the FFMPEG settings line if applicable. Save the file under a new name in the acs folder and make the new script executable. Do not add the .sh extention to the new script.

![acs_example](https://user-images.githubusercontent.com/69424808/134644593-0fbfa4fc-a6dd-44d2-9c5a-0ab96c602b16.png)

When editing the FFMPEG flags (the green box in the above image), it is imparitive that
the spaces before and after are there (red arrows) or the script will fail. You can add
as many flags in the green box as necessary.
When editing the FFMPEG flags (the green box in the above image), it is imparitive that the spaces before and after are there (red arrows) or the script will fail. You can add as many flags in the green box as necessary.

# Bulk Batch processing
To batch process multiple directories, a separate script will execute the necessary script per directory.
simply edit the *bulkbatch* file in ~/.local/bin/acs with your favorite editor. Edit/add the directories
in the the section ***User Section ***. Please note that you may encounter errors in transcoding which causes
the script to stop. As always, never work with origianl files, ALWAYS copies!
To batch process multiple directories, a separate script will execute the necessary script per directory. simply edit the *bulkbatch* file in ~/.local/bin/acs with your favorite editor. Edit/add the directories in the the section ***User Section ***. Please note that you may encounter errors in transcoding which causes the script to stop. As always, never work with origianl files, ALWAYS copies!

To use the script, once edited to your liking, simply run `bulkbatch` from the terminal, does not matter the
location where the script is executed.
To use the script, once edited to your liking, simply run `bulkbatch` from the terminal, does not matter the location where the script is executed.

0 comments on commit 02e5ecc

Please sign in to comment.