# Thread: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

1. ## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

I want to use pcapl but I want to know how to use it efficiently and so I searched for the words "pcapl help" "pcapl documentation" etc., but not found except manual page of it.

Can anyone of you suggest a link to it's documentation.

2. ## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

Originally Posted by rupeshforu3
I want to use pcapl but I want to know how to use it efficiently and so I searched for the words "pcapl help" "pcapl documentation" etc., but not found except manual page of it.

Can anyone of you suggest a link to it's documentation.
I suppose you can start with where and what this "apcl" is.

Perhaps it doesn't exist?

TSU

3. ## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

Originally Posted by rupeshforu3
I want to use pcapl but I want to know how to use it efficiently and so I searched for the words "pcapl help" "pcapl documentation" etc., but not found except manual page of it.

Can anyone of you suggest a link to it's documentation.
A good starting place *might* be the project web site: https://vorzox.wixsite.com/pacpl

Or perhaps you could ask on the mailing list: https://sourceforge.net/p/pacpl/mailman/

There is a strange feeling of déjà vu here

4. ## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

Originally Posted by tannington
A good starting place *might* be the project web site: https://vorzox.wixsite.com/pacpl

Or perhaps you could ask on the mailing list: https://sourceforge.net/p/pacpl/mailman/

There is a strange feeling of déjà vu here
Aha!
pacpl and not acpl?

Interesting Google's "fuzzy" search couldn't come up with that even when I added some multimedia keywords...

TSU

5. ## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

Hi previously I have created a thread starting with "how to compress 90 GB mp3 file's..." in the current form itself and in that thread I requested you to convert a Windows batch script to shell script.

The Windows script is as below

Code:
@echo off
setlocal EnableExtensions DisableDelayedExpansion

rem // Define constants here:
set "_SOURCE=C:\Rupesh\to convert"
set "_TARGET=E:\Rupesh\ffmpeg out"

rem // Change to source directory temporarily:
pushd "%_SOURCE%" || exit /B 1
rem // Enumerate source files, return paths relative to the source directory:
for /F "delims=" %%F in ('xcopy /L /S /I ".\*.mp3" "%_TARGET%" ^| find ".\"') do (
echo Currently converting "%%F"...
rem // Create destination directory, suppress error if it aready exists:
mkdir "%_TARGET%\%%F\.." 2> nul
rem // Perform actual file conversion, using paths relative to target directory:
ffmpeg -i  "%%F" -v quiet -codec:a libmp3lame -b:a 16k -ar 11025 -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "%_TARGET%\%%F\..\%%~nF.mp3"
)
echo Completed.
popd

endlocal
exit /B
Once I have executed the above script in Windows and ran successfully.

Can anyone of you convert the above Windows batch script as it is to bash script so that I can convert all mp3 files to m4a or opus files replacing ffmpeg command with opusenc or fdkaac commands.

6. New or Quiet Penguin
Join Date
Aug 2018
Posts
8

## Re: Converting mp3 files to opus and m4a recursively using command line tools and scripts in Linux.

Originally Posted by rupeshforu3
Hi previously I have created a thread starting with "how to compress 90 GB mp3 file's..." in the current form itself and in that thread I requested you to convert a Windows batch script to shell script.

The Windows script is as below

Code:
@echo off
setlocal EnableExtensions DisableDelayedExpansion

rem // Define constants here:
set "_SOURCE=C:\Rupesh\to convert"
set "_TARGET=E:\Rupesh\ffmpeg out"

rem // Change to source directory temporarily:
pushd "%_SOURCE%" || exit /B 1
rem // Enumerate source files, return paths relative to the source directory:
for /F "delims=" %%F in ('xcopy /L /S /I ".\*.mp3" "%_TARGET%" ^| find ".\"') do (
echo Currently converting "%%F"...
rem // Create destination directory, suppress error if it aready exists:
mkdir "%_TARGET%\%%F\.." 2> nul
rem // Perform actual file conversion, using paths relative to target directory:
ffmpeg -i  "%%F" -v quiet -codec:a libmp3lame -b:a 16k -ar 11025 -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "%_TARGET%\%%F\..\%%~nF.mp3"
)
echo Completed.
popd

endlocal
exit /B
Once I have executed the above script in Windows and ran successfully.

Can anyone of you convert the above Windows batch script as it is to bash script so that I can convert all mp3 files to m4a or opus files replacing ffmpeg command with opusenc or fdkaac commands.
You posted that script in 2017 in another thread, and again here? Not to sound nasty, but how much are you going to pay someone to do this for you?

The excuse of you being a 'newbie' is not going to work; you have been posting for several years now, on this forum and in many others. The only commonality is your continual insistence that you are a 'newbie', and (somehow) cannot ever write a script of your own. Is this not you
on LinuxQuestions?
https://www.linuxquestions.org/quest...3/#post5768842
https://www.linuxquestions.org/quest...139/page4.html

Writing a simple bash script with a loop is trivial, and there are so many thousands of examples you can find within minutes, I cannot imagine why you've not been able to do this yourself for more than 2 years now, or even BEGIN to try.

The Linux Documentation Project has probably the best bash tutorials out there: https://www.tldp.org/LDP/Bash-Beginners-Guide/html/ And despite you've claimed in many other forums, you DO NOT have to 'read many many books' or spend 'hundreds of hours studying' to write
a simple bash script.

Page 2 of 2 First 12