fix(worker): conform — use aformat for channel layout (ffmpeg 8 dropped aresample ocl)

ffmpeg 8.x removed the `ocl` shortcut option from aresample (it was a
deprecated alias for out_chlayout). The per-segment trim+normalise call
errored immediately:
  [fc#-1] Error applying option 'ocl' to filter 'aresample': Option not found

Split the chain: aresample handles the sample rate, aformat asserts +
auto-converts to stereo + fltp.

  aresample=48000,aformat=channel_layouts=stereo:sample_fmts=fltp

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude 2026-05-28 15:37:35 -04:00
parent 686b90294b
commit 71d8944a01

View file

@ -238,7 +238,10 @@ export const conformWorker = async (job) => {
`scale=1920:1080:force_original_aspect_ratio=decrease,` +
`pad=1920:1080:(ow-iw)/2:(oh-ih)/2,` +
`setsar=1,format=yuv420p`,
'-af', 'aresample=48000:ocl=stereo',
// ffmpeg 8.x dropped the `ocl=` shortcut on aresample. Use aformat
// for the channel layout assertion + auto-conversion; aresample
// just sets the rate.
'-af', 'aresample=48000,aformat=channel_layouts=stereo:sample_fmts=fltp',
'-c:v', 'libx264', '-preset', 'ultrafast', '-crf', '18',
'-pix_fmt', 'yuv420p',
'-c:a', 'aac', '-b:a', '320k', '-ar', '48000',