<p>No need to use pan filter, you can reassign channel layout using the channelmap filter.</p>

<pre><code>ffmpeg -i ticket1474.mov -af channelmap=0 -b:a 128k -map 0:v -map 0:a -y sample.mp4
</code></pre>

<p>See <a href="http://ffmpeg.org/ffmpeg-filters.html#channelmap" rel="nofollow noreferrer">docs</a> for channelmap filter.</p>

<p>I've skipped mapping the timecode track. ffmpeg will set it as metadata in the input file, and the MP4 muxer will pick it up from there.</p>

CC BY-SA 4.0
2019-08-29T09:22:59.517Z
2019-08-29T09:22:59.517Z
Gyan
<h2>Problem</h2>

<p>I want to convert the MOV file containing the separated FL/FR audio streams to MP4 file, transcoding the video to h264 and the audio to AAC.
However, it fails with the following error:</p>

<p><code>[aac @ 0x7ff515000c00] Unsupported channel layout "1 channels (FL)"</code></p>

<p>The source video and command what I used is as the following section.</p>

<h2>How To Reproduce</h2>

<p>Download <code>ticket1474.mov</code> as the source from <a href="https://trac.ffmpeg.org/ticket/1474" rel="nofollow noreferrer">https://trac.ffmpeg.org/ticket/1474</a>, 
this source contains the following streams:
(The streams in issue are #0:1 and #0:2)</p>

<pre><code>    Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 34801 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : XDCAM EX 1080p30 (35 Mb/s VBR)
      timecode        : 00:00:00;00
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Sound Media Handler
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Sound Media Handler
    Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Time Code Media Handler
      reel_name       : Untitled
      timecode        : 00:00:00;00
</code></pre>

<p>Then run the following command:</p>

<pre><code>$ ffmpeg -i ticket1474.mov -b:a 128k -map 0 -y sample.mp4
</code></pre>

<p>You'll get the following error:</p>

<pre><code>(snip)

Stream mapping:
  Stream #0:0 -&gt; #0:0 (mpeg2video (native) -&gt; h264 (libx264))
  Stream #0:1 -&gt; #0:1 (pcm_s16le (native) -&gt; aac (native))
  Stream #0:2 -&gt; #0:2 (pcm_s16le (native) -&gt; aac (native))
  Stream #0:3 -&gt; #0:3 (copy)

(snip)

[aac @ 0x7ffbd203e400] Unsupported channel layout "1 channels (FL)"
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
</code></pre>

<h2>ffmpeg Version</h2>

<pre><code>$ ffmpeg -v
ffmpeg version N-93875-gc2771bbf81-tessus 
</code></pre>

<p>Note: Stable version (ffmpeg-4.2) also fails.</p>

<h2>What I Tried (Converting FL/FR streams to dual mono channel)</h2>

<p>I guessed the problem can be solved if I could convert FL/FR streams to dual mono streams.</p>

<p>But I couldn't find the appropriate usage of ffmpeg for such scene.</p>

<p>The command I have tried is the following which also failed: </p>

<pre><code>$ ffmpeg -i ticket1474.mov -b:a 128k -filter_complex '[0:1]pan=mono|FC=FL[mono];[0:2]pan=mono|FC=FR[mono]' -y sample.mp4

(snip)

Filter pan has an unconnected output
</code></pre>

<p>Any ideas?</p>

<ffmpeg><audio>
ffmpeg: How to fix `Unsupported channel layout "1 channels (FL)" error`, when I convert the source containing separated FL/FR audio streams?
kaorukobo
# ffmpeg: How to fix `Unsupported channel layout "1 channels (FL)" error`, when I convert the source containing separated FL/FR audio streams?

(Asked by: username_0 on 2019-08-29)

Problem
I want to convert the MOV file containing the separated FL/FR audio streams to MP4 file, transcoding the video to h264 and the audio to AAC.
However, it fails with the following error:
[aac @ 0x7ff515000c00] Unsupported channel layout "1 channels (FL)"
The source video and command what I used is as the following section.
How To Reproduce
Download ticket1474.mov as the source from https://trac.ffmpeg.org/ticket/1474, 
this source contains the following streams:
(The streams in issue are #0:1 and #0:2)
    Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 34801 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Video Media Handler
      encoder         : XDCAM EX 1080p30 (35 Mb/s VBR)
      timecode        : 00:00:00;00
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Sound Media Handler
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s (default)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Apple Sound Media Handler
    Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2012-06-19T21:18:43.000000Z
      handler_name    : Time Code Media Handler
      reel_name       : Untitled
      timecode        : 00:00:00;00

Then run the following command:
$ ffmpeg -i ticket1474.mov -b:a 128k -map 0 -y sample.mp4

You'll get the following error:
(snip)

Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
  Stream #0:2 -> #0:2 (pcm_s16le (native) -> aac (native))
  Stream #0:3 -> #0:3 (copy)

(snip)

[aac @ 0x7ffbd203e400] Unsupported channel layout "1 channels (FL)"
Error initializing output stream 0:1 -- Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

ffmpeg Version
$ ffmpeg -v
ffmpeg version N-93875-gc2771bbf81-tessus 

Note: Stable version (ffmpeg-4.2) also fails.
What I Tried (Converting FL/FR streams to dual mono channel)
I guessed the problem can be solved if I could convert FL/FR streams to dual mono streams.
But I couldn't find the appropriate usage of ffmpeg for such scene.
The command I have tried is the following which also failed: 
$ ffmpeg -i ticket1474.mov -b:a 128k -filter_complex '[0:1]pan=mono|FC=FL[mono];[0:2]pan=mono|FC=FR[mono]' -y sample.mp4

(snip)

Filter pan has an unconnected output

Any ideas?

**Tags:** ffmpeg, audio


---

## 1 answers

### Answer by username_1 on 2019-08-29. Score: 3 | Accepted answer

No need to use pan filter, you can reassign channel layout using the channelmap filter.
ffmpeg -i ticket1474.mov -af channelmap=0 -b:a 128k -map 0:v -map 0:a -y sample.mp4

See docs for channelmap filter.
I've skipped mapping the timecode track. ffmpeg will set it as metadata in the input file, and the MP4 muxer will pick it up from there.


---

