

For example, in the left third, middle third and right third of the input box, we can use the command:įfmpeg -i input -vf crop=iw/3:ih:0:0 outputįfmpeg -i input -vf crop=iw/3:ih:iw/3:0 outputįfmpeg -i input -vf crop=iw/3:ih:iw/3*2:0 output (1) 裁剪 100x100 的区域,起点为(12,34).The value of x can be obtained from the value of y and vice versa.The value of ow can be obtained from oh and vice versa, but not from x and y, because these values are performed after ow and oh.If the optional keep_aspect parameter is used, the output SAR (sample aspect ratio) will be changed to compensate for the new DAR (display aspect ratio).

The default value of x is (iw-ow)/2, and the default value of y is (ih-oh)/2


ffmpeg -i -vf " drawbox= drawtext=fontsize=20:fontcolor=White:text='Test Line 1':x=(w*.75)+15:y=(h*.88)+15," -y C:/Users/Garrett/Desktop/video/test.mp4īelow is an example using GPU hardware acceleration from documentation. From the reference materials listed below, I have been unsuccessful in finding a way to do so, but I wanted to check with the community to see if there is are additional approaches.īelow is an example of drawtext and drawbox being used together. I am trying to find a way to use the drawbox and drawtext ffmpeg filters to overlay text onto video,and speed this process up using GPU acceleration.
