Opened 6 years ago

Closed 6 years ago

#6994 closed enhancement (fixed)

EXR flag 4 not implemented, ffmpeg is not able to read exr files using the "long names" flag

Reported by: Orlando Esponda Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: exr
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug: EXR files using the "long names" flag are not recognized by ffmpeg nor ffprobe. This is a very common format for the vfx and 3d world and is supported if this flag is not being used, but most of the time, the user doesn't have control over how renderers and programs write the files. Most of the time this flag is hard coded.

How to reproduce: Easy, try to convert an exr file using this flag to any other format.

ffmpeg -report -v 9 -loglevel 99 -apply_trc iec61966_2_1 -start_number 0001 -i "/home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr" -c:v prores_ks -profile:v 0 -pix_fmt yuv444p10 -r 25 /home/oesponda/test_ffmpeg/out/test_ffmpeg.mov
ffmpeg version 3.3.6 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (GCC)

Full log report:

ffmpeg started on 2018-01-29 at 21:31:22
Report written to "ffmpeg-20180129-213122.log"
Command line:
ffmpeg -report -v 9 -loglevel 99 -apply_trc iec61966_2_1 -start_number 0001 -i "/home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr" -c:v prores_ks -profile:v 0 -pix_fmt yuv444p10 -r 25 /home/oesponda/test_ffmpeg/out/test_ffmpeg.mov
ffmpeg version 3.3.6 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags='-I/usr/include/nvenc ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libp  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-apply_trc' ... matched as AVOption 'apply_trc' with argument 'iec61966_2_1'.
Reading option '-start_number' ... matched as AVOption 'start_number' with argument '0001'.
Reading option '-i' ... matched as input url with argument '/home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'prores_ks'.
Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument '0'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv444p10'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '/home/oesponda/test_ffmpeg/out/test_ffmpeg.mov' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input url /home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr.
Successfully parsed a group of options.
Opening an input file: /home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr.
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0001.exr' for reading
[file @ 0x557cd5a67020] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5a672e0] Statistics: 1668767 bytes read, 0 seeks
[exr @ 0x557cd5a65840] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0002.exr' for reading
[file @ 0x557cd5a681e0] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5a68340] Statistics: 1665212 bytes read, 0 seeks
[exr @ 0x557cd5a65840] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0003.exr' for reading
[file @ 0x557cd5a6b980] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5a6ba40] Statistics: 1663079 bytes read, 0 seeks
[exr @ 0x557cd5a65840] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0004.exr' for reading
[file @ 0x557cd5a6c000] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5a6c160] Statistics: 1662434 bytes read, 0 seeks
[exr @ 0x557cd5a65840] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[image2 @ 0x557cd5a63ce0] Probe buffer size limit of 5000000 bytes reached
[image2 @ 0x557cd5a63ce0] decoding for stream 0 failed
[image2 @ 0x557cd5a63ce0] Could not find codec parameters for stream 0 (Video: exr, 1 reference frame, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2, from '/home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr':
  Duration: 00:00:00.40, start: 0.000000, bitrate: N/A
    Stream #0:0, 4, 1/25: Video: exr, 1 reference frame, none, 25 fps, 25 tbr, 25 tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: output url /home/oesponda/test_ffmpeg/out/test_ffmpeg.mov.
Applying option c:v (codec name) with argument prores_ks.
Applying option profile:v (set profile) with argument 0.
Applying option pix_fmt (set pixel format) with argument yuv444p10.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Successfully parsed a group of options.
Opening an output file: /home/oesponda/test_ffmpeg/out/test_ffmpeg.mov.
[file @ 0x557cd5a715c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 12 logical cores
Stream mapping:
  Stream #0:0 -> #0:0 (exr (native) -> prores (prores_ks))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0] flags 4cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0] flags 4flags 4cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[exr @ 0x557cd5a9bde0]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0005.exr' for reading
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5a71880] Statistics: 1662450 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0006.exr' for reading
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[AVIOContext @ 0x557cd5c2f6c0] Statistics: 1663455 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0] flags 4Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0007.exr' for reading
[exr @ 0x557cd5a9bde0]  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x557cd5c2f7e0] Statistics: 1665910 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0008.exr' for reading
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[AVIOContext @ 0x557cd5c2f8e0] Statistics: 1668241 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0009.exr' for reading
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[AVIOContext @ 0x557cd5c2f9e0] Statistics: 1671346 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[image2 @ 0x557cd5a63ce0] Opening '/home/oesponda/test_ffmpeg/test_ffmpeg.0010.exr' for reading
[file @ 0x557cd5c275a0] Setting default whitelist 'file,crypto'
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[AVIOContext @ 0x557cd5c2fae0] Statistics: 1673684 bytes read, 0 seeks
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[exr @ 0x557cd5a9bde0] flags 4 is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
Error while decoding stream #0:0: Not yet implemented in FFmpeg, patches welcome
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.
Finishing stream 0:0 without any data written to it.
Nothing was written into output file 0 (/home/oesponda/test_ffmpeg/out/test_ffmpeg.mov), because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (/home/oesponda/test_ffmpeg/test_ffmpeg.%04d.exr):
  Input stream #0:0 (video): 10 packets read (16664578 bytes); 0 frames decoded; 
  Total: 10 packets (16664578 bytes) demuxed
Output file #0 (/home/oesponda/test_ffmpeg/out/test_ffmpeg.mov):
  Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes); 
  Total: 0 packets (0 bytes) muxed
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
0 frames successfully decoded, 1 decoding errors
[AVIOContext @ 0x557cd5a71780] Statistics: 0 seeks, 0 writeouts
Conversion failed!

log report file generated by ffmpeg: https://drive.google.com/open?id=1fJYRjgkk_KI2FXsjvnp8kyflSlonZXi5

10 frames sequence for testing: https://drive.google.com/open?id=1oxRRh9PpFUL9WZ0kwM5-n-CEFOFNQAoa

Attachments (3)

ffmpeg-20180129-213122.log (11.7 KB ) - added by Orlando Esponda 6 years ago.
test_ffmpeg.0001.exr (1.6 MB ) - added by Carl Eugen Hoyos 6 years ago.
sample_ffmpeg_test.exr (3.7 KB ) - added by Orlando Esponda 6 years ago.
Tiny exr for testing 16x32

Download all attachments as: .zip

Change History (11)

by Orlando Esponda, 6 years ago

Attachment: ffmpeg-20180129-213122.log added

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegavcodec
Priority: normalwish
Reproduced by developer: set
Status: newopen
Type: defectenhancement
Version: 3.3.6git-master

For future tickets: Please remember to always test current FFmpeg git head before reporting an issue.

Patch sent.

by Carl Eugen Hoyos, 6 years ago

Attachment: test_ffmpeg.0001.exr added

comment:2 by mvignali, 6 years ago

@oesponda :
Can you generate and send a very small sample (in order to add it to fate tests (ffmpeg unit testing) ?

comment:3 by Carl Eugen Hoyos, 6 years ago

Why don’t you use any of the existing samples?

in reply to:  3 ; comment:4 by mvignali, 6 years ago

Replying to cehoyos:

Why don’t you use any of the existing samples?

do you mean existing fate samples ? or samples already provide in this ticket ?

in reply to:  2 ; comment:5 by Orlando Esponda, 6 years ago

Replying to mvignali:

@oesponda :
Can you generate and send a very small sample (in order to add it to fate tests (ffmpeg unit testing) ?

I can generate extra samples if you need them, just wondering why the provided samples aren't useful (the ones at the bottom of the ticket). Any particular spec I should take in account? (size, number of frames, depth, etc)

Last edited 6 years ago by Orlando Esponda (previous) (diff)

in reply to:  5 comment:6 by mvignali, 6 years ago

Replying to oesponda:

Replying to mvignali:

@oesponda :
Can you generate and send a very small sample (in order to add it to fate tests (ffmpeg unit testing) ?

I can generate extra samples if you need them, just wondering why the provided samples aren't useful (the ones at the bottom of the ticket). Any particular spec I should take in account? (size, number of frames, depth, etc)

Like the problem here is only for the header of the exr file, the test will be mainly for this part (the decoding of zip16 is ok and already tested). So i think only one frame (similar to your test scene, with a resolution of 16x32 pixels for example, is enough (in zip16 compression). It make unit testing faster.

in reply to:  4 comment:7 by Carl Eugen Hoyos, 6 years ago

Replying to mvignali:

Replying to cehoyos:

Why don’t you use any of the existing samples?

do you mean existing fate samples ? or samples already provide in this ticket ?

I meant you can flip the bit in an existing file but a tiny new sample is even better.

by Orlando Esponda, 6 years ago

Attachment: sample_ffmpeg_test.exr added

Tiny exr for testing 16x32

comment:8 by mvignali, 6 years ago

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