I feel like this should be so simple but I just can't find any way to do it. I simply want to grab the opening frame of a video file and output it as a PNG within a filter-complex command.
I can do this using the following command in isolation although I get a warning:
ffmpeg -y -i infile -frames:v 1 output.png
[image2 @ 0000020bbf053640] The specified filename 'output.png' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 0000020bbf053640] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
How do I incorporate the same outcome in a filter-complex function?
I have used the following crop command:
ffmpeg -y -i input.mp4 -filter_complex "[0]crop=iw:ih[grab]" -map [grab] "out.png"
and although I do get the required output, I get warning/error which I'd rather not get:
[image2 @ 000002a9089c1280] The specified filename 'out.png' does not contain an image sequence pattern or a pattern is invalid.
[image2 @ 000002a9089c1280] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
[image2 @ 000002a9089c1280] Cannot write more than one file with the same name. Are you missing the -update option or a sequence pattern? av_interleaved_write_frame(): Invalid argument
Error muxing a packet for output file #0