1

I was trying the same thing as this with two mkv, with the video from the first file and all the audio tracks and subtitles from the second file:

ffmpeg -i 1.mkv -i 2.mkv -map 0:v -map 1:a -map 1:s -c:v copy -c:a copy -c:s copy -shortest out.mkv

but it's not working, in output I have a file whith broken audio track, if I run it with VLC it seems ok until I skip forward or change audio track, everything I do will stop executing the audio track.

If I run VLC from terminal for some verbosity I obtain:

core decoder error: buffer deadlock prevented

Any idea?

-------Edit-------------------------------

I think the problem was with the subs, if I remove the subs everything works good. Is it possible that the "-shortest" option broke something because of the length of the subs?

tosto
  • 11
  • 2

1 Answers1

1

You need to prefix -map for each mapping. Use:

ffmpeg -i 1.mkv -i 2.mkv -map 0:v -map 1:a -map 1:s -c copy -shortest out.mkv

Although I'm guessing you may have just typed it incorrectly in your question so this may not be the solution to your actual issue.

llogan
  • 121,796
  • 28
  • 232
  • 243