Opened 3 years ago

Closed 14 months ago

#2345 closed enhancement (fixed)

Detect unusual j2k in mxf

Reported by: jrousseau Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: mxf j2k
Cc: nicoinattendu@gmail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
I try to convert a DCP video file to jpg pictures.
I used this command :
ffmpeg -ss 0 -vlowres 2 -i malcolm-tsr-enfr_01.mxf -t 725 -q:v 0.9 jpg/output%06d.jpg

This message occurs :
[mxf @ 000000000241a640] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 000000000241a640] Could not find codec parameters for stream 0 (Video: no
ne, 1998x1080): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
malcolm-tsr-enfr_01.mxf: could not find codec parameters

This command works with all others DCP video files.

How to reproduce:

% ffmpeg -ss 0 -vlowres 2 -i malcolm-tsr-enfr_01.mxf -t 725 -q:v 0.9 jpg/output%06d.jpg
ffmpeg version
ffmpeg version N-50442-g4f0d4ac
built on Mar  2 2013 15:30:48 with gcc 4.7.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avis
ynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable
-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm
 --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libope
ncore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libs
chroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtw
olame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil      52. 17.103 / 52. 17.103
libavcodec     54. 92.100 / 54. 92.100
libavformat    54. 63.102 / 54. 63.102
libavdevice    54.  3.103 / 54.  3.103
libavfilter     3. 41.100 /  3. 41.100
libswscale      2.  2.100 /  2.  2.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  2.100 / 52.  2.100

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

patchmxfj2k.diff (1.2 KB) - added by cehoyos 3 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 Changed 3 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Priority changed from critical to wish
  • Type changed from defect to enhancement
  • Version set to git-master

Please post the complete, uncut console output (not an extract) and please provide a sample.

comment:2 Changed 3 years ago by jrousseau

This is the complete console output :

ffmpeg version N-50442-g4f0d4ac Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar  2 2013 15:30:48 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.102 / 54. 63.102
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mxf @ 00000000023fa640] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 00000000023fa640] Could not find codec parameters for stream 0 (Video: no
ne, 1998x1080): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
malcolm-tsr-enfr_01.mxf: could not find codec parameters

I cannot provide sample file, because of the rights of use of the video file. Sorry.

Last edited 3 years ago by cehoyos (previous) (diff)

comment:3 Changed 3 years ago by cehoyos

Does it work with any older version of FFmpeg?

comment:4 Changed 3 years ago by jrousseau

No, it does not work.

comment:5 Changed 3 years ago by cehoyos

  • Keywords mxf j2k added
  • Resolution set to needs_more_info
  • Status changed from new to closed

Please reopen this ticket if you can provide a sample.

comment:6 Changed 3 years ago by jrousseau

I got a sample file, bu I cannot add to this ticket (bigger as 2MB)
How can I provide you this file ?

comment:7 Changed 3 years ago by jrousseau

  • Resolution needs_more_info deleted
  • Status changed from closed to reopened

comment:8 follow-up: Changed 3 years ago by cehoyos

Either upload the sample to http://www.datafilehost.com/ or consider reading http://ffmpeg.org/bugreports.html

comment:9 in reply to: ↑ 8 Changed 3 years ago by cehoyos

Replying to cehoyos:

Either upload the sample to http://www.datafilehost.com/ or consider reading http://ffmpeg.org/bugreports.html

Please note that there is no hard filesize limit.

comment:10 Changed 3 years ago by jrousseau

Upload in progress.
Note that the sample file is a "only black" file.
But the error occurs with this file.

I'll tell you when upload is done.

comment:11 Changed 3 years ago by jrousseau

Version 0, edited 3 years ago by jrousseau (next)

comment:12 Changed 3 years ago by cehoyos

The console output looks different here: Are you sure that you uploaded the exact file that you tested (and provided console output) above?

comment:13 Changed 3 years ago by jrousseau

effectively, it's not the same error ...
I cannot provide other sample because of the terms of use of this files.

Can you provide me any command I can do to identify the issue ?

Thanks.

comment:14 Changed 3 years ago by jrousseau

I'm currently transferring a video for which I reproduce the problem.
It is being transferred, I will notify you when it becomes available.
Thanks

comment:15 Changed 3 years ago by jrousseau

Sample file avaible here : http://www.filehostfree.com/?d=513DF8BB1

Command and error code :

D:\FFMPEG\AUTRE_TEST\erreurjp2k\L-PALAISDUPRINTEMPS-10650-CAEN-ADV_F_FR-XX_51_2K
_2010_SEP>D:\FFMPEG\ffmpeg -ss 0 -vlowres 2 -i jp2k_ec22bdb5-5363-d449-b935-123e
76d63162_vid.mxf -t 300 -q:v 0.9 jpg/output%06d.jpg
ffmpeg version N-50442-g4f0d4ac Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar  2 2013 15:30:48 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.102 / 54. 63.102
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mxf @ 000000000209b180] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 000000000209b180] Could not find codec parameters for stream 0 (Video: no
ne, 1998x1080): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf: could not find codec paramete
rs

thanks in advance

Last edited 3 years ago by cehoyos (previous) (diff)

Changed 3 years ago by cehoyos

comment:16 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Reproduced by developer set
  • Status changed from reopened to open

I wonder if this is a valid mxf file...

$ ffmpeg -i jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf
ffmpeg version N-50652-g73b40e2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 12 2013 01:41:50 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
  libavutil      52. 19.100 / 52. 19.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 44.101 /  3. 44.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mxf @ 0x2c52a20] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 0x2c52a20] Could not find codec parameters for stream 0 (Video: none, 1998x1080): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf: could not find codec parameters
$ ffmpeg -loglevel debug -vcodec libopenjpeg -i jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf
ffmpeg version N-50652-g73b40e2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Mar 12 2013 01:41:50 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack --enable-libopenjpeg
  libavutil      52. 19.100 / 52. 19.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 44.101 /  3. 44.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libopenjpeg'.
Reading option '-i' ... matched as input file with argument 'jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libopenjpeg.
Successfully parsed a group of options.
Opening an input file: jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf.
[mxf @ 0x2029b40] Format mxf probed with size=2048 and score=100
[mxf @ 0x2029b40] "OPAtom" with 2 ECs - assuming OP1a
[mxf @ 0x2029b40] none: Universal Label: 00000000.0000.0000.00000000.00000000
[mxf @ 0x2029b40] File position before avformat_find_stream_info() is 16384
[mxf @ 0x2029b40] parser not found for codec jpeg2000, packets or times may be invalid.
    Last message repeated 1 times
[mxf @ 0x2029b40] All info found
[mxf @ 0x2029b40] File position after avformat_find_stream_info() is 16899
Input #0, mxf, from 'jp2k_ec22bdb5-5363-d449-b935-123e76d63162_vid.mxf':
  Metadata:
    timecode        : 00:00:00:00
  Duration: 00:00:12.50, start: 0.000000, bitrate: 129938 kb/s
    Stream #0:0, 1, 1/24: Video: jpeg2000, rgb48le (12 bpc), 1998x1080, 1/24, 24 tbr, 24 tbn, 24 tbc
Successfully opened the file.
At least one output file must be specified
Statistics: 69164 bytes read, 2 seeks

comment:17 Changed 3 years ago by jrousseau

It works successfull with the second command !
Thanks a lot for your help !

comment:18 follow-up: Changed 3 years ago by Buxiness

May be we can close this one ?
I think its also works with native decoder now also.
But sample is not avlble

comment:19 in reply to: ↑ 18 ; follow-up: Changed 3 years ago by cehoyos

Replying to Buxiness:

May be we can close this one ?
I think its also works with native decoder now also.

Decoding works with the native decoder but detection is not fixed yet.

But sample is not avlble

http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2345/

comment:20 in reply to: ↑ 19 ; follow-up: Changed 3 years ago by Buxiness

  • Cc nicoinattendu@gmail.com added

Replying to cehoyos:

Decoding works with the native decoder but detection is not fixed yet.

The sample looks like broken, with external tool (asdcplib) I have an error raised also. Origni of sample is a standard DCP MXF/jpeg2000 file, but maybe violently truncated

comment:21 in reply to: ↑ 20 Changed 3 years ago by cehoyos

Replying to Buxiness:

Replying to cehoyos:

Decoding works with the native decoder but detection is not fixed yet.

The sample looks like broken, with external tool (asdcplib) I have an error raised also. Origni of sample is a standard DCP MXF/jpeg2000 file, but maybe violently truncated

If possible, FFmpeg should also decode broken samples, iirc, Tomas confirmed to me that this sample should be supported.

comment:22 follow-up: Changed 3 years ago by Buxiness

Well okayn but for information asdcp-info returns

ile essence type is JPEG 2000 pictures, (300 edit units).
       ProductUUID: a1ed80d7-c157-6f4c-9b6b-03955342f5b9
    ProductVersion: 4.4.22
       CompanyName: Doremi Labs, Inc.
       ProductName: CineAsset
  EncryptedEssence: No
         AssetUUID: ec22bdb5-5363-d449-b935-123e76d63162
    Label Set Type: MXF Interop
Unknown PictureEssenceCoding UL value.
Program stopped on error.

asdscplib is often used in DCP creation world.

comment:23 in reply to: ↑ 22 Changed 3 years ago by cehoyos

Replying to Buxiness:

Well okayn but for information asdcp-info returns

ile essence type is JPEG 2000 pictures, (300 edit units).

This looks similar to what mxfdump shows afaict:

      ContainerDuration = 300
      EssenceContainer = MXF-GC JPEG-2000 Picture Mappings
      Codec = [060e2b34.0401.0109.04010202.03010103]

indicating the codec can be detected iiuc.

comment:24 Changed 2 years ago by cehoyos

  • Summary changed from Convert DCP video file to jpeg files to Detect unusual j2k in mxf

comment:25 Changed 14 months ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.