Answer the question
In order to leave comments, you need to log in
How to get a movie frame without artifacts?
I get frames from the video using ffmpeg (or rather, MPlayer - The Movie Player), setting a timestamp and saving the frame to a file. In principle, it works, but on some films it turns out to be a daub. At the same time, if you play the video, then everything is normal. It is clear that this is a problem with encoding (decoding) and searching for a key frame.
Can I somehow fix this problem without decoding the entire movie from the beginning to the timestamp?
To get a frame, I use the following list of commands:
L"mplayer.exe -slave \"fullpath.mkv\" -really-quiet -nosound -vo jpeg:outdir=\\\"outpath.jpg\\\" -frames 1 -ss %u"
Answer the question
In order to leave comments, you need to log in
Try to pull out not a frame, but a fragment from the video. Empirically, you can choose its length so that the keyframe is guaranteed to hit.
From the cut fragment, already saved without compression, you can get the last frame by a separate call to ffmpeg.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question