[FFmpeg-user] how to remove sawtooth effect caused by rotate and overaly filters

qw applemax82 at 163.com
Tue Sep 20 09:32:49 EEST 2022


Hi,


I use the following ffmpeg command to do some rotation effect on video stream:


ffmpeg -y -i video.mp4 -t 25 -vcodec libx264 -r 25 -preset medium -filter_complex "color=size=720x406:c=black[bg];[0:v]setpts=PTS-STARTPTS,format=yuva420p,rotate=25*PI/180:c=0x00000000:ow=rotw(25*PI/180):oh=roth(25*PI/180)[timeline_t0_c0];[bg][timeline_t0_c0]overlay=96:32:eof_action=pass[outv]" -filter_complex "[0:a]adelay=delays=0:all=1[timeline_t0_c0_a];[timeline_t0_c0_a]amix=1[outa]" -map "[outv]" -map "[outa]" -f mp4 rotation.out.mp4


sawtooth effect is noticeable at the overlay boundary between background and video images. I use one online video editor to do the same thing, i.e. https://www.online-image-editor.com/. There is no noticeable sawtooth effect. The video editor should do some special operation on the boundary.


how to remove sawtooth effect caused by rotate and overaly filters?


Thanks!


Regards


andrew


More information about the ffmpeg-user mailing list