mercredi 19 août 2020

Does FFMpeg random generates identical sequences of pseudo-random numbers for consecutive executions?

For example if i execute command twice:

ffmpeg -i input.mp4 -vf geq=r='random(1)*255':g='random(1)*255':b='random(1)*255' -strict -2 output.mp4

for the same source file, i have identical output files. Why? I want to get different ouput files.

Testing configuration:

ffmpeg version 2.8.17-0ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609

I suppose that's because randomizer start value is identical. Does ffmepg have function like srand?

More specifically i want to add random noise just like this: noise=alls=20:allf=p+t+u. But if i try do so i got same noise for different executions on same input file.




Aucun commentaire:

Enregistrer un commentaire