To retrieve all lossless frames, use
ffmpeg -i "$input_file" -f image2 "outdir/%05d.png"
If you prefer a different output format, just change .png; by default ffmpegwill output the file type from the extension.
The option -f image2tells ffmpegto write to a series of images. "outdir/%05d.png"gives the file name pattern, in this case " 5-digit frame number.png".
n , -r n "$input_file". ( , n .)
, Motion JPEG (mjpeg), :
ffmpeg -i "$input_file" -vcodec copy -f image2 "outdir/%05d.jpg"
, , , .
/ . ( image2).