[FFmpeg-user] Selecting MPEG TS child streams for filter_complex

Gyan Doshi ffmpeg at gyani.pro
Mon Mar 16 14:02:42 EET 2020



On 16-03-2020 01:57 pm, Moritz Barsnick wrote:
> On Mon, Mar 16, 2020 at 09:21:56 +0100, Michael Fladischer wrote:
>> But there was no syntax error:
>>
>> $ ffmpeg -f -i file.ts -filter_complex '[i:0x101][i:0x103]amix=inputs=2' -vn -c:a flac /tmp/auphonic-input-m2s6wfy8.flac
> [...]
>> Invalid file index 0 in filtergraph description [i:0x101][i:0x103]amix=inputs=2.
> Yeah, interesting. It's due to the the fact that the "-i" get swallowed
> as an option to "-f", and you therefore have no input files specified,
> and therefore the filtergraph cannot be set up.
>
> With loglevel verbose, I get:
>> Reading option '-f' ... matched as option 'f' (force format) with argument '-i'.
> I wonder why ffmpeg doesn't trip over this first. Whatever.

-f is paired with -i and file.ts is interpreted as output URL so 
-filter_complex gets correctly paired with its arg.

Gyan


More information about the ffmpeg-user mailing list