Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#4471 closed defect (fixed)

FFMPEG fails to find pix_fmt for MJ2 file

Reported by: PavelsM Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: j2k
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

ffmpeg.exe -i spot.mj2 -vcodec h264 spot.mp4

ffmpeg version N-71346-gdf4fca2 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc

--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl

e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib

libavutil 54. 22.101 / 54. 22.101
libavcodec 56. 34.100 / 56. 34.100
libavformat 56. 30.100 / 56. 30.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 13.101 / 5. 13.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

[jpeg2000 @ 02c0c8a0] Unknown pix_fmt, profile: 3, colour_space: 0, components:
3, precision: 12, cdx[1]: 2, cdy[1]: 1, cdx[2]: 2, cdy[2]: 1
[jpeg2000 @ 02c0c8a0] error during processing marker segment ff51
[jpeg2000 @ 02c0c8a0] Unknown pix_fmt, profile: 3, colour_space: 0, components:
3, precision: 12, cdx[1]: 2, cdy[1]: 1, cdx[2]: 2, cdy[2]: 1
[jpeg2000 @ 02c0c8a0] error during processing marker segment ff51

....

[mov,mp4,m4a,3gp,3g2,mj2 @ 02a964a0] decoding for stream 0 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 02a964a0] Could not find codec parameters for stream 0 (Video: jpeg2000 (JPEG 2000 digital cinema 2K) (mjp2 / 0x32706A6D), none, 1280x1110, 9924 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
spot.mj2: could not find codec parameters
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'spot.mj2':

Metadata:

major_brand : jpm
minor_version : 0
compatible_brands: mjp2mj2sjpm
creation_time : 2015-03-10 16:37:19

Duration: 00:00:03.00, start: 0.000000, bitrate: 21828 kb/s

Stream #0:0(eng): Video: jpeg2000 (JPEG 2000 digital cinema 2K) (mjp2 / 0x32

706A6D), none, 1280x1110, 9924 kb/s, 12.36 fps, 25.08 tbr, 1k tbn, 1k tbc (defau
lt)

Metadata:

creation_time : 2015-03-10 16:37:19
handler_name : video media track
encoder : Motion JPEG2000

While some old version of FFMPEG works correctly:
ffmpeg version N-44459-g8bdba0b Copyright (c) 2000-2012 the FFmpeg developers

built on Sep 14 2012 18:35:56 with gcc 4.7.1 (GCC)

....

Metadata:

major_brand : jpm
minor_version : 0
compatible_brands: mjp2mj2sjpm
creation_time : 2015-03-10 16:37:19

Duration: 00:00:03.00, start: 0.000000, bitrate: 21828 kb/s

Stream #0:0(eng): Video: jpeg2000 (mjp2 / 0x32706A6D), yuv422p12le, 1280x1110, 9924 kb/s, 12.36 fps, 25.08 tbr, 1k tbn, 1k tbc
Metadata:

creation_time : 2015-03-10 16:37:19
handler_name : video media track

Change History (6)

comment:2 Changed 5 years ago by cehoyos

  • Keywords j2k added; JPEG2000 PIX_FMT OPENJPEG removed

Please provide a daytime sample.

comment:4 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Thank you for the samples!

The regression you see is a duplicate of ticket #3619 - workarounds are to configure with --disable-decoder=jpeg2000 --enable-libopenjpeg or to use ffmpeg -vcodec libopenjpeg -i spot-day.mj2 to force the working decoder.

I keep the ticket open because the internal decoder fails badly even after fixing the pix_fmt. It also shows imo that the current implementation is wrong wrt dcinema profiles and pix_fmts.

comment:5 Changed 5 years ago by PavelsM

Hi, -vcodec libopenjpeg helped, thanks for the workaround.

comment:6 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in 5b2f9790e6eb8440b6ff470cc4b43b155726884b and the previous commit

Last edited 4 years ago by cehoyos (previous) (diff)
Note: See TracTickets for help on using tickets.