#11020(ffmpeg:new): Invalid color range error on ffmpeg 7.0
#11020: Invalid color range error on ffmpeg 7.0 --------------------------------+------------------------------------- Reporter: Marius | Type: defect Status: new | Priority: important Component: ffmpeg | Version: 7.0 Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | --------------------------------+------------------------------------- **Summary of the bug:** I'm trying to transcode a video with h264, but I've also tried h265 having the same output. **How to reproduce:** {{{ ffmpeg -i https://vid.connatix.com/mmid-545c8cbb- f0f5-119b-2687-29df00ef32c7/original.mp4 -c:v libx264 -c:a aac output.mp4 }}} **ffmpeg version:** {{{ any 7.0 build }}} **Platform:** {{{ windows, mac and linux }}} **Output:** {{{ [graph 0 input from stream 0:0 @ 0x6000005fc420] Invalid color range [vf#0:0 @ 0x6000000ff9f0] Error reinitializing filters! [vf#0:0 @ 0x6000000ff9f0] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0x6000000ff9f0] Terminating thread with return code -22 (Invalid argument) [vost#0:0/libx264 @ 0x12fe11870] Could not open encoder before EOF [vost#0:0/libx264 @ 0x12fe11870] Task finished with error code: -22 (Invalid argument) [vost#0:0/libx264 @ 0x12fe11870] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0x6000007fc000] Nothing was written into output file, because at least one of its streams received no packets. }}} I've also tried specifying `-color_primaries 1`, `-color_trc 1` and `-colorspace 1` with no success. This error is not reproducible on any of the mentioned platforms when using ffmpeg version 6.1. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 -----------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -----------------------------------+---------------------------------- Comment (by Balling): -color_range tv -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 -----------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -----------------------------------+---------------------------------- Comment (by Marius): Even with `-color_range tv` ffmpeg fails with the same error for this particular video. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) * keywords: => regression Comment: ͏ "-color_range" alike may be as both input/output options? ͏ See also: https://trac.ffmpeg.org/wiki/colorspace#color_primaries -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by Balling): Color_range does not really work as input option https://trac.ffmpeg.org/ticket/3326#comment:3 -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by MasterQuestionable): ͏ Thanks for the notice. ͏ [/wiki/colorspace#color_primaries ͏"color_primaries"] related things are sort of tricky in FFmpeg: ͏ May work, may not, may not as intended... and difficult to tell. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by Balling): Can be fixed with {{{ ffmpeg.exe -i https://vid.connatix.com/mmid-545c8cbb- f0f5-119b-2687-29df00ef32c7/original.mp4 -bsf:v h264_metadata=colour_primaries=1:transfer_characteristics=1:matrix_coefficients=1 -c copy -colorspace 1 -color_trc 1 -color_primaries 1 cxdasca.mp4 }}} Even just ffplay.exe https://vid.connatix.com/mmid-545c8cbb- f0f5-119b-2687-29df00ef32c7/original.mp4 reproduces this. I found the issue: yuv420p(tv, reserved, progressive), so colorspace is set to reserved. Indeed, 00023A video_full_range_flag: 0 (0x0) - (1 bits) - Limited 00023A colour_description_present_flag (3 bytes) 00023A colour_description_present_flag: Yes 00023A colour_primaries: 3 (0x03) - (8 bits) - 00023B transfer_characteristics: 3 (0x03) - (8 bits) - 00023C matrix_coefficients: 3 (0x03) - (8 bits) - By looking into ITU-T H.273 all three of those are Reserved (For future use by ITU-T | ISO/IEC) also see: https://www.reddit.com/r/ffmpeg/comments/1cqzgc4/ffmpeg_fails_to_encode_in_a... -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by Marius): Greate findings and thank you for the workaround! Is there any chance that ffmpeg 7.0 will implement the same fallback as 6.1 does so it works out of the box with reserved colorspace? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by Balling):
there any chance that ffmpeg 7.0 will implement the same fallback
At the very least limited range BS warning should be fixed, of course. This is very bad, I imagine, hahaha. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by gamer191): I did a bisect, and the commit which caused this "regression" was https://github.com/FFmpeg/FFmpeg/commit/dcc7263b0e7935b6864e43465cfeca423bdf... In case that link ever breaks, here's another video with the same problem: https://video.twimg.com/ext_tw_video/1714039111487496192/pu/vid/avc1/1280x72... (from https://x.com/Gloria_Sweety/status/1714039259944870294) -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11020: Invalid color range error on ffmpeg 7.0 ------------------------------------+---------------------------------- Reporter: Marius | Owner: (none) Type: defect | Status: new Priority: important | Component: ffmpeg Version: 7.0 | Resolution: Keywords: regression | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+---------------------------------- Comment (by gamer191): Replying to [comment:8 Balling]:
At the very least limited range BS warning should be fixed, of course.
That got fixed at some point, btw. The warning is now "Invalid color space", as opposed to "Invalid color range" -- Ticket URL: <https://trac.ffmpeg.org/ticket/11020#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg