I see in the CSV file with have a "PlayTime(s)" column. I suspect that is the time in the video where I should grab a still and then the data in that CSV row will be valid for it.
I found some info on extracting a still image at a specific time here: https://trac.ffmpeg.org/wiki/Seeking
But maybe I don't want that? Maybe I want to use the "Frame Index" column instead? https://stackoverflow.com/a/20411464
I have the CSV 20180714-16.28.03.csv
I'm starting at row 400
- PlayTime(s): 11.73
- Frame Index: 251
export FILENAME=20180714-162803.ts
export TIME_INDEX=795.515
ffmpeg -ss $TIME_INDEX -i $FILENAME -frames:v 1 time_$TIME_INDEX.jpg
export FILENAME=20180714-162803.ts
export FRAME_INDEX=251
ffmpeg -i $FILENAME -vf "select=gte(n\,$FRAME_INDEX)" -vframes 1 frame_$FRAME_INDEX.png
hmmm... this didn't work at all. Produced no png files.... "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)"
ffprobe explanations: https://stackoverflow.com/questions/2017843/fetch-frame-count-with-ffmpeg
Good stuff here: https://www.bugcodemaster.com/article/extract-images-frame-frame-video-file-using-ffmpeg
export FILENAME=20180714-162803.ts
export FPS=1
ffmpeg \
-i $FILENAME \
-vf fps=$FPS \
image_%03d.jpg
time ffmpeg \
-hide_banner \
-ss 0 \
-i $FILENAME \
-t 60 \
-q:v 1 \
-vf select="eq(pict_type\,PICT_TYPE_I)" \
-vsync 0 frame%03d.jpg
All of them?
time ffmpeg \
-hide_banner \
-i $FILENAME \
-q:v 0 \
-vf select="eq(pict_type\,PICT_TYPE_I)" \
-vsync 0 \
frame%03d.jpg
Removing -vsync to see what happens....
time ffmpeg \
-hide_banner \
-i $FILENAME \
-q:v 0 \
-vf select="eq(pict_type\,PICT_TYPE_I)" \
frame%03d.jpg