I am curious about how to use FFmpeg in order to extract the first frame of the first video stream from a multi-video stream file. What I have so far is:
ffmpeg -i {mediaFile} -ss 0 -map 0:v -vframes 1 -f image2 firstFrame.jpeg
.
I am not sure about the -map
part. How can be certain that I work on the first video stream? Is there a way to first filter streams by codec type, then select the first and then extract the frame?
Thanks.