I'm trying to extract frames from a variable framerate video every 5 seconds and get the exact timestamps of each frame extracted. This is what I have so so far:
-i inputfile -vstats_file vstats.log -vsync 2 -vcodec png -r 0.2 -f image2pipe -
And this is what I get:
frame= 1 q= 0.0 f_size= 136261 s_size= 133kB **time= 5.000** br= 218.0kbits/s avg_br= 218.0kbits/s type= I
frame= 2 q= 0.0 f_size= 139382 s_size= 269kB **time= 10.000** br= 223.0kbits/s avg_br= 220.5kbits/s type= I
frame= 3 q= 0.0 f_size= 141631 s_size= 407kB **time= 15.000** br= 226.6kbits/s avg_br= 222.5kbits/s type= I
I need the exact timestamp of the frame that was used for extraction, so I can later accurately cut the video based on thumbnails generated.
Also, is there a way to print vstats to stdout rather than a file?