[FFmpeg-trac] #4820(avformat:new): Converting a H264 MXF to a H264 MOV with "-vcodec copy" results in mov unreadable by QuickTime

FFmpeg trac at avcodec.org
Tue Sep 1 16:26:22 CEST 2015


#4820: Converting a H264 MXF to a H264 MOV with "-vcodec copy" results in mov
unreadable by QuickTime
----------------------------------+----------------------------------
             Reporter:  Arnaud    |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  2.5.7
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+----------------------------------
 Summary of the bug:

 Using ffmpeg 2.5 (but doesn't work either with 2.6, 2.7 nor master)

 How to reproduce:
 {{{
 %./ffmpeg -i h264_vid.mxf -vcodec copy  test.mov
 }}}

 Video is readable by most players (totem, VLC) but not Quicktime, which
 reports the following errors:
 "chroma_format_idc too large for high profile" and "invalid H264 profile
 122 and/or level 4.1"

 Not using "-vcodec copy" results in a video readable by Quicktime, but
 with very poor quality.

 The problem seems to be that in
 avformat_open_input / mxf_read_header / mxf_parse_structural_metadata, we
 call "ff_generate_avci_extradata" if codec is H264, which uses a default
 set of extradata that Quicktime doesn't support AFAICT.

 In avformat_find_stream_info, we actually find some (correct) extradata,
 but we don't set them because st->codec->extradata isn't NULL (already set
 in avformat_open_input), here:
 {{{
 if (st->parser && st->parser->parser->split && !st->codec->extradata)
 }}}

 As a workaround, when using ffmpeg's lib, removing the extra data between
 avformat_open_input call and avformat_find_stream_info fixes the issue.

 I don't have a workaround when using command line.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4820>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list