SendTo encoders.

Started by onj and updated by arfy on 2012/01/19.
Updated by Onj on 2013/05/04.
Updated yet again by Onj on 2013/05/24
Updated again again by Onj on 2017/07/31.
Yet another update by arfy on 2017/08/04, attempt to make the project self-contained, no need to pollute the windows/windows\system32 folders. Now user specific. Also include notes on the extra bat files provided, such as flc.bat
Further update by Onj on 2018-01-06, updating Lame and Flac encoders to latest.
Updated by Onj on 2024-07-18 after many years of not doing so.

How to set up sendTo menu items for various encoding/decoding jobs.
Follow these instructions, substituting the command line for your encoder of choice, see below.
Copy the encoders folder to your user home directory. %userprofile% on any windows should get you there. This method keeps things tidy, and doesn't need any modifications to the path environment variable, unless you'd like to make use of the extra utility bat files provided, see below.
Copy all the shortcuts in the shortcuts folder to your sendTo folder. This is found under \documents and settings\user name on XP, and %appdata%\Microsoft\Windows\SendTo on Vista and 7. On windows 10, it can be found in %userprofile%\SendTo
If for whatever reason these shortcuts don't work out of the box, follow these instructions to set things up manually.


For each exe file, right click and select create shortcut. this will give you a shortcut to <exe name> in your current directory. rename this to the name given for each exe file below, Then go into the properties for each shortcut, filling out the target field as given in the instructions. 
Finally, copy these shortcuts to your sendTo folder.
now, for the encoders.

flac: flac.exe (flac32.exe for windows 32-bit systems)

&Flac 2 Wav and delete:
%userprofile%\encoders\flac.exe -d --delete-input-file  --keep-foreign-metadata

Flac 2 Wa&v and delete without Metadata:
%userprofile%\encoders\flac.exe -d --delete-input-file

Wav 2 Flac & delete:
%userprofile%\encoders\flac.exe -8 --delete-input-file -V -f  --keep-foreign-metadata

Wav &to Flac and delete - no Metadata:
%userprofile%\encoders\flac.exe -8 --delete-input-file -V -f

Mp3: lame.exe

note: only an mp3 encode option is given, as it's assumed most sound editors, etc, can read mp3 natively. Also, the version of lame here can directly encode flac files as well as standard pcm wav files.

mp&3 encode:
%userprofile%\encoders\lame.exe -h -V2 -q2 -m j --priority 4

ogg encode: oggenc2.exe
note: again, only an ogg encode option is given, as it's assumed most sound editors, etc, can read ogg natively. Also, like lame, oggenc can take flac input directly and give you an ogg file.

&ogg encode:
%userprofile%\encoders\oggenc2.exe -q4

AAC encode: neroAacEnc.exe

Shortcut property: %userprofile%\encoders\aac.bat

Strange we're calling a bat file yes, but the bat file tells the Nero AAC encoders to do their job and believe me, slaving over the syntax for that took the best part of a Friday evening so please, enjoy and test it heartily!

Opus encode/decode

opusdec.exe opusenc.exe
Required bat files: OpDec.bat OpEnc.bat
shortcut for Opus decode: %userprofile%\encoders\opdec.bat
Shortcut for Opus encode: %userprofile%\encoders\OpEnc.bat

ffmpeg: ffmpeg.exe
FFMP&eg to M4A:
%userprofile%\encoders\fpg.bat

Note II: Sometimes you may get an unusual file that says it's m4a or mp4, but be unable to play it. Try using the above command on the file and it *may* fix it.

Notes on the utility bat files.

The following bat files are included as conveniences, particularly useful when working from cmd. To use these, add %userprofile%\encoders to your path. Here's what each file does.

file2wav.bat: Encodes the highlighted file to wav.
flc.bat: encodes a single flac file at maximum compression, keeping foreign metadata intact.
flcnm.bat: same as above, but don't retain metadata.
flcr.bat: encode all wav files in the current directory, including subdirectories. 
flcrnm.bat: same as above, but don't retain metadata.
flcwav.bat: Decodes all flac files in the current directory and subdirectories, restoring included metadata.
flcwavnm.bat: Same as above, but with no metadata.
mp3.bat: encodes a single file to mp3 with the same settings as the SendTo menu item.
mp3d.bat: encodes all wav and flac files in the current directory and subdirectories to mp3.
mp3del.bat: same as above, but deletes the input files after completing... careful with this one!
mp3low.bat: encodes a single file to mp3, at lower quality (64kbps)
ogg.bat: encodes a single file to ogg using the same settings as the SendTo menu item. 
OpDec.bat: Decodes an Opus file to Wav.
opEnc.bat: Encodes a Wav file to Opus.

Well, that's it, for now. feel free to tell us about any other encoders/decoders you'd like in here, and we'll see what can be done.

