user11191: I have a file that has one video stream and one audio stream with 8 channels. I want to create a new file that will only contain the first 2 channels of the audio stream (no video). I can do this using the pan filter. I also want to clip the file. I can do this using the -ss and -t options. However, when I try to do both together, I get an error.
So, if I run:
ffmpeg -i a.mov -filter_complex "[0:1]pan=2c|c0=c0|c1=c1[stereo]" -map "[stereo]" "a.audio.mov"

It works fine - I get the audio file with the correct channels.
But when I run:
ffmpeg -i a.mov -filter_complex "[0:1]pan=2c|c0=c0|c1=c1[stereo]" -map "[stereo]" -ss 00:00:01 "a.audio.mov"

I get the following error

[trim for output stream 0:0 @ 0000000002145720] Cannot select channel
  layout for the link between filters trim for output stream 0:0 and
  output stream 0:0.
  [trim for output stream 0:0 @ 0000000002145720] 
  Unknown channel layouts not supported, try specifying a channel layout
  using 'aformat=channel_layouts=something'.

Anyone have any ideas what I'm doing wrong and how to fix it?

user-1: This was bug in atrim filter, not supporting unknown channel layouts, it should be fixed in latest ffmpeg.

11191: <p>I have a file that has one video stream and one audio stream with 8 channels. I want to create a new file that will only contain the first 2 channels of the audio stream (no video). I can do this using the <a href="https://ffmpeg.org/ffmpeg-filters.html#pan" rel="nofollow">pan filter</a>. I also want to clip the file. I can do this using the <a href="https://www.ffmpeg.org/ffmpeg.html#toc-Main-options" rel="nofollow">-ss and -t options</a>. However, when I try to do both together, I get an error.</p>

<p>So, if I run:</p>

<pre><code>ffmpeg -i a.mov -filter_complex "[0:1]pan=2c|c0=c0|c1=c1[stereo]" -map "[stereo]" "a.audio.mov"
</code></pre>

<p>It works fine - I get the audio file with the correct channels.</p>

<p>But when I run:</p>

<pre><code>ffmpeg -i a.mov -filter_complex "[0:1]pan=2c|c0=c0|c1=c1[stereo]" -map "[stereo]" -ss 00:00:01 "a.audio.mov"
</code></pre>

<p>I get the following error</p>

<blockquote>
  <p>[trim for output stream 0:0 @ 0000000002145720] Cannot select channel
  layout for the link between filters trim for output stream 0:0 and
  output stream 0:0.<br>
  [trim for output stream 0:0 @ 0000000002145720] 
  Unknown channel layouts not supported, try specifying a channel layout
  using 'aformat=channel_layouts=something'.</p>
</blockquote>

<p>Anyone have any ideas what I'm doing wrong and how to fix it?</p>
 -1: <p>This was bug in atrim filter, not supporting unknown channel layouts, it should be fixed in latest ffmpeg.</p>
