0

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?

  • 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? – Spencer Jan 26 at 23:25
  • Not implemented at present. For now, do them in separate command afterwards. I'll look into getting this added. – Gyan Jan 27 at 5:35
  • @Gyan Dang, that's a shame! Thanks for the info, at least it's pretty fast to mux the metadata afterwords. – Spencer Jan 27 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.