ScipioAfricanus
ScipioAfricanus

Reputation: 1787

ffmpeg copying audio codec type while concating videos

I am using the following commands:

ffmpeg -i data/staging/0.mkv -i data/staging/1.mkv -map 0 -filter_complex concat=n=2:v=1:a=2 -threads 8.0 data/staging/concat.mkv -y -loglevel error

To combine 2 videos with 2 audio streams and -map 0 is used to maintain various other streams including multiple subs etc.

But the audio going in AAC and coming out the concat end seems to be voris? I am not sure why this occurs. Is there a way to maintain this?

The codecs for all input clips will be identical, ad they are split from the same video previously.

Upvotes: 0

Views: 148

Answers (1)

llogan
llogan

Reputation: 134173

  • If you do not tell ffmpeg which encoder you want to use it will choose a default encoder.

  • The default encoder depends on how your ffmpeg was configured. In your case the default encoder for MKV is libvorbis.

  • You can see the defaults with ffmpeg -h muxer=matroska.

  • Filtering requires re-encoding, so it is not possible to stream copy (like a copy and paste) the audio with -c:a copy.

  • You will have to manually provide the desired encoder name: -c:a aac.

Upvotes: 1

Related Questions