Opened 12 years ago

Closed 9 years ago

#2345 closed enhancement (fixed)

Detect unusual j2k in mxf

Reported by: Julien ROUSSEAU 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 Carl Eugen Hoyos 12 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 by Carl Eugen Hoyos, 12 years ago

Component: FFmpegundetermined
Priority: criticalwish
Type: defectenhancement
Version: git-master

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

comment:2 by Julien ROUSSEAU, 12 years ago

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 12 years ago by Carl Eugen Hoyos (previous) (diff)

comment:3 by Carl Eugen Hoyos, 12 years ago

Does it work with any older version of FFmpeg?

comment:4 by Julien ROUSSEAU, 12 years ago

No, it does not work.

comment:5 by Carl Eugen Hoyos, 12 years ago

Keywords: mxf j2k added
Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can provide a sample.

comment:6 by Julien ROUSSEAU, 12 years ago

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

comment:7 by Julien ROUSSEAU, 12 years ago

Resolution: needs_more_info
Status: closedreopened

comment:8 by Carl Eugen Hoyos, 12 years ago

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

in reply to:  8 comment:9 by Carl Eugen Hoyos, 12 years ago

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 by Julien ROUSSEAU, 12 years ago

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 by Julien ROUSSEAU, 12 years ago

File avaible : [deleted]

Last edited 12 years ago by Julien ROUSSEAU (previous) (diff)

comment:12 by Carl Eugen Hoyos, 12 years ago

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 by Julien ROUSSEAU, 12 years ago

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 by Julien ROUSSEAU, 12 years ago

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 by Julien ROUSSEAU, 12 years ago

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 12 years ago by Carl Eugen Hoyos (previous) (diff)

by Carl Eugen Hoyos, 12 years ago

Attachment: patchmxfj2k.diff added

comment:16 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavformat
Reproduced by developer: set
Status: reopenedopen

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 by Julien ROUSSEAU, 12 years ago

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

comment:18 by Nicolas Bertrand, 11 years ago

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

in reply to:  18 ; comment:19 by Carl Eugen Hoyos, 11 years ago

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/

in reply to:  19 ; comment:20 by Nicolas Bertrand, 11 years ago

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

in reply to:  20 comment:21 by Carl Eugen Hoyos, 11 years ago

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 by Nicolas Bertrand, 11 years ago

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.

in reply to:  22 comment:23 by Carl Eugen Hoyos, 11 years ago

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 by Carl Eugen Hoyos, 11 years ago

Summary: Convert DCP video file to jpeg filesDetect unusual j2k in mxf

comment:25 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.