-
How do you concatenate two files, copying ALL streams, and not re-encoding
I want to stick a title card, that I forgot to add to a sequence in an NLE prior to exporting it, to the beginning of what was exported – thus creating a new, single, continuous file of identical codec and container. In this way, I would hope to avoid having to wait for a re-encode of the entire 30 minute sequence by exporting only the title as an individual file with exactly the same settings and concatenating that file with the already exported file that is missing the title card. I realise that the process of figuring this out is way slower than just re-exporting but this is a circumstance I think I will likely find myself in in future.
I was able to do this successfully using the concat -demuxer method as described here https://trac.ffmpeg.org/wiki/Concatenate#samecodec but because the default option for the copy command is to select one video and one audio stream, my output file of course contains only one video and one audio stream. My input files have 1 video channel and 8 audio channels and I need the concatenated output file to be identical in this respect and also in the mapping of those channels which must be exactly the same order.
The documentation describes using the map command of stream copy to specify any options beyond the default behaviour but unfortunately the documentation for the map command is a bit opaque for me. I also wonder if there’s not something simpler than grappling with map command since my desired outcome is so simple given I only want to copy everything and have no desire to remap or re-encode any channels.
Anyone know what I need to do to make that happen?