Body: <p>I am trying to encode 2 video files from: 1 source video, 2 source audio files, and 1 source chapter marks file. Because the video file only needs to be encoded once I am using tee muxing for efficiency, however this means I need to explicitly map my streams and for some reason the chapters stream seems to be getting lost. Here is what I am trying to map:</p>
  
  <pre><code>video.mov        -&gt;  output_stereo.mkv
  audio_stereo.wav -&gt;  output_stereo.mkv
  chapters.txt     -&gt;  output_stereo.mkv
  
  video.mov        -&gt;  output_5.1.mkv
  audio_5.1.wav    -&gt;  output_5.1.mkv
  chapters.txt     -&gt;  output_5.1.mkv
  </code></pre>
  
  <p>And here's my FFMPEG command:</p>
  
  <pre><code>-i video.mov -i stereo.wav -i 5.1.wav -i chapters.txt \
  -c:v libx264 -flags +global_header \
  -map 0:v -map 1:a -c:a copy -map 2:a -c:a copy -map_chapters 3 \
  -f tee "[select=\'0:v,1:a]output_stereo.mkv|[select=\'0:v,2:a]output_5.1.mkv"
  </code></pre>
  
  <p>I assumed that <code>-map_chapters 3</code> would take the 4th input (the chapters file) and just copy it over to both outputs, but when I inspect the encoded files there is no metadata stream for the chapter marks. Is there some other way I should be doing this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-26T23:25:51.233Z
Comments.Text: Continuing to look into this it seems that I will need to specify this in the "select" parameter, however I do not know how to select a metadata stream?
Comments.UserDisplayName: Spencer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-27T05:35:05.863Z
Comments.Text: Not implemented at present. For now, do them in separate command afterwards. I'll look into getting this added.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-27T23:37:59.710Z
Comments.Text: @Gyan Dang, that's a shame! Thanks for the info, at least it's pretty fast to mux the metadata afterwords.
Comments.UserDisplayName: Spencer
Tags: <ffmpeg>
Title: FFMPEG tee muxing, map chapters to all outputs
UserDisplayName: Spencer
ThreadText: # FFMPEG tee muxing, map chapters to all outputs
  
  (Asked by: username_0 on 2019-01-26)
  
  I am trying to encode 2 video files from: 1 source video, 2 source audio files, and 1 source chapter marks file. Because the video file only needs to be encoded once I am using tee muxing for efficiency, however this means I need to explicitly map my streams and for some reason the chapters stream seems to be getting lost. Here is what I am trying to map:
  
  ```
  video.mov        ->  output_stereo.mkv
  audio_stereo.wav ->  output_stereo.mkv
  chapters.txt     ->  output_stereo.mkv
  
  video.mov        ->  output_5.1.mkv
  audio_5.1.wav    ->  output_5.1.mkv
  chapters.txt     ->  output_5.1.mkv
  
  ```
  
  And here's my FFMPEG command:
  
  ```
  -i video.mov -i stereo.wav -i 5.1.wav -i chapters.txt \
  -c:v libx264 -flags +global_header \
  -map 0:v -map 1:a -c:a copy -map 2:a -c:a copy -map_chapters 3 \
  -f tee "[select=\'0:v,1:a]output_stereo.mkv|[select=\'0:v,2:a]output_5.1.mkv"
  
  ```
  
  I assumed that `-map_chapters 3` would take the 4th input (the chapters file) and just copy it over to both outputs, but when I inspect the encoded files there is no metadata stream for the chapter marks. Is there some other way I should be doing this?
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_0**: Continuing to look into this it seems that I will need to specify this in the "select" parameter, however I do not know how to select a metadata stream?  
  > **username_1**: Not implemented at present. For now, do them in separate command afterwards. I'll look into getting this added.  
  > **username_0**: @username_1 Dang, that's a shame! Thanks for the info, at least it's pretty fast to mux the metadata afterwords.  
  
  ---
  
  ## 0 answers
  
  