[FFmpeg-trac] #2260(ffmpeg:new): FFmpeg doesn't auto-select subtitle codec for MP4

FFmpeg trac at avcodec.org
Sat Apr 8 17:11:09 EEST 2017

#2260: FFmpeg doesn't auto-select subtitle codec for MP4
             Reporter:  slhck       |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  ffmpeg
              Version:  git-master  |               Resolution:
             Keywords:  mov         |               Blocked By:  1845
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |

Comment (by domifm):

 I'm having a similar issue when trying to convert mkv container to mp4
 without re-encoding.

 An example file has the following streams:

 Input #0, matroska,webm, from 'input.mkv':
     CREATION_TIME   : 2017-04-08T10:54:24Z
     ENCODER         : Lavf57.7.2
   Duration: 00:22:23.34, start: 0.000000, bitrate: 964 kb/s
     Chapter #0:0: start 0.033000, end 1343.300000
       title           : Chapter 1
     Stream #0:0: Video: h264 (High), yuv420p(tv,
 smpte170m/smpte170m/bt709, progressive), 704x480 [SAR 8:9 DAR 176:135],
 SAR 182:205 DAR 4004:3075, 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc
     Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
       title           : English
     Stream #0:2(eng): Subtitle: dvd_subtitle, 720x480
     Stream #0:3(eng): Subtitle: ass

 The command line I'd like to use fails with the following error:

 ffmpeg -i input.mkv -map 0 -codec copy output.mp4
 [mp4 @ 0x7fae14deed60] Could not find tag for codec ass in stream #3,
 codec not currently supported in container
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid argument

 It seems to work mostly with the following command line, but I have to
 manually specify the codec for that stream:

 ffmpeg -i input.mkv -map 0 -codec copy -codec:3 mov_text output.mp4

 It would be nice if ffmpeg would realize that the appropriate output codec
 for that subtitle track is mov_text.

Ticket URL: <https://trac.ffmpeg.org/ticket/2260#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list