Converting a H264 MXF to a H264 MOV with "-vcodec copy" results in mov unreadable by QuickTime
|Reported by:||Arnaud||Owned by:|
|Version:||git-master||Keywords:||mxf h264 regression|
|Blocking:||Reproduced by developer:||yes|
|Analyzed by developer:||no|
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.
Change History (14)
comment:4 by , 7 years ago
|Keywords:||mxf h264 regression added|
|Priority:||normal → important|
|Reproduced by developer:||set|
|Status:||new → open|
|Version:||2.5.7 → git-master|