[FFmpeg-user] expressions in -bsf

Mark Filipak markfilipak.imdb at gmail.com
Fri May 31 23:55:40 EEST 2024


On 31/05/2024 16.31, David Ing via ffmpeg-user wrote:
> 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.

Thanks, David,

It was the case: "pts" must be in capitals. This:
   -bsf setts=pts='if(eq(PTS\,504223732)\,504219978\,PTS)'
worked (I think -- it's still running).

Thanks again
--Mark.





More information about the ffmpeg-user mailing list