lay-mux (Contents/MacOS/lay-mux)

lay-mux is FFmpeg 7.1.1, built as a separate program that Lay starts to join a stream's separate
video and audio files into one MP4 when the AI save tools save a video. It only copies packets
(-c copy); it decodes or encodes nothing it saves. It is not linked into Lay.

Licence: GNU Lesser General Public License, version 2.1 or later (COPYING.LGPLv2.1 in this folder;
FFmpeg's own summary in FFmpeg-LICENSE.md). It is built without any GPL, version 3 or nonfree part:
configure reports "License: LGPL version 2.1 or later", and the build stops unless config.h has
CONFIG_GPL 0, CONFIG_GPLV3 0, CONFIG_VERSION3 0 and CONFIG_NONFREE 0.

Source: https://ffmpeg.org/releases/ffmpeg-7.1.1.tar.xz
SHA-256: 733984395e0dbbe5c046abda2dc49a5544e7e0e1e2366bba849222ae9e3a03b1
FFmpeg is copyright the FFmpeg developers (https://ffmpeg.org/). The source is not modified.

Build recipe (scripts/lay-mux-build.sh in Lay's source; run it to rebuild the same binary):
  ./configure --arch=<arm64|x86_64> --target-os=darwin --cc="clang -arch <arch>"
    [--enable-cross-compile] [--disable-x86asm for x86_64]
    --extra-cflags=-mmacosx-version-min=14.0 --extra-ldflags=-mmacosx-version-min=14.0
    --disable-everything --disable-autodetect --disable-network --disable-doc --disable-debug
    --disable-ffplay --disable-ffprobe --disable-avdevice --disable-swscale --disable-swresample
    --disable-postproc --disable-iconv --disable-zlib --disable-bzlib --disable-lzma
    --enable-small --enable-ffmpeg --enable-protocol=file
    --enable-demuxer=mpegts,mov,aac --enable-muxer=mp4,mov --enable-parser=h264,hevc,aac
    --enable-decoder=aac --enable-bsf=aac_adtstoasc,h264_mp4toannexb,hevc_mp4toannexb
  make ffmpeg; strip -x ffmpeg; the result is installed as lay-mux.
(The AAC decoder is only used to read an AAC stream's parameters; the saved audio is copied.)

Under the LGPL you may replace lay-mux with your own build of FFmpeg (or a modified one): put an
executable named lay-mux in Lay.app/Contents/MacOS. Lay passes it only:
  -hide_banner -loglevel error -nostdin -y -i <video> -i <audio> -map 0:v:0 -map 1:a:0 -c copy
  -movflags +faststart -f mp4 <output>
