[FFmpeg-user] FFmpeg unable to copy subtitles due to 'unsupported codec'?
Henk D. Schoneveld
belcampo at zonnet.nl
Fri Nov 27 16:37:40 CET 2015
On 27 Nov 2015, at 14:57, Aahan Krish <krish at aahan.me> wrote:
> I've got an mp4 file with these streams (via `ffmpeg -i file.mp4`):
> Stream #0.0(eng): Audio: aac, 48000 Hz, stereo, fltp, 125 kb/s (default)
> Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 384 kb/s
> Stream #0.2(eng): Video: h264 (Main), yuv420p, 1280x568, 4027
> kb/s, PAR 1:1 DAR 160:71, 23.98 fps, 2997 tbn, 50 tbc (default)
> Stream #0.3(eng): Subtitle: c608 / 0x38303663, 0 kb/s
> Stream #0.4(und): Subtitle: text / 0x74786574
> Stream #0.5: Video: mjpeg, yuvj420p, 667x1000 [PAR 72:72 DAR
> 667:1000], 90k tbn
> It's a movie that I downloaded from iTunes some time ago and am using
> it to learn encoding, remuxing, etc.
> Now I am trying to strip out the first audio stream from the file like
> so (otoh, I've also tried mapping each steam to be included):
> ffmpeg -i file.mp4 -map 0 -map -0:0 -codec copy file-out.mp4
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
> The problem is, I get this error:
> Could not write header for output file #0 (incorrect codec
> parameters ?): Operation not permitted
> So, I checked if something's wrong with the mp4 file itself:
> ffprobe file.mp4
> And the output says:
> Unsupported codec with id 0 for input stream 3
> Unsupported codec with id 94213 for input stream 4
> I have no idea what that means. (Apparently something's wrong with the
> 1. What's wrong?
> 2. Can I simply force ffmpeg to do what I asked of it (i.e. strip the
> audio stream & copy the rest as it is)? If so, how?
> OR isn't ffmpeg the tool for the task?
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user