Search code examples
ffmpegmjpeg

Is it possible to have two images in a single frame in motion jpeg?


I have a quick time video file, video stream is in motion jpeg format, I extract every frame in the file with

ffmpeg -i a.mov -vcodec copy -f image2 %d.jpg

I found that in every jpeg file, there are actually two FFD8 marker, which means there are actually two images in one single jpeg file.

Is this correct? Is the file interlaced? Anything special need to pass to codec?


Solution

  • Yes, motion Jpeg supports interlaced format. If the jpeg file is half of the full video size, will mean that the mov is interlaced, and you cannot use -vcodec copy to extract the frames. Try ffmpeg -deinterlace or use yadif filter.