Search code examples
videoffmpegframe-rateffmpeg-php

FFmpeg - Calculating with Framerate?


I have to cut my video exactly. This video could have 25fps or 30fps (i dont know). is there a Variable in ffmpeg for the framerate so i could calculate on which frame i had to Cut? I only have the seconds of my video. something like this (for example 80sec video):

vf "fade=in:0:12,fade=out:(80*r):12"

-vf "fade=in:0:12,fade=out:2500:12"

Solution

  • You can specify the fade in start time and duration time in addition to start frame and frame duration.

    -vf "fade=in:st=0.0:d=0.5,fade=out:st=75.5:d=0.5"