[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
>> at
>> https://ffmpeg.org/ffmpeg-filters.html#toc-scale-1, where can a person
>> find
>> about this otherwise-known behavior?
>
> To be fair, Paul did suggest the use of the zscale filter instead of using
> scale.
> I actually managed to get the line to run in the end. I just needed to put
> the
> "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
> zscale=w=-1:h=-1
>
> 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.
>
> Dan
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list