[FFmpeg-user] FFmpeg unable to copy subtitles due to 'unsupported codec'?

Aahan Krish krish at aahan.me
Fri Nov 27 17:03:08 CET 2015


Hi Henk,

> AFAIK you should tell ffmpeg which streams you want. Not the ones to disregard.
> And for every Stream what it should do with it.
> To get only 0.1 and 0.2 AC3 and h264
> ffmpeg -i file.mp4 c:v copy -c:a copy -map 0:2 -map 0:1 file-out.mp4

Like I said I need all streams (video, audio, subtitles, cover art)
except the first audio stream. And yes I've tried the explicit
commands too, like:

    ffmpeg -i file.mp4 -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5
-codec copy file-out.mp4

    ffmpeg -i file.mp4 -codec copy -map 0:1 -map 0:2 -map 0:3 -map 0:4
-map 0:5 file-out.mp4

    ffmpeg -i file.mp4 -c:v copy -c:a copy -c:s copy -map 0:1 -map 0:2
-map 0:3 -map 0:4 -map 0:5 file-out.mp4

I get the same error.

In addition to that, I noticed some other errors/warnings in the
console output before the final error message:

    [mp4 @ 0x2645420] Codec for stream 0 does not use global headers
but container format requires global headers
    [mp4 @ 0x2645420] Codec for stream 1 does not use global headers
but container format requires global headers
    [mp4 @ 0x2645420] Codec for stream 2 does not use global headers
but container format requires global headers
    [mp4 @ 0x2645420] Codec for stream 3 does not use global headers
but container format requires global headers
    [mp4 @ 0x2645420] Codec for stream 4 does not use global headers
but container format requires global headers
    [mp4 @ 0x2645420] track 2: could not find tag, codec not currently
supported in container

But then if the container doesn't support things this way, how is
Apple able to do it? There must be a way to force ffmpeg to do what I
want, right?


More information about the ffmpeg-user mailing list