fellow programmers! Can someone explain ffmpeg's setpts option to me? I ate whole ffmpeg manual and googled a lot for 2 days, but I just can't understand, why setpts=PTS-2/TB sets 2 seconds offset at the beginning, but setpts=0.46*PTS makes video faster. Why the heck is it happening? How can single option set speed and offset at the same time? How ffmpeg knows, what should be set with the resulting number of expression 'PTS-2/TB' or '0.46*PTS'? And why video playing speed and offsetting is called presentation timestamp? I barely can understand, how presentation timestamp can be interpreted as offset, okay, but what's the deal with the speed? How to use and manage properly this setpts at all? Thank you very much
PTS is presentation timestamp, the time at which the frame ought to be presented i.e. shown.
If you divide each frame's timestamp by 2 (0 -> 0, 0.5 -> 0.25, 1 -> 0.5, 1.5 -> 0.75, 2 -> 1...), then you are running through the sequence of frames in half the time i.e at twice the speed. Similarly, if you add an offset, you delay or advance the display time of a frame.