Opened 12 years ago
Last modified 11 years ago
#2653 reopened enhancement
DCP-compatible output with libopenjpeg encoder
Reported by: | Sulio Pulev | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | undetermined |
Version: | git-master | Keywords: | libopenjpeg j2k xyz |
Cc: | nicoinattendu@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
How to reproduce:
% ffmpeg" -i sample.h264 -vf crop=iw:ih-2*138,scale=2048:858,lutrgb=gammaval(2.6) -pix_fmt yuv444p12le -vcodec libopenjpeg -profile 1 -cinema_mode 1 "decoded/test_%6d.j2c
ffmpeg version N-53885-gf97e28e
built on gcc windows 7 64 bit by Zeranoe
The problem is:
- I have no see any gamma change in picture. 26 is high value for gamma and thisd can be very visible.
- libopenjpeg do not receive or do not execute the follow option "-profile 1" with above command line should be expected converting of h264 video to sequence of JPEG2000 images with digital cinema standard. testing jpeg2000 images after, show that they are NOT digital cinema compliant. My testing tools cannot say why but absolutely sure say that they are not digital cinema compliant. libopenjpeg itself used with another programs (for example image_to_j2c or OpenDCP do well conversion exactly on DCI specifications for jpeg2000 for digital cinema. I guess that avoptions are not sent corectly to openjpeg. For example "-profile" command are not specific for libopenjpeg, its not "private" command only for libopenjpeg and may be ffmpeg do not pass this option to libopenjpeg. Also explanation of AVoptions generally is ambiguous and is hard to understand how exactly are used such options. ffmpeg -h codecs=libopenjpeg do not do big thing due to lack of details. Also I do not understand who decide which pix_fmt should understand libopenjpeg, but original openjpeg understand xyz12le and in ffmpeg do not understand it,instead understand yuv444p12le this may be not so important because anyway xyz transformations is done before libopenjpeg encoding.
- I cannot understand why xyz12le is only input format , its make more sense to be more output format.
I attach an report file and you will see what I'm talking about. IF what is written in wiki is true then with this command we should have from some video file source,XYZ encoded,gammacorected jpeg2000 DCI compressed sequence of images, but for some reason its not happened.
Attachments (3)
Change History (20)
by , 12 years ago
Attachment: | ffmpeg-20130608-214631.log added |
---|
comment:1 by , 12 years ago
Keywords: | j2k xyz added; AVoptions removed |
---|---|
Priority: | normal → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
Could you point me to the place where the wiki claims that FFmpeg supports DCinema output? (It does not.)
comment:2 by , 12 years ago
ffmpeg do not support digital cinema, but libopenjpeg (used by ffmpeg -hope without serious modifications) support it. Check the ffmpeg -h codec=libopenjpeg there are options dedicated to Dcinema.So, if you corectly pass libopenjpeg parameteres to it may it should work corectly. What is wrong?
follow-up: 4 comment:3 by , 12 years ago
Description: | modified (diff) |
---|
Could you test if reencoding the sample j2c_10db24e2-0c6f-4ca2-9af7-a90a3685a0d6__000000.j2c
from ticket #1279 works?
comment:4 by , 12 years ago
comment:5 by , 12 years ago
I dont know what reencoding of j2c mean. I trying to encode tiff in j2c or to decode videofile (h.264,xvid or whatever) in jpeg2000 sequence. Its encoded,but even if I write option to libopenjpeg in ffpeg commend line libopenjpeg do not encode in DCI complain format, libopenjpeg do that if used with another front application like image_to_j2c which is inckuded as sample in libopenjpeg package. For that reason Im afraid that ffmpeg do not pass corectly AVoption to libopenjpeg or libopenjpeg is not original one from OpenJPEG project and is modified in bad way.
I tested j2c files received from decoding using AVoptions but those files do not pass dci complians test. I guess that specially problem is "-profile" AVoption that may be is not interpreted like AVoption or interfere with ffmpeg "global" option.
May be also I dont know something "hidden" about options. May be you suggest me exact command line that decode h264 file to j2c sequence using libopenjpeg codec and using AVoption described in -h codec=libopenjpeg especially profile cinema2K and cinema_mode 2k_24.
Thank you
comment:6 by , 12 years ago
Does the file j2c_10db24e2-0c6f-4ca2-9af7-a90a3685a0d6__000000.j2c
from ticket #1279 pass the DCI compliance tests?
follow-up: 8 comment:7 by , 12 years ago
Yes, its passed, but as I understand this is j2c image taken from .mxf file created but some other utility may be OpenDCP or other, but not with ffmpeg using libopenjpeg and his AVoption.
If this picture is made with ffmpeg libopenjpeg or image2 filterwhat was option on command line?
comment:8 by , 12 years ago
Replying to sulio:
Yes, its passed, but as I understand this is j2c image taken from .mxf file created but some other utility may be OpenDCP or other, but not with ffmpeg using libopenjpeg and his AVoption.
You are correct but I believe it is a good source to test DCinema creation.
How does the image_to_j2c command line looks like that produces the intended images?
comment:9 by , 12 years ago
image_to_j2c.exe -i inputfile -o outputfile -cinema2K 24 (or -cinema4K or -cinema2K 48)
Image_to_j2c is just frontend to library.
Also another usage can be (for directory converting)
image_to_j2c.exe -ImgDir directory -OutFor format (j2c,jp2,j2k) -cinema2K 24 (or -cinema4K or -cinema2K 48)
In this case it convert all what is in directory without further interaction so with one command line - all directory converted
So ffmpeg should also pass AVoptions to libopenjpeg same way like image_to_j2c do.
comment:10 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The options you provide via command line to ffmpeg are invalid.
See output of:
ffmpeg -h encoder=libopenjpeg
follow-up: 12 comment:11 by , 12 years ago
I was unable to find any reference to image_to_j2c on the internet (except this ticket), did you mean image_to_j2k?
comment:12 by , 12 years ago
Replying to cehoyos:
I was unable to find any reference to image_to_j2c on the internet (except this ticket), did you mean image_to_j2k?
Yes ,its on openjpeg.org site or on openjpeg.googlecode.com its true image-to-j2k.
comment:13 by , 12 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:14 by , 12 years ago
Cc: | added |
---|
comment:15 by , 12 years ago
Did we will repair this bug?
I guess that this is not libopenjpe, but ffmpeg bug transfering AVoptions to libopenjpeg.
comment:16 by , 11 years ago
Could you test the following?
$ ffmpeg -i input -vcodec libopenjpeg -pix_fmt xyz12 -profile cinema2k -cinema_mode 2k_24 -s 2048x858 out%6d.j2c
comment:17 by , 11 years ago
Summary: | problem with libopenjpeg with some option → DCP-compatible output with libopenjpeg encoder |
---|
Replying to sulio:
% ffmpeg" -i sample.h264 -vf crop=iw:ih-2*138,scale=2048:858,lutrgb=gammaval(2.6) -pix_fmt yuv444p12le -vcodec libopenjpeg -profile 1 -cinema_mode 1 "decoded/test_%6d.j2c
The problem could be that -profile cinema2k
corresponds to -profile 3
report logs from ffmpeg