Advertisement
Guest User

overlaying time/frame accurate

a guest
Nov 19th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. - extracting all frames from time 03:32 to 03:35 to get the "point of interest" timing:
  2.  
  3. $ ffmpeg -ss 00:03:32 -i in.mkv -vf fps=29.970628 -t 3 out_%d.png
  4.  
  5. the point of interest happens at frame number 50, then the timing is: 03:(33+(50 / 29.970628)) = 00:03:34.668
  6.  
  7. then overlaying the picture from 2 points of interest like this:
  8.  
  9. $ ffmpeg -i in.mkv -i in.png -filter_complex "[0:v]scale=768:-1[scaled];[scaled][1:v]overlay=enable='between(t,3*60+34.670,3*60+39.630)'" -t 220 test8.mkv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement