[FFmpeg-user] expressions in -bsf

David Ing ding at panopto.com
Fri May 31 23:31:46 EEST 2024

How do I do the equivalent of this:

   pts = pts==504223732 ? 504219978 : pts;

in '-bsf' in Windows? I can't figure it out.

I've tried:

-bsf setts=pts='eq(pts\,504223732)504219978'
-bsf setts=pts='if(eq(pts\,504223732)\,504219978\,pts)'
-bsf 'if(eq(pts\,504223732),setts=pts=504219978)'


It is probably a bug.  In my codebase, we observed that the following
statement was not working as of ffmpeg 4.3 or 4.4:

-bsf:v setts=pts='if(eq(N,0),0,PTS)'

We were able to use this workaround:

-bsf:v setts=pts='not(not(N))*PTS'

You might need to search for another type of workaround for your
expression, I hope you find one.

More information about the ffmpeg-user mailing list