I wanted total frame count of video so that i use below ffprobe command :
ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of default=noprint_wrappers=1 100P.mp4
and i get output below
in above output i get 559 frames
then i use same video to add watermark on it and i use below command:
ffmpeg -i 100P.mp4 -i mt.png -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -codec:a copy -preset ultrafast output.mp4
i get output like this:
and in above image, after adding watermark i get 605 frames
so my question is why i am getting different frame count in ffmpeg and ffprobe?
-preset ultrafast
is only a bit fast but much worse quality (per bitrate) than-preset veryfast
. That's the fastest preset you should normally consider for anything except lossless-qp 0
. (And x264 is so fast that you should normally use at leastmedium
if notslower
orveryslow
). Ultrafast is so bad that even with high bitrate you get ugliness. If you need to disable CABAC, B-frames, and/or 8x8 DCT for some reason, do that with profilemain
orbaseline
, not by destroying your video quality as well withsubme=0