Opened 5 years ago

Last modified 3 years ago

#7577 new defect

FFmpeg can't decode DCP SMPTE Timed Text subtitles within MXF

Reported by: kieranjol Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mxf
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
ffmpeg can't decode time text subtitles as found in DCP/MXF.
I'm am hoping to attach a file to this ticket, but if that fails, the subs mxf will be within this zipfile - https://www.charbon-studio.com/get/dcps/CHARBON-SMPTE-24.zip
How to reproduce:

./ffmpeg -i CHARBON-SMPTE-24/sub1_24.mxf 
ffmpeg version N-92540-g28c96c2ce2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: 
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 40.100 / 58. 40.100
  libavformat    58. 23.100 / 58. 23.100
  libavdevice    58.  6.100 / 58.  6.100
  libavfilter     7. 46.100 /  7. 46.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
[mxf @ 0x7f931a000000] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 0x7f931a000000] no essence
CHARBON-SMPTE-24/sub1_24.mxf: Invalid data found when processing input

Attachments (1)

sub1_24.mxf (360.7 KB ) - added by kieranjol 5 years ago.

Download all attachments as: .zip

Change History (9)

by kieranjol, 5 years ago

Attachment: sub1_24.mxf added

comment:1 by kieranjol, 5 years ago

As an aside, I should point out that these subtitles are not terribly well supported even in digital cinema servers/projectors. The INTEROP XML subtitles seem to have universal support, and these SMPTE subtitles don't seem to work at all with older systems.

comment:2 by Carl Eugen Hoyos, 5 years ago

Component: undeterminedavformat
Keywords: mxf added
Version: unspecifiedgit-master

comment:3 by Tomas Härdin, 5 years ago

mxfdump says there are some ULs in this file that it doesn't know about, but smpte-ra.org does:

  • 060e2b34.0253.0101.0d010101.01016400 DCTimedTextDescriptor
  • 060e2b34.0253.0101.0d010101.01016500 DCTimedTextResourceSubDescriptor
  • 060e2b34.0205.0101.0d010201.01031100 GenericStreamPartition

The latest DCP spec is freely available, but I don't have S429-5 (SMPTE 429-5 D-Cinema Packaging - Timed Text Track File) in my archives, which DCI claims is what defines these KLVs. Telling mxfdump to attempt to parse dark metadata yields some more clues, and a copy of S429-5 can probably be found if I dig some more

Is getting at the XML inside enough, or do you also need it decoded/transcoded to some other subtitle format?

comment:4 by kieranjol, 5 years ago

I really don't know what would be best. I think getting access to the XML is probably enough for now. With Interop DCP XML, I usually just run a script that turns the subs into SRT anyhow. Thanks for looking into this.

comment:5 by Tomas Härdin, 5 years ago

It seems I spoke a bit too soon, the only XML is in the header partition. The body partition seems to contain font data and some kind of data that looks random-ish. Is the file encrypted?

comment:6 by kieranjol, 5 years ago

It is not encrypted as far as I can tell.. The audio and image within that DCP (link in first post) are not encrypted anyhow..

comment:7 by Tomas Härdin, 5 years ago

Right, yes. There's JPEG2000 and wave audio descriptors in there, which only become apparent with mxfdump in verbose mode. I was looking at the subtitle file only, which explains some things.

The audio file has some problems decoding, the video file decodes fine.

I've poked at mxfdec.c to get it to parse the body partition in the subtitle file, and gotten a hold of most related specs. I could probably implement this, but it isn't the kind of thing I do for free. If you're interested, privmsg me on IRC (thardin on freenode) or send an email to tomas at haerdin dot se

Last edited 5 years ago by Tomas Härdin (previous) (diff)

comment:8 by Balling, 3 years ago

The SMPTE 429-5-2009 standard was leaked by wikileaks and is available on sci-hub using its DOI.

Note: See TracTickets for help on using tickets.