Skip to content

With ffmpeg 7, job fails if encoding profile contains both AudioEncode and SimpleAudioEncode. #38

@grusell

Description

@grusell

With ffmpeg 7, job fails if encoding profile contains both AudioEncode and SimpleAudioEncode.
Using the profile below, running encore with ffmpeg 7, using an input with six or more audio streams, the encoding job fails with an error
"Cannot find a matching stream for unlabeled input pad join" .

name: audio-only
description: multiple audio streams
encodes:
  - type: AudioEncode
    bitrate: 128k
    channelLayout: 'stereo'
    codec: aac
    suffix: _STEREO
  - type: SimpleAudioEncode
    codec: aac
    suffix: _ALL

With earlier version of ffmpeg the job is successful.

For a job with the profile above encore will produce an ffmpeg command similar to

ffmpeg -xerror -hide_banner -loglevel +level -y -i input.mp4 -filter_complex 'sws_flags=bicubic;[0:a]join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR,asplit=1[AUDIO-main-_STEREO.mp4-0];[AUDIO-main-_STEREO.mp4-0]pan=stereo|FL=FL+0.707107*FC+0.707107*BL+0.707107*SL|FR=FR+0.707107*FC+0.707107*BR+0.707107*SR[AUDIO-_STEREO.mp4-0]' -map [AUDIO-_STEREO.mp4-0] -vn -c:a:0 aac -ar:a:0 48000 -b:a:0 128k audio_only_STEREO.mp4 -map 0:a -vn -c:a aac audio_only_ALL.mp4

There seems to be a change in how unlabeled input pads are handled in ffmpeg 7. The solution to the problem seems to be to explicitly select streams for the join filter, ie something like

[0:a:0][0:a:1][0:a:2][0:a:3][0:a:4][0:a:5]join=inputs=6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions