#7931 closed enhancement (fixed)
exr conversion fails
Reported by: | p0las | 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:
some exrs fail to convert (possibly data window related)
How to reproduce:
ffmpeg -y -i "attached.exr" -loglevel error -frames:v 1 -q:v 2 -vf "scale=300:300:force_original_aspect_ratio=decrease" "aaa.jpg"
ffmpeg started on 2019-05-30 at 14:03:00 Report written to "ffmpeg-20190530-140300.log" Command line: ffmpeg -y -i W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr -loglevel error -frames:v 1 -q:v 2 -vf "scale=300:300:force_original_aspect_ratio=decrease" c:/temp/aaaaa.jpg -report ffmpeg version N-93944-gd903c09d9a Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.1 (GCC) 20190414 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt libavutil 56. 28.100 / 56. 28.100 libavcodec 58. 52.102 / 58. 52.102 libavformat 58. 27.103 / 58. 27.103 libavdevice 58. 7.100 / 58. 7.100 libavfilter 7. 54.101 / 7. 54.101 libswscale 5. 4.101 / 5. 4.101 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Splitting the commandline. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-i' ... matched as input url with argument 'W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'error'. Reading option '-frames:v' ... matched as option 'frames' (set the number of frames to output) with argument '1'. Reading option '-q:v' ... matched as option 'q' (use fixed quality scale (VBR)) with argument '2'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=300:300:force_original_aspect_ratio=decrease'. Reading option 'c:/temp/aaaaa.jpg' ... matched as output url. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option loglevel (set logging level) with argument error. Applying option report (generate a report) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr. Successfully parsed a group of options. Opening an input file: W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr. [NULL @ 000001b7d572b1c0] Opening 'W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr' for reading [file @ 000001b7d572c340] Setting default whitelist 'file,crypto' [exr_pipe @ 000001b7d572b1c0] Format exr_pipe probed with size=2048 and score=51 [exr_pipe @ 000001b7d572b1c0] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1 [exr_pipe @ 000001b7d572b1c0] parser not found for codec exr, packets or times may be invalid. [exr_pipe @ 000001b7d572b1c0] parser not found for codec exr, packets or times may be invalid. [exr @ 000001b7d573e8c0] line order: 0. [exr @ 000001b7d573e8c0] Wrong or missing size information. [exr_pipe @ 000001b7d572b1c0] Probe buffer size limit of 5000000 bytes reached [exr_pipe @ 000001b7d572b1c0] Stream #0: not enough frames to estimate rate; consider increasing probesize [exr_pipe @ 000001b7d572b1c0] decoding for stream 0 failed [exr_pipe @ 000001b7d572b1c0] Could not find codec parameters for stream 0 (Video: exr, rgb48le): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [exr_pipe @ 000001b7d572b1c0] After avformat_find_stream_info() pos: 6967195 bytes read:6967195 seeks:0 frames:1 Input #0, exr_pipe, from 'W:/COSMOS_3894/_Shots/311/311-60-010/comp/breakdown/PreComp/311-60-010_comp_breakdown_v0001/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr': Duration: N/A, bitrate: N/A Stream #0:0, 1, 1/25: Video: exr, rgb48le, 25 tbr, 25 tbn, 25 tbc Successfully opened the file. Parsing a group of options: output url c:/temp/aaaaa.jpg. Applying option frames:v (set the number of frames to output) with argument 1. Applying option q:v (use fixed quality scale (VBR)) with argument 2. Applying option vf (set video filters) with argument scale=300:300:force_original_aspect_ratio=decrease. Successfully parsed a group of options. Opening an output file: c:/temp/aaaaa.jpg. Successfully opened the file. detected 12 logical cores Stream mapping: Stream #0:0 -> #0:0 (exr (native) -> mjpeg (native)) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [exr @ 000001b7d5735300] line order: 0. [exr @ 000001b7d5735300] Wrong or missing size information. Error while decoding stream #0:0: Invalid data found when processing input cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [Parsed_scale_0 @ 000001b7d57f21c0] Setting 'w' to value '300' [Parsed_scale_0 @ 000001b7d57f21c0] Setting 'h' to value '300' [Parsed_scale_0 @ 000001b7d57f21c0] Setting 'force_original_aspect_ratio' to value 'decrease' [Parsed_scale_0 @ 000001b7d57f21c0] Setting 'flags' to value 'bicubic' [Parsed_scale_0 @ 000001b7d57f21c0] w:300 h:300 flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'video_size' to value '0x0' [buffer @ 000001b7d57f2500] Unable to parse option value "0x0" as image size [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'pix_fmt' to value '35' [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'time_base' to value '1/25' [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 000001b7d57f2400] Setting 'frame_rate' to value '25/1' [buffer @ 000001b7d57f2500] Unable to parse option value "0x0" as image size [buffer @ 000001b7d57f2500] Error setting option video_size to value 0x0. [graph 0 input from stream 0:0 @ 000001b7d57f2400] Error applying options to the filter. Error reinitializing filters! Error while filtering: Invalid argument Finishing stream 0:0 without any data written to it. [Parsed_scale_0 @ 000001b7d57f25c0] Setting 'w' to value '300' [Parsed_scale_0 @ 000001b7d57f25c0] Setting 'h' to value '300' [Parsed_scale_0 @ 000001b7d57f25c0] Setting 'force_original_aspect_ratio' to value 'decrease' [Parsed_scale_0 @ 000001b7d57f25c0] Setting 'flags' to value 'bicubic' [Parsed_scale_0 @ 000001b7d57f25c0] w:300 h:300 flags:'bicubic' interl:0 [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'video_size' to value '0x0' [buffer @ 000001b7d57f38c0] Unable to parse option value "0x0" as image size [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'pix_fmt' to value '35' [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'time_base' to value '1/25' [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 000001b7d57edd00] Setting 'frame_rate' to value '25/1' [buffer @ 000001b7d57f38c0] Unable to parse option value "0x0" as image size [buffer @ 000001b7d57f38c0] Error setting option video_size to value 0x0. [graph 0 input from stream 0:0 @ 000001b7d57edd00] Error applying options to the filter. Error configuring filter graph [AVIOContext @ 000001b7d572cd40] Statistics: 6967195 bytes read, 0 seeks Conversion failed!
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | exr added |
Priority: | normal → wish |
Reproduced by developer: | set |
Status: | new → open |
Type: | defect → enhancement |
Version: | 4.1 → git-master |
The following does not fix decoding:
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 0f8b0fda9f..9f7a068028 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -134,8 +134,8 @@ typedef struct EXRContext { const AVPixFmtDescriptor *desc; int w, h; - uint32_t xmax, xmin; - uint32_t ymax, ymin; + int32_t xmax, xmin; + int32_t ymax, ymin; uint32_t xdelta, ydelta; int scan_lines_per_block; @@ -1735,8 +1735,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, if (s->xmin > s->xmax || s->ymin > s->ymax || s->xdelta != s->xmax - s->xmin + 1 || - s->xmax >= s->w || - s->ymax >= s->h) { + s->xmax > s->w || + s->ymax > s->h) { av_log(avctx, AV_LOG_ERROR, "Wrong or missing size information.\n"); return AVERROR_INVALIDDATA; }
comment:3 by , 4 years ago
Resolution: | → worksforme |
---|---|
Status: | open → closed |
Checked with multiple implementations. Current FFmpeg lavc version decodes file correctly.
comment:4 by , 4 years ago
Resolution: | worksforme → fixed |
---|
Fixed by Mark Reid in 1c094563fe93cfe0e8b5632efa7b2c6c26b3f205
Note:
See TracTickets
for help on using tickets.
file too big to attach so I uploaded it here:
http://nopixels.net/tmp/311-60-010_comp_breakdown_v0001_marslayer011.1001.exr.zip