ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=x='if(eq(mod(n\,100)\,0),100,x)':y='150'" -c:a copy -y output.mp4
按理來說,n如果為第50幀,那么mod(50,\100) 余數應該為 50,eq(50\,0)回傳的應該是0(false),即:會執行x = x,但是這里的x是什么呢?NAN?
這個該怎么改?
求大神~
uj5u.com熱心網友回復:
參考檔案的引數說明:https://ffmpeg.org/ffmpeg-filters.html#overlay-1x
y
Set the expression for the x and y coordinates of the overlaid video on the main video. Default value is "0" for both expressions. In case the expression is invalid, it is set to a huge value (meaning that the overlay will not be displayed within the output visible area).
x,y代表了水印位置的坐標位置。默認為0。如果運算式無效,會被設定為一個很大的數字(意味著水印會在可視區域以外而不會顯示了)
uj5u.com熱心網友回復:
那么這個怎么改?我看不錯哪里有問題誒~
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/54108.html
標籤:多媒體/流媒體開發
