[FFmpeg-user] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)
Paul B Mahol
onemda at gmail.com
Thu Sep 15 00:33:30 EEST 2022
On 9/14/22, Dan <twinbee42 at skytopia.com> wrote:
> On Wed, 14 Sep 2022 21:26:59 +0100, Carl Zwanzig <cpz at tuunq.com> wrote:
>> On 9/14/2022 8:01 AM, Paul B Mahol wrote:
>>> The reason of scale behavior is known and legacy.
>> Is it documented with the filter? I don't see anything obvious about it
>> https://ffmpeg.org/ffmpeg-filters.html#toc-scale-1, where can a person
>> about this otherwise-known behavior?
> To be fair, Paul did suggest the use of the zscale filter instead of using
> I actually managed to get the line to run in the end. I just needed to put
> "zscale=w=-1:h=-1" bit at the end like this:
> ffmpeg.exe -i "input.bmp" -crf 0 -vcodec libx264 -t 5 -y "output.mp4" -vf
> Unfortunately, I'm still getting the same darkening problem. The second mp4
> is darker
> than the first.
> Even tried using Michael's direct colour technique combined with zscale:
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x576 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1 -t 5 -y "576.mp4"
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1 -t 5 -y "578.mp4"
> Again, no luck. Second is darker.
> Unless I'm somehow misusing zscale (which is a possibility), it would seem
> as if the
> problem lies elsewhere.
If you do not use format filter after zscale it will not work correctly.
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user