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.
Updated by Onj on 2025/08/02 with lots more info on bat files and a slimming down of the flac shortcuts and bat files.
Updated by Onj on 2026/05/24 with an installer, newer encoder binaries, the iPlayer fixer script and a few extra utility bat files.
Updated by Onj on 2026/05/31 so mp3 encoding supports flac input via ffmpeg when lame cannot read it directly, replaced the old Nero AAC encoder with ffmpeg's native AAC encoder, and removed unused libsndfile/lame32 files.
Updated by Onj on 2026/06/01 so gaud.bat and gaudn.bat download to the user's SendTo\iPlayer folder and automatically run the iPlayer fixer afterwards. YouTube helper scripts now download to the user's SendTo\YouTube folder, with path.txt added so iPlayer and YouTube helper output folders can be changed in one place.
Updated by Onj on 2026/06/03 so the installer preserves an existing path.txt during updates, removed the old FFMPeg to M4A option because AAC encode now creates m4a files correctly, made file2mp4.bat and file2mov.bat try stream-copy remux before GPU/CPU H.264 transcoding, updated file+image2video.bat to use GPU/CPU H.264 fallback while preserving image aspect ratio, added update-sendto.cmd with SHA-256-verified updates via https://3.onj.me/programs/.sendto.json, removed placeholder sha256/size values from installed package metadata, documented urlgrab.bat and vgmstr.bat, renamed the bundled downloader from youtube-dl.exe to yt-dlp.exe, and verified the bundled yt-dlp.exe binary was current at release time.
Updated by Onj on 2026/06/04 so the installer removes stale files from older installs, including qtaacenc.exe, neroAacEnc.exe, libsndfile-1.dll, the old libsndfile directory, and old flcnm/flcrnm/flcwavnm helper bat files. Added Check-BundledEncoderUpdates.ps1 as a release-time update check for bundled encoders, updated vgmstream to r2117 using vgmstream-cli.exe, and made gvid.bat/gvidn.bat use the IPLAYER_DIR value from path.txt. yt-dlp.exe was checked for updates before release.
Updated by Onj on 2026/06/12 so file2wav.bat quotes input paths correctly, accepts multiple selected files, and preserves common source PCM bit depths when writing WAV. 24-bit PCM sources now become 24-bit WAV files instead of being reduced to 16-bit by ffmpeg's default WAV encoder. The bundled encoder update check was run before release and updated yt-dlp.exe to stable@2026.06.09.
Updated by Onj on 2026/06/27 to include FileDentify.exe and the File&Dentify SendTo shortcut as part of the public package. FileDentify gives a keyboard-first file identification report for selected files, including hashes, signatures, headers, strings, executable metadata and ffprobe media metadata where available. The bundled encoder update check was run before release, yt-dlp.exe was checked for updates, and the bundled FFmpeg tools were updated to 8.1.2.
Updated by Onj on 2026/06/28 to update FileDentify to 1.1, including the fd.com terminal helper for command-line paging mode. The bundled encoder update check was run before release and yt-dlp.exe was checked for updates.
Updated by Onj on 2026/06/29 to update FileDentify to 1.3, including .fdreport saved reports, folder scanning, richer file and package identification, advanced viewer fixes, screen-reader shortcut announcements, and the README cleanup behavior from the portable FileDentify updater. The bundled encoder update check was run before release and yt-dlp.exe was current.
Updated by Onj on 2026/06/30 to update FileDentify to 1.5, including expanded audio-library and macOS package/resource coverage, richer VST3 metadata, improved high-value section ordering, HTML-view shortcut parity fixes, and Send To appending into an already running FileDentify window. The bundled encoder update check was run before release and yt-dlp.exe was checked for updates.
Updated by Onj on 2026/07/08 to update FileDentify to 1.8, including expanded Arturia, Pocket TTS, NVDA add-on, Python resource, Apple Mach-O, and speech-voice file identification, plus clickable file links in FileDentify HTML report overviews. The bundled encoder update check was run before release and yt-dlp.exe was updated to stable@2026.07.04.
Updated by Onj on 2026/07/13 to update FileDentify to 1.9, including expanded KORG, Mac VST3 bundle resource, Logic Pro Library.bundle, and Google TTS for NVDA file identification. The bundled encoder update check was run before release and yt-dlp.exe was current at stable@2026.07.04.
Updated by Onj on 2026/07/20 to update FileDentify to 1.10. This release embeds LibFileDentify 0.1.0 for reusable, evidence-based file identification while retaining FileDentify's richer reports and specialist parsers. The bundled encoder update check was run before release and yt-dlp.exe was checked for updates.
Updated by Onj on 2026/08/19 to add the Deno JavaScript runtime required by current YouTube extraction, update yt-dlp.exe to nightly@2026.08.18.122307 while the stable release's Android VR extraction route returned HTTP 403, and update FFmpeg, FFprobe and FFplay to 9.0.1. The ydln.bat and ydlndr.bat helpers now request audio directly instead of downloading video streams that they subsequently discard, produce broadly compatible M4A/AAC files, return yt-dlp's real success or failure status, and no longer run broad recursive deletion commands against unrelated media in the download folder.
Updated by Onj on 2026/08/01 to update FileDentify to 1.11 and LibFileDentify to 0.2.0, with stronger content-first identification for renamed and extensionless files and clearer, consolidated report notes. The installer now gives the Windows Send to Desktop shortcut the K accelerator so it does not clash with FileDentify. The iPlayer fixer now removes trailing BBC programme IDs from both fresh downloads and files already arranged under Show\Series N. Automatic cleanup in gaudn.bat is now opt-in through a clearly marked commented line.

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.
The easy way is to run install-sendto.cmd or install-sendto.ps1 from this folder. It copies the encoders folder to your user home directory, creates the SendTo shortcuts and adds %userprofile%\encoders to your user path. If %userprofile%\encoders\path.txt already exists, the installer leaves it alone so your download folder choices are not overwritten by updates.

To update later, run update-sendto.cmd from this folder or from %userprofile%\encoders. The updater checks the current server manifest, tells you if a newer SendTo package is available, and asks before downloading or installing anything. It requires 7-Zip to extract the .7z package.

If you'd rather do it manually, 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 :
%appdata%\Microsoft\Windows\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-if-present -j 4

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

Mp3: mp3.bat

note: only an mp3 encode option is given, as it's assumed most sound editors, etc, can read mp3 natively. The mp3 wrapper encodes normal wav input with lame directly, and uses ffmpeg to feed flac input to lame when lame cannot read the flac file itself.

mp&3 encode:
%userprofile%\encoders\mp3.bat

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: aac.bat

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

The bat file uses ffmpeg's native AAC encoder and writes an m4a file beside the source file.

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

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.

Shared download paths:
path.txt: Sets shared output folders for helper scripts that download files. By default, YouTube helpers use %userprofile%\SendTo\YouTube and iPlayer audio helpers use %userprofile%\SendTo\iPlayer. Edit path.txt once if you want those downloads somewhere else. The bat files create the folders automatically if they do not already exist.
_loadpaths.cmd: Internal helper used by the bat files to read path.txt.
.sendto.json: Internal installed version information used by update-sendto.cmd. The server manifest at https://3.onj.me/programs/.sendto.json contains the current archive URL, size and SHA-256.
update-sendto.cmd/update-sendto.ps1: Checks for a newer SendTo package, verifies it and installs it if you agree.

Files in general:
file2mov.bat: Converts one or more highlighted files to .mov if possible, including .webm files. It first tries a stream-copy remux, which is fast and does not re-encode. If the original audio/video streams cannot be copied into a mov container, it tries GPU H.264 encoders, then falls back to CPU H.264/AAC.
file2mp4.bat: Converts one or more highlighted files to .mp4 if possible, including .webm files. It first tries a stream-copy remux, which is fast and does not re-encode. If the original audio/video streams cannot be copied into an mp4 container, it tries GPU H.264 encoders, then falls back to CPU H.264/AAC.
file2wav.bat: Encodes the highlighted file to wav. This works on all sorts of weird and wonderful things with no extension, random extensions and so on. It quotes full paths correctly, can process multiple selected files, and preserves common PCM bit depths such as 24-bit and 32-bit where the source audio exposes that information.
FileDentify.exe: Opens a keyboard-first file identification window for one or more highlighted files or folders. It reports basic file details, hashes, common signatures, header bytes, readable text, printable strings, structure hints, executable metadata, embedded version information, media metadata, saved .fdreport reports, folder/package summaries, and many specialist file-type sections. The SendTo shortcut is File&Dentify.
file+image2video.bat: Takes one image and one audio file, in either order, and makes a simple MP4 video. It tries GPU H.264 encoders first, falls back to CPU H.264 if needed, writes AAC audio, and pads the image to 1280x720 without stretching it.
urlgrab.bat: Uses ffmpeg to copy an online media URL or stream into output.mp4 where possible. This is a quick capture/remux helper, not a downloader for every website.
_video2container.cmd: Internal helper used by file2mp4.bat and file2mov.bat for remux, GPU encode and CPU fallback behavior.

flac:
flc.bat: encodes a single flac file at maximum compression.
flcr.bat: encode all wav or aiff files in the current directory, including subdirectories. 
flcwav.bat: Decodes all flac files in the current directory and subdirectories.

getiplayer:
gaud.bat: Uses getiplayer (installed separately) to download from BBC iPlayer, specifically used for grabbing audio-described content and no video. Outputs to the IPLAYER_DIR value from path.txt as .m4a, then runs the iPlayer fixer to normalise names and arrange Show\Series N folders.
gaudn.bat: Uses getiplayer (installed separately) to download from BBC iPlayer, specifically used for grabbing non-audio-described content and no video. Outputs to the IPLAYER_DIR value from path.txt as .m4a. Its final commented line can be uncommented if you want it to run the iPlayer fixer automatically after each successful download.
gvid.bat: Uses getiplayer (installed separately) to download from BBC iPlayer, specifically used for grabbing audio-described content with video. Outputs to the IPLAYER_DIR value from path.txt.
gvidn.bat: Uses getiplayer (installed separately) to download non-audio-described content with video. Outputs to the IPLAYER_DIR value from path.txt.
iplayerfixer.cmd: Tidies get_iplayer downloads into Show\Series N folders and removes trailing BBC programme IDs from episode names. It can also repair files already arranged beneath Show\Series N. Run iplayerfixer preview to see what it would do, iplayerfixer copy to copy files, or iplayerfixer with no option to move matching files.

MP3:
_mp3encode.cmd: helper used by the mp3 bat files. It sends flac input through ffmpeg, then pipes decoded wav audio to lame.
mp3.bat: encodes one or more files 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 each input file only after that file encodes successfully... careful with this one!
mp3low.bat: encodes one or more files to mp3, at lower quality (64kbps)

AAC:
aac.bat: encodes one or more files to AAC in an m4a container using ffmpeg.

OGG:
ogg.bat: encodes a single file to ogg using the same settings as the SendTo menu item. 

Opus:
OpDec.bat: Decodes an Opus file to Wav.
opEnc.bat: Encodes a Wav file to Opus.

vgmstream:
vgmstreamer.bat: Uses vgmstream-cli.exe to decode one selected supported game-audio file to wav.
vgmstr.bat: Uses vgmstream-cli.exe to decode supported game-audio files in the current folder tree to wav.

yt-dlp:
The bundled downloader executable is yt-dlp.exe.
deno.exe: Provides the JavaScript runtime used by yt-dlp for current YouTube challenge handling. It is placed beside yt-dlp.exe and requires no separate installation or configuration.
ydl.bat: Uses yt-dlp.exe to download from a variety of sites. Simply give this a url in quotes for best performance. It extracts audio and keeps the original downloaded media where yt-dlp produces one.
ydldr.bat: Uses yt-dlp.exe to download audio while keeping the original downloaded media files.
ydln.bat: Uses yt-dlp.exe to download audio-only from a variety of sites. It prefers a native M4A stream and converts other source audio when necessary, so the finished file is M4A/AAC. Simply give it a URL in quotes for best performance.
ydlndr.bat: Uses yt-dlp.exe to download audio-only and produce an M4A/AAC file. It provides the same format behavior as ydln.bat for scripts or workflows that use the alternate helper name.
ydlup.bat: Updates yt-dlp.exe on its current release channel.

The YouTube helper scripts save downloads to the YOUTUBE_DIR value in path.txt. The iPlayer audio helper scripts save downloads to the IPLAYER_DIR value in path.txt. Edit path.txt if you want a different location.

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.

