[FFmpeg-trac] #1294(undetermined:open): Support for Omneon AVC Intra 50/100 MXF OP1a files

FFmpeg trac at avcodec.org
Sat Sep 15 17:51:29 CEST 2012

#1294: Support for Omneon AVC Intra 50/100 MXF OP1a files
             Reporter:  Thomas       |                    Owner:
  Mundt                              |                   Status:  open
                 Type:  defect       |                Component:
             Priority:  normal       |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:  h264intra    |               Blocked By:
  mxf                                |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |

Comment (by reimar):

 So below patch will allow playing the AVCI100 file.
 If you try searching for the SPS/PPS you will see there is nothing similar
 in the original file, so as I suspected the problem is not that SPS/PPS
 exists only for the first file but that it does not exist at all in the
 However there are several issues
 1) It does not work for AVCI50, so that one uses different SPS/PPS which I
 don't know.
 2) I have no way to detect which files are actually AVC-Intra and which
 are normal files. Using this patch on normal files has a significant risk
 of breaking things. I also don't know how to properly distinguish AVCI50
 and AVCI100.
 3) This probably should be moved into common code, since the mov demuxer
 needs the same thing to play AVCI files.
 diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
 index 3ddeb99..d93910f 100644
 --- a/libavformat/mxfdec.c
 +++ b/libavformat/mxfdec.c
 @@ -1487,6 +1489,27 @@ static int mxf_parse_structural_metadata(MXFContext
          if (descriptor->extradata) {
              st->codec->extradata = descriptor->extradata;
              st->codec->extradata_size = descriptor->extradata_size;
 +        } else {
 +            static const uint8_t avc100extra[] = {
 +                // SPS
 +                0x00, 0x00, 0x00, 0x01, 0x67, 0x7a, 0x00, 0x29,
 +                0xb6, 0xd4, 0x20, 0x22, 0x33, 0x19, 0xc6, 0x63,
 +                0x23, 0x21, 0x01, 0x11, 0x98, 0xce, 0x33, 0x19,
 +                0x18, 0x21, 0x03, 0x3a, 0x46, 0x65, 0x6a, 0x65,
 +                0x24, 0xad, 0xe9, 0x12, 0x32, 0x14, 0x1a, 0x26,
 +                0x34, 0xad, 0xa4, 0x41, 0x82, 0x23, 0x01, 0x50,
 +                0x2b, 0x1a, 0x24, 0x69, 0x48, 0x30, 0x40, 0x2e,
 +                0x11, 0x12, 0x08, 0xc6, 0x8c, 0x04, 0x41, 0x28,
 +                0x4c, 0x34, 0xf0, 0x1e, 0x01, 0x13, 0xf2, 0xe0,
 +                0x3c, 0x60, 0x20, 0x20, 0x28, 0x00, 0x00, 0x03,
 +                // PPS
 +                0x00, 0x08, 0x00, 0x00, 0x03, 0x01, 0x94, 0x20,
 +                0x00, 0x00, 0x00, 0x01, 0x68, 0xce, 0x32, 0x48,
 +                0x90
 +            };
 +            st->codec->extradata = av_mallocz(sizeof(avc100extra) +
 +            memcpy(st->codec->extradata, avc100extra,
 +            st->codec->extradata_size = sizeof(avc100extra);
          if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
              source_track->intra_only = mxf_is_intra_only(descriptor);

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1294#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list