[FFmpeg-trac] #9811(undetermined:new): filter 'zscale=transfer=linear' fails with "code 2050: active window must be positive"
FFmpeg
trac at avcodec.org
Mon Jun 13 03:03:44 EEST 2022
#9811: filter 'zscale=transfer=linear' fails with "code 2050: active window must
be positive"
-------------------------------------+-------------------------------------
Reporter: rminnema | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
zimg,zscale,transfer |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
I have a .webm recorded from PS5 gameplay of Horizon Forbidden West. The
file was recorded from HDR output although it doesn't have proper HDR
metadata, but its color primaries are BT.2020 and transfer characteristics
PQ. The video is thus washed out and oversaturated on SDR displays.
Therefore I'm using ffmpeg to tone map the videos to something that looks
acceptable in SDR.
When I try to do so using the options '-vf
zscale=transfer=linear,tonemap=hable,zscale=transfer=bt709', ffmpeg exits
with the error "[Parsed_zscale_0 @ 000002486a8a5680] code 2050: active
window must be positive". The resulting output file is 0 bytes in size.
How to reproduce:
{{{
ffmpeg started on 2022-06-12 at 20:01:29
Report written to "ffmpeg-20220612-200129.log"
Log level: 48
Command line:
"d:\\programs\\bin\\ffmpeg.exe" -report -i ".\\sample.webm" -vf
"zscale=transfer=linear,tonemap=hable,zscale=transfer=bt709" -map 0:v
test.mkv
ffmpeg version N-107098-g4d45f5acbd-ffmpeg-windows-build-helpers Copyright
(c) 2000-2022 the FFmpeg developers
built with gcc 10.2.0 (GCC)
configuration: --pkg-config=pkg-config --pkg-config-flags=--static
--extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-
debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-
prefix=/home/robert/ffmpeg-windows-build-
helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
--enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig
--enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-
libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-
libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-
libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-libvmaf
--enable-libsrt --enable-libxml2 --enable-opengl --enable-li libavutil
57. 26.100 / 57. 26.100
libavcodec 59. 33.100 / 59. 33.100
libavformat 59. 24.100 / 59. 24.100
libavdevice 59. 6.100 / 59. 6.100
libavfilter 8. 40.100 / 8. 40.100
libswscale 6. 6.100 / 6. 6.100
libswresample 4. 6.100 / 4. 6.100
libpostproc 56. 5.100 / 56. 5.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-i' ... matched as input url with argument
'.\sample.webm'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with
argument 'zscale=transfer=linear,tonemap=hable,zscale=transfer=bt709'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0:v'.
Reading option 'test.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url .\sample.webm.
Successfully parsed a group of options.
Opening an input file: .\sample.webm.
[NULL @ 0000022fb552a180] Opening '.\sample.webm' for reading
[file @ 0000022fb552a800] Setting default whitelist 'file,crypto,data'
[matroska,webm @ 0000022fb552a180] Format matroska,webm probed with
size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 0000022fb552a180] Before avformat_find_stream_info() pos:
631 bytes read:32768 seeks:0 nb_streams:2
[vp9 @ 0000022fb5541fc0] Format yuv420p10le chosen by get_format().
[opus @ 0000022fb5542780] skip 120/960 samples
[matroska,webm @ 0000022fb552a180] All info found
[matroska,webm @ 0000022fb552a180] After avformat_find_stream_info() pos:
342493 bytes read:375013 seeks:0 frames:2
Input #0, matroska,webm, from '.\sample.webm':
Metadata:
ENCODER : Lavf59.24.100
Duration: 00:00:03.00, start: -0.003000, bitrate: 18546 kb/s
Stream #0:0, 1, 1/1000: Video: vp9 (Profile 2), yuv420p10le(pc,
bt2020nc/bt2020/smpte2084), 1920x1088, SAR 967:960 DAR 967:544, 59.94 fps,
59.94 tbr, 1k tbn (default)
Metadata:
DURATION : 00:00:03.002000000
Stream #0:1, 1, 1/1000: Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
DURATION : 00:00:03.000000000
Successfully opened the file.
Parsing a group of options: output url test.mkv.
Applying option vf (set video filters) with argument
zscale=transfer=linear,tonemap=hable,zscale=transfer=bt709.
Applying option map (set input stream mapping) with argument 0:v.
Successfully parsed a group of options.
Opening an output file: test.mkv.
[file @ 0000022fb55e7580] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 32 logical cores
Stream mapping:
Stream #0:0 -> #0:0 (vp9 (native) -> h264 (libx264))
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)
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)
[vp9 @ 0000022fb5544f40] Format yuv420p10le chosen by get_format().
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)
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)
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)
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)
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)
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)
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_zscale_0 @ 0000022fb567b140] Setting 'transfer' to value 'linear'
[Parsed_tonemap_1 @ 0000022fb5611ec0] Setting 'tonemap' to value 'hable'
[Parsed_zscale_2 @ 0000022fb55f4c00] Setting 'transfer' to value 'bt709'
[graph 0 input from stream 0:0 @ 0000022fb5592980] Setting 'video_size' to
value '1920x1088'
[graph 0 input from stream 0:0 @ 0000022fb5592980] Setting 'pix_fmt' to
value '62'
[graph 0 input from stream 0:0 @ 0000022fb5592980] Setting 'time_base' to
value '1/1000'
[graph 0 input from stream 0:0 @ 0000022fb5592980] Setting 'pixel_aspect'
to value '967/960'
[graph 0 input from stream 0:0 @ 0000022fb5592980] Setting 'frame_rate' to
value '19001/317'
[graph 0 input from stream 0:0 @ 0000022fb5592980] w:1920 h:1088
pixfmt:yuv420p10le tb:1/1000 fr:19001/317 sar:967/960
[format @ 0000022fb5590d40] Setting 'pix_fmts' to value
'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0000022fb8a26100] query_formats: 6 queried, 5 merged, 0
already done, 0 delayed
[Parsed_zscale_0 @ 0000022fb567b140] picking gbrpf32le out of 2
ref:yuv420p10le alpha:0
[Parsed_zscale_2 @ 0000022fb55f4c00] picking yuv444p10le out of 9
ref:gbrpf32le alpha:0
[Parsed_zscale_0 @ 0000022fb567b140] code 2050: active window must be
positive
[Parsed_zscale_0 @ 0000022fb567b140] code 2050: active window must be
positive
Error while filtering: Generic error in an external library
Failed to inject frame into filter network: Generic error in an external
library
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0000022fb5544200] Statistics: 0 bytes written, 0 seeks, 0
writeouts
[AVIOContext @ 0000022fb5547940] Statistics: 723207 bytes read, 0 seeks
Conversion failed!
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9811>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list