Discussion:
[FFmpeg-user] xyz12le Jpeg2000 MXF files in DCP now detected as rgb48le
Kieran O'Leary
2018-11-20 13:12:32 UTC
Permalink
Hi,

I remember that older versions of ffmpeg would detect a pix_fmt of xyz12le when a jpeg2000/MXF file from a DCP was passed as input. Now I see a value of: rgb48le(12 bpc, progressive)

Was this intentional, and if so, why did the behaviour change? I tried looking at the commit history for jpeg2000dec.c but couldn't find the answer..

You can find some sample DCPs here: https://www.charbon-studio.com/resources



$ ffmpeg -i video1.mxf

ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers

built with Apple LLVM version 8.0.0 (clang-800.0.42.1)

configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libtesseract --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3

libavutil 56. 14.100 / 56. 14.100

libavcodec 58. 18.100 / 58. 18.100

libavformat 58. 12.100 / 58. 12.100

libavdevice 58. 3.100 / 58. 3.100

libavfilter 7. 16.100 / 7. 16.100

libavresample 4. 0. 0 / 4. 0. 0

libswscale 5. 1.100 / 5. 1.100

libswresample 3. 1.100 / 3. 1.100

libpostproc 55. 1.100 / 55. 1.100

[mxf @ 0x7fee8c00c800] "OPAtom" with 2 ECs - assuming OP1a

Input #0, mxf, from 'video1.mxf':

Metadata:

uid : 0cabf88b-e592-4bd2-814a-8bc05c8f619d

generation_uid : ea6c96ea-bab7-40bf-be6d-2fb9e2154edd

company_name : OpenDCP

product_name : OpenDCP

product_version : 0.27.1

product_uid : 43059a1d-0432-4101-b83f-736815acf31d

modification_date: 2013-03-07T10:12:52.000000Z

application_platform: osx

material_package_umid: 0x060A2B340101010501010F20130000002602B03533D14F53A6A5569ABC47D86B

material_package_name: AS-DCP Material Package

timecode : 00:00:00:00

Duration: 00:00:12.50, start: 0.000000, bitrate: 95987 kb/s

Stream #0:0: Video: jpeg2000, rgb48le(12 bpc, progressive), 2048x858, SAR 1:1 DAR 1024:429, 24 tbr, 24 tbn, 24 tbc

Metadata:

file_package_umid: 0x060A2B340101010501010F2013000000E8211854E0EE480A84333AB990F30D15

file_package_name: File Package: SMPTE 429-4 frame wrapping of JPEG 2000 codestreams

track_name : Picture Track

At least one output file must be specified


Best,


Kieran.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-reques
Carl Eugen Hoyos
2018-11-21 00:39:01 UTC
Permalink
Post by Kieran O'Leary
I remember that older versions of ffmpeg would detect a pix_fmt of
xyz12le when a jpeg2000/MXF file from a DCP was passed as input.
Now I see a value of: rgb48le(12 bpc, progressive)
Was this intentional, and if so, why did the behaviour change?
Of course, it is our utmost desire to add as many regressions as
possible from one version to the next (we nowadays succeed more
than before).
Post by Kieran O'Leary
I tried looking at the commit history for jpeg2000dec.c but
couldn't find the answer..
(This file is unrelated to your issue, mentioning it made it much
more difficult for me to see the issue you have.)
Post by Kieran O'Leary
https://www.charbon-studio.com/resources
This doesn't look like a link to the file you tested.
(Yes, works fine here.)
Post by Kieran O'Leary
$ ffmpeg -i video1.mxf
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
Looks old and unsupported.

[after looking at the issue again, it may have been easier for you
to look at old and new console output:]
Post by Kieran O'Leary
--enable-libopenjpeg --disable-decoder=jpeg2000
I don't remember if this ever allowed xyz support, I thought
not, looking at the source code it may have worked, or you
may be able to force it, it is also possible that this is a
libopenjpeg regression, or that we misunderstood / abused
the api, I don't know / don't remember.
(Or you had to enable both decoders to get the correct
format with libopenjpeg, who knows...)

In any case, libopenjpeg is needed for some files, crashes
for others, is unneeded for the file from above link that I
tested and since DCP was the original reason for extending
our native decoder I wonder if libopenjpeg only makes
sense for non-DCP jpeg2000 files.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.
Kieran O Leary
2018-11-21 01:21:23 UTC
Permalink
Post by Carl Eugen Hoyos
Post by Kieran O'Leary
I remember that older versions of ffmpeg would detect a pix_fmt of
xyz12le when a jpeg2000/MXF file from a DCP was passed as input.
Now I see a value of: rgb48le(12 bpc, progressive)
Was this intentional, and if so, why did the behaviour change?
Of course, it is our utmost desire to add as many regressions as
possible from one version to the next (we nowadays succeed more
than before).
Post by Kieran O'Leary
I tried looking at the commit history for jpeg2000dec.c but
couldn't find the answer..
(This file is unrelated to your issue, mentioning it made it much
more difficult for me to see the issue you have.)
Post by Kieran O'Leary
https://www.charbon-studio.com/resources
This doesn't look like a link to the file you tested.
(Yes, works fine here.)
Sorry - This is the specific one I tested,
https://www.charbon-studio.com/get/dcps/CHARBON-INTEROP-24.zip, but I
think any of the test DCPs there should exhibit this.
Post by Carl Eugen Hoyos
Post by Kieran O'Leary
$ ffmpeg -i video1.mxf
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
Looks old and unsupported.
[after looking at the issue again, it may have been easier for you
to look at old and new console output:]
Post by Kieran O'Leary
--enable-libopenjpeg --disable-decoder=jpeg2000
Thanks Carl, this does indeed seem to be the issue. On my home Ubuntu
machine, the pix_fmt shows up as xyz12le on two different builds:
1) Basic ./configure && make with no openjpeg

./ffmpeg -i ~/Downloads/CHARBON-INTEROP-24/video1.mxf
ffmpeg version N-92498-g77bf85515e Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration:
libavutil 56. 23.101 / 56. 23.101
libavcodec 58. 39.100 / 58. 39.100
libavformat 58. 22.100 / 58. 22.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 @ 0x55d4cd31e5c0] "OPAtom" with 2 ECs - assuming OP1a
Input #0, mxf, from '/home/kieranjol/Downloads/CHARBON-INTEROP-24/video1.mxf':
Metadata:
uid : 0cabf88b-e592-4bd2-814a-8bc05c8f619d
generation_uid : ea6c96ea-bab7-40bf-be6d-2fb9e2154edd
company_name : OpenDCP
product_name : OpenDCP
product_version : 0.27.1
product_uid : 43059a1d-0432-4101-b83f-736815acf31d
modification_date: 2013-03-07T10:12:52.000000Z
application_platform: osx
material_package_umid:
0x060A2B340101010501010F20130000002602B03533D14F53A6A5569ABC47D86B
material_package_name: AS-DCP Material Package
timecode : 00:00:00:00
Duration: 00:00:12.50, start: 0.000000, bitrate: 95987 kb/s
Stream #0:0: Video: jpeg2000 (JPEG 2000 digital cinema 2K),
xyz12le(progressive), 2048x858, SAR 1:1 DAR 1024:429, 24 tbr, 24 tbn,
24 tbc
Metadata:
file_package_umid:
0x060A2B340101010501010F2013000000E8211854E0EE480A84333AB990F30D15
file_package_name: File Package: SMPTE 429-4 frame wrapping of
JPEG 2000 codestreams
track_name : Picture Track
At least one output file must be specified


2) A version of ffmpeg that I compiled with openjpeg, but with the
internal ffmpeg decoder enabled.

$ ffmpeg -i Downloads/CHARBON-INTEROP-24/video1.mxf
ffmpeg version N-92384-g70463b7 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --prefix=/home/kieranjol/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags=-I/home/kieranjol/ffmpeg_build/include
--extra-ldflags=-L/home/kieranjol/ffmpeg_build/lib
--extra-libs='-lpthread -lm' --bindir=/home/kieranjol/bin --enable-gpl
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-nonfree --enable-libopenjpeg
libavutil 56. 23.101 / 56. 23.101
libavcodec 58. 39.100 / 58. 39.100
libavformat 58. 22.100 / 58. 22.100
libavdevice 58. 6.100 / 58. 6.100
libavfilter 7. 43.100 / 7. 43.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mxf @ 0x5634c02ef040] "OPAtom" with 2 ECs - assuming OP1a
Input #0, mxf, from 'Downloads/CHARBON-INTEROP-24/video1.mxf':
Metadata:
uid : 0cabf88b-e592-4bd2-814a-8bc05c8f619d
generation_uid : ea6c96ea-bab7-40bf-be6d-2fb9e2154edd
company_name : OpenDCP
product_name : OpenDCP
product_version : 0.27.1
product_uid : 43059a1d-0432-4101-b83f-736815acf31d
modification_date: 2013-03-07T10:12:52.000000Z
application_platform: osx
material_package_umid:
0x060A2B340101010501010F20130000002602B03533D14F53A6A5569ABC47D86B
material_package_name: AS-DCP Material Package
timecode : 00:00:00:00
Duration: 00:00:12.50, start: 0.000000, bitrate: 95987 kb/s
Stream #0:0: Video: jpeg2000 (JPEG 2000 digital cinema 2K),
xyz12le(progressive), 2048x858, SAR 1:1 DAR 1024:429, 24 tbr, 24 tbn,
24 tbc
Metadata:
file_package_umid:
0x060A2B340101010501010F2013000000E8211854E0EE480A84333AB990F30D15
file_package_name: File Package: SMPTE 429-4 frame wrapping of
JPEG 2000 codestreams
track_name : Picture Track
At least one output file must be specified
Post by Carl Eugen Hoyos
I don't remember if this ever allowed xyz support, I thought
not, looking at the source code it may have worked, or you
may be able to force it, it is also possible that this is a
libopenjpeg regression, or that we misunderstood / abused
the api, I don't know / don't remember.
(Or you had to enable both decoders to get the correct
format with libopenjpeg, who knows...)
I'm thinking that this is the case. It looks like Homebrew disables
the native decoder by default nowadays.
https://github.com/Homebrew/homebrew-core/blob/master/Formula/ffmpeg.rb#L139
- so maybe I should address this issue with them, as perhaps this
isn't a great idea to disable this decoder.

I just enabled openjpeg/disabled the ffmpeg decoder and I now see rgb48le:

$ ./ffmpeg -i ~/Downloads/CHARBON-INTEROP-24/video1.mxf
ffmpeg version N-92384-g70463b7 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --prefix=/home/kieranjol/ffmpeg_build
--pkg-config-flags=--static
--extra-cflags=-I/home/kieranjol/ffmpeg_build/include
--extra-ldflags=-L/home/kieranjol/ffmpeg_build/lib
--extra-libs='-lpthread -lm' --bindir=/home/kieranjol/bin --enable-gpl
--enable-libass --enable-libfdk-aac --enable-libfreetype
--enable-libmp3lame --enable-libopus --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-nonfree --enable-libopenjpeg --disable-decoder=jpeg2000
libavutil 56. 23.101 / 56. 23.101
libavcodec 58. 39.100 / 58. 39.100
libavformat 58. 22.100 / 58. 22.100
libavdevice 58. 6.100 / 58. 6.100
libavfilter 7. 43.100 / 7. 43.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mxf @ 0x559be7708040] "OPAtom" with 2 ECs - assuming OP1a
Input #0, mxf, from '/home/kieranjol/Downloads/CHARBON-INTEROP-24/video1.mxf':
Metadata:
uid : 0cabf88b-e592-4bd2-814a-8bc05c8f619d
generation_uid : ea6c96ea-bab7-40bf-be6d-2fb9e2154edd
company_name : OpenDCP
product_name : OpenDCP
product_version : 0.27.1
product_uid : 43059a1d-0432-4101-b83f-736815acf31d
modification_date: 2013-03-07T10:12:52.000000Z
application_platform: osx
material_package_umid:
0x060A2B340101010501010F20130000002602B03533D14F53A6A5569ABC47D86B
material_package_name: AS-DCP Material Package
timecode : 00:00:00:00
Duration: 00:00:12.50, start: 0.000000, bitrate: 95987 kb/s
Stream #0:0: Video: jpeg2000, rgb48le(12 bpc, progressive),
2048x858, SAR 1:1 DAR 1024:429, 24 tbr, 24 tbn, 24 tbc
Metadata:
file_package_umid:
0x060A2B340101010501010F2013000000E8211854E0EE480A84333AB990F30D15
file_package_name: File Package: SMPTE 429-4 frame wrapping of
JPEG 2000 codestreams
track_name : Picture Track
Post by Carl Eugen Hoyos
In any case, libopenjpeg is needed for some files, crashes
for others, is unneeded for the file from above link that I
tested and since DCP was the original reason for extending
our native decoder I wonder if libopenjpeg only makes
sense for non-DCP jpeg2000 files.
Thanks so much for the detailed response Carl.

All the best,

Kieran.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with su
Carl Eugen Hoyos
2018-11-21 17:09:49 UTC
Permalink
Post by Kieran O Leary
2) A version of ffmpeg that I compiled with openjpeg, but with
the internal ffmpeg decoder enabled.
$ ffmpeg -i Downloads/CHARBON-INTEROP-24/video1.mxf
This will not use the libopenjpeg jpeg2000 decoder in any way.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request

Loading...