FFmpeg LAME Shim 1.0.1.0
==============

Purpose
-------
FFmpeg LAME Shim is an x64 ffmpeg.exe compatibility shim for applications which can
launch FFmpeg/libmp3lame but cannot launch a native lame.exe command line.

Place these files together:

    ffmpeg.exe      <- CW-FFLAME shim
    lame.exe        <- real LAME executable
    libFLAC.dll     <- optional; enables FLAC input in the current LAME build
    lame.ini        <- optional; read by lame.exe itself, not by the shim

Design
------
FFmpeg LAME Shim has no configuration file of its own. It translates recognised
FFmpeg/libmp3lame options to native LAME arguments and launches lame.exe.

Any lame.ini support, cVBRb defaults, FLAC decoding, or other native extensions
belong to the real lame.exe. This keeps the shim a simple compatibility layer.

Supported FFmpeg/libmp3lame mappings
-------------------------------------
    -c:a libmp3lame / -codec:a / -acodec
    -b:a / -ab             -> LAME -b or --abr target
    -q:a / -aq             -> LAME -V
    -compression_level     -> LAME -q
    -cutoff                -> LAME --lowpass
    -abr                    -> LAME --abr
    -reservoir 0           -> LAME --nores
    -joint_stereo 1/0      -> LAME -m j / -m s
    -copyright 1           -> LAME -c
    -original 0            -> LAME -o
    -ar                     -> LAME --resample
    -ac 1                  -> LAME mono mode
    -metadata title=...
    -metadata artist=...
    -metadata album=...
    -metadata date/year=...
    -metadata track=...
    -metadata genre=...
    -metadata comment=...

Accepted compatibility/no-op options include -y, -n, -vn, -sn, -dn,
-hide_banner, -nostdin, -nostats/-stats, -threads, -map, -map_metadata and
-loglevel/-v. The explicit output format -f mp3 is accepted. Input-side
-f wav and -ignore_length 1 are also accepted for compatibility with audio
wrappers that feed WAV/PCM to FFmpeg.

Input support
-------------
The shim does not decode media itself. It passes the input file to lame.exe.
Therefore input support is whatever the installed LAME frontend supports.

With the current enhanced LAME build this includes the normal WAV/PCM input
paths and direct FLAC input when a compatible libFLAC.dll is beside lame.exe.

A FLAC command such as:

    ffmpeg.exe -i input.flac -c:a libmp3lame -q:a 0 output.mp3

can therefore be translated to:

    lame.exe -V 0 input.flac output.mp3

and lame.exe performs the FLAC decoding.

PCM streaming
-------------
-i pipe:0 and pipe:1 are translated to '-' for LAME stdin/stdout operation.
Actual stream compatibility still depends on what the real lame.exe accepts.

Probe behaviour
---------------
FFmpeg LAME Shim responds to -version, -encoders and basic -h/help requests so simple
host probing does not immediately reject it. It intentionally does not pretend
to be a complete FFmpeg implementation.

Unsupported operations
----------------------
FFmpeg LAME Shim is not a general FFmpeg replacement. Unsupported FFmpeg filtering,
video processing, arbitrary media decoding, muxing, and non-MP3 codec requests
are rejected rather than silently misinterpreted.

Native LAME extensions
----------------------
The shim does not add native-only LAME options. If lame.exe has a lame.ini file
beside it, lame.exe itself applies those defaults after the shim launches it.
This allows cVBRb or other fork-specific settings without duplicating their
implementation in CW-FFLAME.

Examples
--------
FFmpeg-style VBR:
    ffmpeg.exe -i input.wav -c:a libmp3lame -q:a 0 output.mp3

Native command launched:
    lame.exe -V 0 input.wav output.mp3

FFmpeg-style ABR:
    ffmpeg.exe -i input.wav -c:a libmp3lame -abr 1 -b:a 192k output.mp3

Native command launched:
    lame.exe --abr 192 input.wav output.mp3

FFmpeg-style FLAC input with the enhanced LAME build:
    ffmpeg.exe -i input.flac -c:a libmp3lame -q:a 2 output.mp3

Native command launched:
    lame.exe -V 2 input.flac output.mp3

Build
-----
The output executable is deliberately named ffmpeg.exe.

FFmpeg LAME Shim 1.0.1.0 is released for Windows x64 only. A 32-bit build is not
provided.
