video – Invalid PNG signature FFmpeg

I am using FFmpeg to generate a video from a set of images in .png format.

I used the below command to extract the images from a video.

ffmpeg -i RGB.mkv -map 0:0 -vsync 0 -c:v copy RGB-%04d.png

I used the below command to generate the video from images.

ffmpeg -f image2 -framerate 30 -i RGB-%04d.png -s 2048x1536 rg1.mkv

which gives me the following error:

[png @ 000001cfd8d4a440] Invalid PNG signature 0xFFD8FFDB00C50002.
[...]
Error while decoding stream #0:0: Invalid data found when processing input

Any help is appreciated, thank you

Read more here: Source link