[FFmpeg-user] FFMPEG & Panasonic OP-1B MXF decode issue

jeffrey.k.smith at thomsonreuters.com jeffrey.k.smith at thomsonreuters.com
Thu Mar 9 12:24:38 EET 2017


Hi,

First time post so apologies if I break any etiquette rules!

We are trying to use FFMPEG to transcode video shot on a broadcast Panasonic camera that encodes to P2 Long GOP (OP-1B) MXF files. Each file contains a video stream, a couple of data timecode streams and four discreet, mono audio streams. Whenever we ask FFMPEG to process this file, it doesn’t seem to be able to identify all the streams correctly. For example, even if we don’t try to do any encoding at all, we see the following:

========================

ffmpeg -i 085FV4BR.MXF
ffmpeg version N-82629-g9955123 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid
  libavutil      55. 41.101 / 55. 41.101
  libavcodec     57. 66.107 / 57. 66.107
  libavformat    57. 58.100 / 57. 58.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 67.100 /  6. 67.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[mxf @ 0x7fd3ab002600] material track 3: no corresponding source track found
[mxf @ 0x7fd3ab002600] material track 4: no corresponding source track found
[mxf @ 0x7fd3ab002600] could not resolve material track strong ref
[mxf @ 0x7fd3ab002600] index entry 49 + TemporalOffset 1 = 50, which is out of bounds
[mxf @ 0x7fd3ab002600] IndexSID 101 starts at EditUnit 50 - seeking may not work as expected
[mxf @ 0x7fd3ab002600] index entry 0 + TemporalOffset -2 = -2, which is out of bounds
[mxf @ 0x7fd3ab002600] index entry 49 + TemporalOffset 1 = 50, which is out of bounds
[mxf @ 0x7fd3ab002600] IndexSID 101 starts at EditUnit 50 - seeking may not work as expected
[mxf @ 0x7fd3ab002600] index entry 0 + TemporalOffset -2 = -2, which is out of bounds
[mxf @ 0x7fd3ab002600] index entry 49 + TemporalOffset 1 = 50, which is out of bounds
[mxf @ 0x7fd3ab002600] IndexSID 101 starts at EditUnit 50 - seeking may not work as expected
[mxf @ 0x7fd3ab002600] index entry 0 + TemporalOffset -2 = -2, which is out of bounds
[mxf @ 0x7fd3ab002600] index entry 49 + TemporalOffset 1 = 50, which is out of bounds
[mxf @ 0x7fd3ab002600] IndexSID 101 starts at EditUnit 50 - seeking may not work as expected
[mxf @ 0x7fd3ab002600] index entry 0 + TemporalOffset -2 = -2, which is out of bounds
[mxf @ 0x7fd3ab002600] index entry 49 + TemporalOffset 1 = 50, which is out of bounds
[mxf @ 0x7fd3ab002600] got 30 index tables - only the first one (IndexSID 101) will be used
[mxf @ 0x7fd3ab002600] error getting stream index 385942017
    Last message repeated 49 times
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Guessed Channel Layout for Input Stream #0.5 : mono
Input #0, mxf, from '085FV4BR.MXF':
  Metadata:
    uid             : 49299363-f360-4654-a7b9-6901b73b9a46
    generation_uid  : cb55f1a6-46ca-4ca0-b98b-25d7d82ec736
    company_name    : Panasonic
    product_name    : P2
    product_version : 3.0
    product_uid     : 060e2b34-0401-0108-0e0e-010101010001
    modification_date: 2017-02-17T06:48:17.000000Z
    material_package_umid: 0x060A2B340101010501010D4313000000AA601646017805E7008045822D4B0053
    material_package_name: BART0897
    timecode        : 07:49:06:23
  Duration: 00:00:09.24, start: 0.000000, bitrate: 15308 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 12.50 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      file_package_umid: 0x060A2B34010101050101064313000000AA601646017805E8008045822D4B0053
    Stream #0:1: Data: none
    Metadata:
      file_package_umid: 0x060A2B340101010501010C4313000000AA601646017805E8008045822D4B0053
      data_type       : data
    Stream #0:2: Data: none
    Metadata:
      file_package_umid: 0x060A2B34010101050101084313000000AA601646017805E8008045822D4B0053
      data_type       : audio
    Stream #0:3: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      file_package_umid: 0x060A2B34010101050101084313000000AA601646017805E9008045822D4B0053
    Stream #0:4: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      file_package_umid: 0x060A2B34010101050101084313000000AA601646017805EA008045822D4B0053
    Stream #0:5: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      file_package_umid: 0x060A2B34010101050101084313000000AA601646017805EB008045822D4B0053
At least one output file must be specified

========================

You can see that it finds:
Stream 0: Video
Stream 1: Data
Stream 2: Data
Stream 3: Audio
Stream 4: Audio
Stream 5: Audio

However, it’s missing one audio stream and I’m assuming it’s related to the message “error getting stream index 385942017” earlier in the output. If we try to do the transcode, we end up with audio being encoded that appears to be a concatenation of all 4 audio streams no matter how we try to use ‘-map’ to extract a single audio stream e.g. ffmpeg –I 085FV4BR.MXF –map 0:0 –c:v h264 –b:v 12M –flags +ildct+ilme+mv4 –top 1 –map 0:3 –c:a aac –b:a 256k –ac 2 –ar 48k –f mp4 –y out.mp4


By way of comparison, we’ve used both ‘MXF Inspect’ and ‘MediaInfo’ to interrogate the file and see all streams correctly. Here’s the output from MediaInfo:

========================

085FV4BR.MXF
General
Complete name                            : 085FV4BR.MXF
Format                                   : MXF
Format version                           : 1.3
Format profile                           : OP-1b
Format settings                          : Closed / Complete
File size                                : 16.9 MiB
Duration                                 : 9 s 240 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 15.3 Mb/s
Package name                             : BART0897
Encoded date                             : 2017-02-17 06:48:17.000
Writing application                      : Panasonic P2 3.0

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Format settings, GOP                     : M=3, N=24
Format settings, wrapping mode           : Frame
Codec ID                                 : 0D01030102106001-0401020201314001
Duration                                 : 9 s 240 ms
Bit rate mode                            : Variable
Bit rate                                 : 12.2 Mb/s
Maximum bit rate                         : 18.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Standard                                 : Component
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type, store method                  : Separated fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.236
Stream size                              : 13.5 MiB (80%)
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 3
Format                                   : PCM
Format settings, Endianness              : Little
Codec ID                                 : 0D01030102060B00
Duration                                 : 9 s 240 ms
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 866 KiB (5%)
Locked                                   : Yes

Audio #2
ID                                       : 4
Format                                   : PCM
Codec ID                                 : 0D01030102060B00
Duration                                 : 9 s 240 ms
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 866 KiB (5%)
Locked                                   : Yes

Audio #3
ID                                       : 5
Format                                   : PCM
Codec ID                                 : 0D01030102060B00
Duration                                 : 9 s 240 ms
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 866 KiB (5%)
Locked                                   : Yes

Audio #4
ID                                       : 6
Format                                   : PCM
Codec ID                                 : 0D01030102060B00
Duration                                 : 9 s 240 ms
Bit rate                                 : 768 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 866 KiB (5%)
Locked                                   : Yes

Other #1
ID                                       : 1-Material
Type                                     : Time code
Format                                   : MXF TC
Time code of first frame                 : 07:49:06:23
Time code settings                       : Material Package
Time code, striped                       : Yes

Other #2
ID                                       : 1-Source
Type                                     : Time code
Format                                   : MXF TC
Time code of first frame                 : 07:49:06:23
Time code settings                       : Source Package
Time code, striped                       : Yes

========================

So my best guess is there’s a bug somewhere in mxfdec.c when it’s working against OP-1B content. But does anyone have any other ideas about what’s going on?

Again, apologies for the ultra long message but very grateful for any input!

Best Regards,
Jeff.

________________________________

This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.<http://site.thomsonreuters.com/site/disclosures/>


More information about the ffmpeg-user mailing list